forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
167 lines (150 loc) · 5.53 KB
/
azure-pipelines.yml
File metadata and controls
167 lines (150 loc) · 5.53 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
trigger:
- main
- release*
pr:
- main
- release*
resources:
- repo: self
stages:
- stage: Build
jobs:
- job: Windows
timeoutInMinutes: 165
pool:
vmImage: windows-2022
variables:
HLSL_SRC_DIR: '$(Build.SourcesDirectory)'
HLSL_BLD_DIR: '$(Agent.BuildDirectory)'
platform: x64
strategy:
matrix:
VS2022_Release:
configuration: Release
VS2022_Debug:
configuration: Debug
steps:
- checkout: self
clean: true
submodules: true
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hctbuild.cmd -$(platform) -$(configuration) -show-cmake-log -spirvtest -warp-nuget-version 1.0.16.1
displayName: 'Building'
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) noexec
displayName: 'DXIL Tests'
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) exec
displayName: 'DXIL Execution Tests'
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) compat-suite 1.6
displayName: 'DXIL Compat Suite Tests (1.6 release)'
condition: succeededOrFailed()
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) compat-suite 1.7
displayName: 'DXIL Compat Suite Tests (1.7 release)'
condition: succeededOrFailed()
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) compat-suite 1.8
displayName: 'DXIL Compat Suite Tests (1.8 release)'
condition: succeededOrFailed()
- job: Nix
timeoutInMinutes: 165
variables:
macOS: macOS-latest
linux: Ubuntu-22.04 # FIXME: #7364, DXC does not build correctly with GCC 13+
strategy:
matrix:
Linux_Clang_RelWithDebInfo:
image: ${{ variables.linux }}
configuration: RelWithDebInfo
CC: clang-18
CXX: clang++-18
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_SANITIZER='Address;Undefined' -DLLVM_ENABLE_LIBCXX=On -DLLVM_USE_LINKER=lld-18
CHECK_ALL_ENV: ASAN_OPTIONS=alloc_dealloc_mismatch=0 LSAN_OPTIONS=suppressions=$BUILD_SOURCESDIRECTORY/utils/asan/x86_64-pc-linux-gnu.lsan.supp:print_suppressions=0 ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-18 LSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-18
OS: Linux
Linux_Clang_Debug:
image: ${{ variables.linux }}
configuration: Debug
CC: clang
CXX: clang++
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_LINKER=lld
Linux_Gcc_Release:
image: ${{ variables.linux }}
configuration: Release
CC: gcc-9
CXX: g++-9
Linux_Gcc_Debug:
image: ${{ variables.linux }}
configuration: Debug
CC: gcc-9
CXX: g++-9
CMAKE_OPTS: -DLLVM_USE_SPLIT_DWARF=On
MacOS_Clang_Release:
image: ${{ variables.macOS }}
configuration: Release
CC: clang
CXX: clang++
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On
OS: MacOS
MacOS_Clang_Debug:
image: ${{ variables.macOS }}
configuration: Debug
CC: clang
CXX: clang++
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On
pool:
vmImage: $(image)
steps:
- checkout: self
clean: true
submodules: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
- bash: |
sudo apt-get update
sudo apt-get upgrade libc6 libc6-dbg
sudo apt-get install ninja-build
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install libc++-18-dev
displayName: 'Installing dependencies'
condition: eq(variables['image'], variables['linux'])
- bash: |
sudo apt-get install g++-9 -y
displayName: 'Installing g++-9'
condition: and(eq(variables['CXX'], 'g++-9'), eq(variables['image'], variables['linux']))
- bash: |
brew update
brew install ninja
ulimit -Sn 1024
displayName: 'Installing dependencies'
condition: eq(variables['image'], variables['macOS'])
- bash: |
cmake -B build -G Ninja $BUILD_SOURCESDIRECTORY -DLLVM_LIT_ARGS='-v --xunit-xml-output=testresults.xunit.xml' -C $BUILD_SOURCESDIRECTORY/cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$(configuration) -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX) $(CMAKE_OPTS)
displayName: 'Running Cmake'
- bash: |
ninja -C build test-depends
displayName: 'Building'
- bash: |
./build/bin/dxc -T ps_6_0 tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.dxil tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.spv tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
ls -ld $AGENT_BUILDDIRECTORY
ls -ld $BUILD_SOURCESDIRECTORY
displayName: 'Smoke tests'
- bash: $(CHECK_ALL_ENV) ninja -C build check-all
displayName: 'DXC tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/testresults.xunit.xml'
condition: succeededOrFailed()