forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathazure-pipelines.yml
126 lines (112 loc) · 3.66 KB
/
azure-pipelines.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
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
resources:
- repo: self
stages:
- stage: Build
jobs:
- job: Windows
timeoutInMinutes: 90
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
displayName: 'Building'
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) noexec
displayName: 'DXIL Tests'
- job: Nix
timeoutInMinutes: 90
variables:
macOS: macOS-latest
linux: Ubuntu-latest
strategy:
matrix:
Linux_Clang_Release:
image: ${{ variables.linux }}
configuration: Release
CC: clang
CXX: clang++
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_ENABLE_SANITIZER=Address -DLLVM_ENABLE_LIBCXX=On
OS: Linux
Linux_Clang_Debug:
image: ${{ variables.linux }}
configuration: Debug
CC: clang
CXX: clang++
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On
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
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 install ninja-build
displayName: 'Installing dependencies'
condition: 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=--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: ninja -C build check-all
displayName: 'DXC tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/testresults.xunit.xml'
condition: succeededOrFailed()