diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-06-12 17:04:36 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-07-17 14:23:59 +0530 |
commit | 6582cd28c80fc3ef6ecd9476a4a23d21ca6a9f2b (patch) | |
tree | 8e1e0c5e39d32c28bf12dcfd631c74f5fcc948bb | |
parent | f77c3176ab5cb583fc32bfdebeb320481b7d3592 (diff) | |
download | meson-6582cd28c80fc3ef6ecd9476a4a23d21ca6a9f2b.zip meson-6582cd28c80fc3ef6ecd9476a4a23d21ca6a9f2b.tar.gz meson-6582cd28c80fc3ef6ecd9476a4a23d21ca6a9f2b.tar.bz2 |
CI: Use QuLogic's Ninja patches
This way we get some testing for the patches, and speed up our builds.
My server is hosted on a UK Linode, so it should have good uptimes.
However, we should likely move this into the Docker image at least
for Linux, and perhaps put it in a CI cache for the rest.
-rw-r--r-- | .appveyor.yml | 4 | ||||
-rw-r--r-- | .travis.yml | 8 | ||||
-rwxr-xr-x | run_tests.py | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 6551445..08143e8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -57,9 +57,11 @@ install: - cmd: set "ORIG_PATH=%PATH%" # Boost 1.56.0: https://www.appveyor.com/docs/build-environment/#boost #- cmd: set "BOOST_ROOT=C:\Libraries\boost" + # Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219 + - cmd: set "MESON_FIXED_NINJA=1" + - ps: (new-object net.webclient).DownloadFile('http://nirbheek.in/files/binaries/ninja/win32/ninja.exe', 'C:\projects\meson\ninja.exe') # Use the x86 python only when building for x86 for the cpython tests. # For all other archs (including, say, arm), use the x64 python. - - ps: (new-object net.webclient).DownloadFile('https://www.dropbox.com/s/bbzvepq85hv47x1/ninja.exe?dl=1', 'C:\projects\meson\ninja.exe') - cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python34) else (set MESON_PYTHON_PATH=C:\python34-x64) # Set paths and config for each build type. diff --git a/.travis.yml b/.travis.yml index 724f9ad..662b769 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,9 @@ matrix: before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi + # Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219 + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p $HOME/tools; curl -L http://nirbheek.in/files/binaries/ninja/macos/ninja -o $HOME/tools/ninja; chmod +x $HOME/tools/ninja; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:zesty; fi - pip3 install codecov - mkdir .coverage @@ -47,9 +49,9 @@ script: ci_env=`bash <(curl -s https://codecov.io/env)` docker run $ci_env -v ${PWD}/.coverage:/root/.coverage \ withgit \ - /bin/sh -c "cd /root && CC=$CC CXX=$CXX OBJC=$CC OBJCXX=$CXX ./run_tests.py --cov -- $MESON_ARGS && chmod -R a+rwX .coverage" + /bin/sh -c "cd /root && mkdir -p tools; wget -c http://nirbheek.in/files/binaries/ninja/linux-amd64/ninja -O /root/tools/ninja; chmod +x /root/tools/ninja; CC=$CC CXX=$CXX OBJC=$CC OBJCXX=$CXX PATH=/root/tools:$PATH MESON_FIXED_NINJA=1 ./run_tests.py --cov -- $MESON_ARGS && chmod -R a+rwX .coverage" fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) OBJC=$CC OBJCXX=$CXX ./run_tests.py --cov --backend=ninja -- $MESON_ARGS ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) OBJC=$CC OBJCXX=$CXX PATH=$HOME/tools:$PATH MESON_FIXED_NINJA=1 ./run_tests.py --cov --backend=ninja -- $MESON_ARGS ; fi after_success: - coverage3 combine diff --git a/run_tests.py b/run_tests.py index 040f958..cf8221c 100755 --- a/run_tests.py +++ b/run_tests.py @@ -104,6 +104,9 @@ def get_backend_commands(backend, debug=False): return cmd, clean_cmd, test_cmd, install_cmd, uninstall_cmd def ensure_backend_detects_changes(backend): + # We're using a ninja with QuLogic's patch for sub-1s resolution timestamps + if 'MESON_FIXED_NINJA' in os.environ: + return # This is needed to increase the difference between build.ninja's # timestamp and the timestamp of whatever you changed due to a Ninja # bug: https://github.com/ninja-build/ninja/issues/371 |