forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (83 loc) · 2.65 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# 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
# All linux timing out with empty log currently.
# 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.