.travis.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Linux Build Configuration for Travis
  2. language: cpp
  3. os:
  4. - linux
  5. - osx
  6. # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
  7. dist: trusty
  8. env:
  9. - DXC_BUILD_TYPE=Release
  10. - DXC_BUILD_TYPE=Debug
  11. compiler:
  12. - clang
  13. matrix:
  14. include:
  15. - os: linux
  16. compiler: gcc
  17. addons:
  18. apt:
  19. sources: ubuntu-toolchain-r-test
  20. packages: ninja-build g++-5
  21. env: DXC_BUILD_TYPE=Debug
  22. - os: linux
  23. compiler: gcc
  24. addons:
  25. apt:
  26. sources: ubuntu-toolchain-r-test
  27. packages: ninja-build g++-5
  28. env: DXC_BUILD_TYPE=Release
  29. cache:
  30. apt: true
  31. git:
  32. depth: false
  33. branches:
  34. only:
  35. - master
  36. addons:
  37. apt:
  38. sources: ubuntu-toolchain-r-test
  39. packages: ninja-build libstdc++-5-dev
  40. before_install:
  41. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  42. wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip;
  43. unzip -q ninja-mac.zip;
  44. chmod +x ninja;
  45. export PATH="$PWD:$PATH";
  46. fi
  47. before_script:
  48. - git submodule update --init
  49. - if [ ${CC} = gcc ]; then CC=gcc-5; CXX=g++-5; fi
  50. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ulimit -Sn 1024; fi
  51. script:
  52. - mkdir build && cd build
  53. - cmake .. -GNinja
  54. $(cat ../utils/cmake-predefined-config-params)
  55. -DSPIRV_BUILD_TESTS=ON
  56. -DCMAKE_BUILD_TYPE=${DXC_BUILD_TYPE}
  57. -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}
  58. - ninja
  59. - ./bin/dxc --help
  60. - ./bin/dxc -T ps_6_0 ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
  61. - ./bin/dxc -T ps_6_0 -Fo passthru-ps.dxil ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
  62. - ./bin/dxc -T ps_6_0 -Fo passthru-ps.spv ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
  63. - ./bin/clang-spirv-tests --spirv-test-root ../tools/clang/test/CodeGenSPIRV/
  64. - ./bin/clang-hlsl-tests --HlslDataDir $PWD/../tools/clang/test/HLSL/
  65. # TODO: Bundle Linux/macOS build artifacts and upload them to a cloud storage
  66. # so users can download and use quickly.