forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
129 lines (116 loc) · 3.77 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
126
127
128
resources:
- repo: self
stages:
- stage: Build
jobs:
- job: Windows
timeoutInMinutes: 90
pool:
vmImage: windows-2019
variables:
HLSL_SRC_DIR: '$(Build.SourcesDirectory)'
HLSL_BLD_DIR: '$(Agent.BuildDirectory)'
platform: x64
strategy:
matrix:
VS2019_Release:
configuration: Release
VS2019_Debug:
configuration: Debug
steps:
- script: git submodule update --init
displayName: 'Updating submodules'
- 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'
- script: |
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
call utils\hct\hcttest.cmd -$(configuration) spirv_only
displayName: 'SPIRV Tests'
- job: Nix
timeoutInMinutes: 90
variables:
macOS: macOS-11
linux: Ubuntu-18.04
strategy:
matrix:
Linux_Clang_Release:
image: ${{ variables.linux }}
configuration: Release
CC: clang
CXX: clang++
CXX_FLAGS: -Werror
OS: Linux
Linux_Clang_Debug:
image: ${{ variables.linux }}
configuration: Debug
CC: clang
CXX: clang++
CXX_FLAGS: -Werror
Linux_Gcc_Release:
image: ${{ variables.linux }}
configuration: Release
CC: gcc-7
CXX: g++-7
CXX_FLAGS:
Linux_Gcc_Debug:
image: ${{ variables.linux }}
configuration: Debug
CC: gcc-7
CXX: g++-7
CXX_FLAGS:
MacOS_Clang_Release:
image: ${{ variables.macOS }}
configuration: Release
CC: clang
CXX: clang++
CXX_FLAGS: -Werror
OS: MacOS
MacOS_Clang_Debug:
image: ${{ variables.macOS }}
configuration: Debug
CC: clang
CXX: clang++
CXX_FLAGS: -Werror
pool:
vmImage: $(image)
steps:
- 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: git submodule update --init
displayName: 'Updating submodules'
- bash: |
mkdir build
cd build
cmake -G Ninja $BUILD_SOURCESDIRECTORY -C $BUILD_SOURCESDIRECTORY/cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${configuration} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_CXX_FLAGS=${CXX_FLAGS}
displayName: 'Running Cmake'
- bash: |
cd build
ninja
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: ./build/bin/clang-spirv-tests --spirv-test-root tools/clang/test/CodeGenSPIRV/
displayName: 'SPIRV tests'
- bash: ./build/bin/clang-hlsl-tests --HlslDataDir $PWD/tools/clang/test/HLSL/
displayName: 'DXIL tests'