123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- # Linux Build Configuration for Travis
- language: cpp
- os:
- - linux
- - osx
- # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
- dist: trusty
- env:
- - DXC_BUILD_TYPE=Release
- - DXC_BUILD_TYPE=Debug
- compiler:
- - clang
- matrix:
- include:
- - os: linux
- compiler: gcc
- addons:
- apt:
- sources: ubuntu-toolchain-r-test
- packages: ninja-build g++-5
- env: DXC_BUILD_TYPE=Debug
- - os: linux
- compiler: gcc
- addons:
- apt:
- sources: ubuntu-toolchain-r-test
- packages: ninja-build g++-5
- env: DXC_BUILD_TYPE=Release
- # Configuration for AddressSanitizer (https://clang.llvm.org/docs/AddressSanitizer.html)
- - os: linux
- compiler: clang
- env:
- - DXC_BUILD_TYPE=Debug
- - BUILD_CONFIG=ASAN
- # Allow address sanitizer bot to fail for now. TODO(Remove this).
- allow_failures:
- - os: linux
- compiler: clang
- env:
- - DXC_BUILD_TYPE=Debug
- - BUILD_CONFIG=ASAN
- cache:
- apt: true
- git:
- depth: false
- branches:
- only:
- - master
- addons:
- apt:
- sources: ubuntu-toolchain-r-test
- packages: ninja-build libstdc++-5-dev
- before_install:
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip;
- unzip -q ninja-mac.zip;
- chmod +x ninja;
- export PATH="$PWD:$PATH";
- fi
- before_script:
- - git submodule update --init
- - if [ ${CC} = gcc ]; then CC=gcc-5; CXX=g++-5; CXX_FLAGS=; else CXX_FLAGS=-Werror; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ulimit -Sn 1024; fi
- - if [[ ${BUILD_CONFIG} = ASAN ]]; then ADDITIONAL_CMAKE_FLAGS="-DLLVM_USE_SANITIZER=Address -DSPIRV_USE_SANITIZER=address"; fi
- script:
- - mkdir build && cd build
- - cmake .. -GNinja
- $(cat ../utils/cmake-predefined-config-params)
- -DSPIRV_BUILD_TESTS=ON
- -DCMAKE_BUILD_TYPE=${DXC_BUILD_TYPE}
- -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}
- -DCMAKE_CXX_FLAGS=${CXX_FLAGS}
- ${ADDITIONAL_CMAKE_FLAGS}
- - ninja
- - ./bin/dxc --help
- - ./bin/dxc -T ps_6_0 ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
- - ./bin/dxc -T ps_6_0 -Fo passthru-ps.dxil ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
- - ./bin/dxc -T ps_6_0 -Fo passthru-ps.spv ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
- - ./bin/clang-spirv-tests --spirv-test-root ../tools/clang/test/CodeGenSPIRV/
- - ./bin/clang-hlsl-tests --HlslDataDir $PWD/../tools/clang/test/HLSL/
- # TODO: Bundle Linux/macOS build artifacts and upload them to a cloud storage
- # so users can download and use quickly.
|