.travis.yml 907 B

123456789101112131415161718192021222324252627
  1. sudo: required
  2. os:
  3. - linux
  4. - osx
  5. language:
  6. - cpp
  7. services:
  8. - docker
  9. before_install:
  10. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  11. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi
  12. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:xenial; fi
  13. # We need to copy the current checkout inside the Docker container,
  14. # because it has the MR id to be tested checked out.
  15. script:
  16. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:xenial > Dockerfile; fi
  17. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
  18. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
  19. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && ./run_tests.py"; fi
  20. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./run_tests.py --backend=ninja ; fi