.travis.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. sudo: false
  2. branches:
  3. only:
  4. - master
  5. os:
  6. - linux
  7. - osx
  8. compiler:
  9. - gcc
  10. - clang
  11. env:
  12. - MESON_ARGS=""
  13. - MESON_ARGS="--unity=on"
  14. language:
  15. - cpp
  16. services:
  17. - docker
  18. matrix:
  19. exclude:
  20. # On OS X gcc is just a wrapper around clang, so don't waste time testing that
  21. - os: osx
  22. compiler: gcc
  23. before_install:
  24. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  25. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi
  26. # Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
  27. - 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
  28. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:artful; fi
  29. # We need to copy the current checkout inside the Docker container,
  30. # because it has the MR id to be tested checked out.
  31. script:
  32. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:artful > Dockerfile; fi
  33. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
  34. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
  35. - |
  36. if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
  37. ci_env=`bash <(curl -s https://codecov.io/env)`
  38. docker run $ci_env -v ${PWD}/.coverage:/root/.coverage \
  39. withgit \
  40. /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 -- $MESON_ARGS && chmod -R a+rwX .coverage"
  41. fi
  42. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib OBJC=$CC OBJCXX=$CXX PATH=$HOME/tools:$PATH MESON_FIXED_NINJA=1 ./run_tests.py --backend=ninja -- $MESON_ARGS ; fi