From 1e43b05712d5b5eb026265812089b42b14de8d96 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Fri, 25 Aug 2017 23:00:11 -0700 Subject: [PATCH] spread CI work over targets --- .travis.yml | 12 ++++++------ build.sh | 5 +++-- ci/setup.sh | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c587a3..3e84dd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ matrix: - os: linux compiler: gcc dist: trusty - sudo: false + sudo: required addons: apt: sources: @@ -17,12 +17,12 @@ matrix: - gettext - cmake3 env: - - INTEGRATION=false + - SUDO_TESTS=true - os: linux compiler: clang dist: trusty - sudo: true + sudo: false addons: apt: sources: @@ -37,14 +37,14 @@ matrix: - clang-4.0 - clang-tidy-4.0 env: - - CC=clang-4.0 CXX=clang++-4.0 CHECK=true INTEGRATION=true SUDO_TESTS=true + - CC=clang-4.0 CXX=clang++-4.0 CHECK=true INTEGRATION=false CMAKE=/tmp/bin/cmake - os: osx compiler: clang osx_image: xcode8.3 - sudo: true + sudo: required env: - - INTEGRATION=true SUDO_TESTS=true + - SUDO_TESTS=true before_script: - ./ci/setup.sh diff --git a/build.sh b/build.sh index af1b323..1379f28 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,10 @@ #!/bin/bash -eu +: ${CMAKE:=cmake} : ${CHECK:=false} : ${INTEGRATION:=true} -cmake --version +${CMAKE} --version CFG=$* if [[ "$CHECK" == "true" ]]; then @@ -20,7 +21,7 @@ then fi cd build -cmake .. ${CFG} +${CMAKE} .. ${CFG} make -j2 make test if [[ "$INTEGRATION" == "true" ]]; then diff --git a/ci/setup.sh b/ci/setup.sh index 81bc0ce..51e743c 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash -eu -: ${INTEGRATION:=false} +: ${INTEGRATION:=true} : ${CHECK:=false} if [[ "$INTEGRATION" == "true" ]]; then @@ -15,8 +15,8 @@ if [[ "$CHECK" == "true" ]]; then if uname -s | grep -q Linux; then wget https://cmake.org/files/v3.9/cmake-3.9.1-Linux-x86_64.tar.gz -O /tmp/cmake.tar.gz tar -C /tmp/ -xf /tmp/cmake.tar.gz - sudo rm -f $(which cmake) - sudo ln -s $(ls -1 /tmp/cmake*/bin/cmake) /bin/ + mkdir /tmp/bin + ln -s $(ls -1 /tmp/cmake*/bin/cmake) /tmp/bin/ fi fi