.travis.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. sudo: false
  2. os:
  3. - linux
  4. - osx
  5. compiler:
  6. - gcc
  7. - clang
  8. env:
  9. - MESON_ARGS=""
  10. - MESON_ARGS="--unity"
  11. language:
  12. - cpp
  13. services:
  14. - docker
  15. matrix:
  16. exclude:
  17. # On OS X gcc is just a wrapper around clang, so don't waste time testing that
  18. - os: osx
  19. compiler: gcc
  20. before_install:
  21. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  22. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi
  23. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:yakkety; fi
  24. # We need to copy the current checkout inside the Docker container,
  25. # because it has the MR id to be tested checked out.
  26. script:
  27. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:yakkety > Dockerfile; fi
  28. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
  29. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
  30. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true CC=$CC CXX=$CXX ./run_tests.py -- $MESON_ARGS"; fi
  31. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) ./run_tests.py --backend=ninja -- $MESON_ARGS ; fi