.travis.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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"
  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 ninja python3; fi
  26. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:yakkety; fi
  27. # We need to copy the current checkout inside the Docker container,
  28. # because it has the MR id to be tested checked out.
  29. script:
  30. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:yakkety > Dockerfile; fi
  31. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
  32. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
  33. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX OBJC=$CC OBJCXX=$CXX ./run_tests.py -- $MESON_ARGS"; fi
  34. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) OBJC=$CC OBJCXX=$CXX ./run_tests.py --backend=ninja -- $MESON_ARGS ; fi