You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.6 KiB

  1. image: debian:unstable
  2. variables:
  3. DEBIAN_FRONTEND: noninteractive
  4. CCACHE_DIR: $CI_PROJECT_DIR/.ccache
  5. CCACHE_BASEDIR: $CI_PROJECT_DIR
  6. cache:
  7. paths:
  8. - .ccache
  9. test as root:
  10. stage: test
  11. script:
  12. - adduser --home /home/travis travis --quiet --disabled-login --gecos "" --uid 1000
  13. - rm -f /etc/dpkg/dpkg.cfg.d/excludes
  14. - apt-get update
  15. - apt-get install -qq build-essential expect sudo ccache
  16. - chmod -R o+rwX $PWD
  17. - ./prepare-release travis-ci
  18. - sudo -u travis mkdir -p build .ccache
  19. - sudo -u travis env -C build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja ..
  20. - sudo -u travis --preserve-env=CCACHE_DIR,CCACHE_BASEDIR ninja -C build
  21. - CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
  22. - unbuffer ./test/integration/run-tests -q -j 4
  23. test as user:
  24. stage: test
  25. script:
  26. - adduser --home /home/travis travis --quiet --disabled-login --gecos "" --uid 1000
  27. - rm -f /etc/dpkg/dpkg.cfg.d/excludes
  28. - apt-get update
  29. - apt-get install -qq build-essential expect sudo ccache
  30. - chmod 755 /root
  31. - chmod -R o+rwX $PWD
  32. - ./prepare-release travis-ci
  33. - sudo -u travis mkdir -p build .ccache
  34. - sudo -u travis env -C build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja ..
  35. - sudo -u travis --preserve-env=CCACHE_DIR,CCACHE_BASEDIR ninja -C build
  36. - sudo -u travis CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
  37. - sudo -u travis unbuffer ./test/integration/run-tests -q -j 4