Skip to content

Commit 585736a

Browse files
authored
Add windows builds to azdo (microsoft#3882)
Adds Windows builds previously done by appveyor to azure dev ops. Also consolidates, cleans up, and otherwise reorganizes the previous build scripts
1 parent 58f0ee2 commit 585736a

File tree

1 file changed

+78
-65
lines changed

1 file changed

+78
-65
lines changed

azure-pipelines.yml

Lines changed: 78 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,112 @@
1-
# Starter pipeline
2-
# Start with a minimal pipeline that you can customize to build and deploy your code.
3-
# Add steps that build, run tests, deploy, and more:
4-
# https://aka.ms/yaml
5-
61
resources:
72
- repo: self
83

94
stages:
105
- stage: Build
116
jobs:
12-
- job: Linux
7+
- job: Windows
138
timeoutInMinutes: 90
149

1510
pool:
16-
vmImage: Ubuntu-18.04
11+
vmImage: windows-2019
12+
13+
variables:
14+
HLSL_SRC_DIR: '$(Build.SourcesDirectory)'
15+
HLSL_BLD_DIR: '$(Agent.BuildDirectory)'
16+
platform: x64
1717

1818
strategy:
1919
matrix:
20-
Clang_Release:
20+
VS2019_Release:
2121
configuration: Release
22-
CC: clang
23-
CXX: clang++
24-
CXX_FLAGS: -Werror
25-
Clang_Debug:
22+
VS2019_Debug:
2623
configuration: Debug
27-
CC: clang
28-
CXX: clang++
29-
CXX_FLAGS: -Werror
30-
Gcc_Release:
31-
configuration: Release
32-
CC: gcc-7
33-
CXX: g++-7
34-
CXX_FLAGS:
35-
Gcc_Debug:
36-
configuration: Debug
37-
CC: gcc-7
38-
CXX: g++-7
39-
CXX_FLAGS:
4024

4125
steps:
42-
- bash: sudo apt-get install ninja-build
43-
displayName: 'Installing dependencies'
44-
- bash: git submodule update --init
26+
- script: git submodule update --init
4527
displayName: 'Updating submodules'
46-
- bash: |
47-
mkdir build
48-
cd build
49-
cmake -G Ninja .. $(cat ../utils/cmake-predefined-config-params) -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$(configuration) -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_CXX_FLAGS=${CXX_FLAGS}
50-
displayName: 'Cmake configuration'
51-
- bash: |
52-
cd build
53-
ninja
28+
- script: |
29+
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
30+
call utils\hct\hctbuild.cmd -$(platform) -$(configuration) -show-cmake-log -spirvtest
5431
displayName: 'Building'
55-
- bash: |
56-
./build/bin/dxc -T ps_6_0 tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
57-
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.dxil tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
58-
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.spv tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
59-
displayName: 'Smoke tests'
60-
- bash: ./build/bin/clang-spirv-tests --spirv-test-root tools/clang/test/CodeGenSPIRV/
61-
displayName: 'SPIRV tests'
62-
- bash: ./build/bin/clang-hlsl-tests --HlslDataDir $PWD/tools/clang/test/HLSL/
63-
displayName: 'DXIL tests'
32+
- script: |
33+
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
34+
call utils\hct\hcttest.cmd -$(configuration) noexec
35+
displayName: 'DXIL Tests'
36+
- script: |
37+
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
38+
call utils\hct\hcttest.cmd -$(configuration) spirv_only
39+
displayName: 'SPIRV Tests'
6440
65-
- job: MacOS
41+
- job: Nix
6642
timeoutInMinutes: 90
6743

68-
pool:
69-
vmImage: macOS-10.14
70-
7144
variables:
72-
configuration: Release
73-
CC: clang
74-
CXX: clang++
75-
CXX_FLAGS: -Werror
45+
macOS: macOS-10.14
46+
linux: Ubuntu-18.04
7647

7748
strategy:
7849
matrix:
79-
Clang_Release:
80-
configuration: Release
81-
Clang_Debug:
82-
configuration: Debug
50+
Linux_Clang_Release:
51+
image: ${{ variables.linux }}
52+
configuration: Release
53+
CC: clang
54+
CXX: clang++
55+
CXX_FLAGS: -Werror
56+
OS: Linux
57+
Linux_Clang_Debug:
58+
image: ${{ variables.linux }}
59+
configuration: Debug
60+
CC: clang
61+
CXX: clang++
62+
CXX_FLAGS: -Werror
63+
Linux_Gcc_Release:
64+
image: ${{ variables.linux }}
65+
configuration: Release
66+
CC: gcc-7
67+
CXX: g++-7
68+
CXX_FLAGS:
69+
Linux_Gcc_Debug:
70+
image: ${{ variables.linux }}
71+
configuration: Debug
72+
CC: gcc-7
73+
CXX: g++-7
74+
CXX_FLAGS:
75+
MacOS_Clang_Release:
76+
image: ${{ variables.macOS }}
77+
configuration: Release
78+
CC: clang
79+
CXX: clang++
80+
CXX_FLAGS: -Werror
81+
OS: MacOS
82+
MacOS_Clang_Debug:
83+
image: ${{ variables.macOS }}
84+
configuration: Debug
85+
CC: clang
86+
CXX: clang++
87+
CXX_FLAGS: -Werror
88+
89+
pool:
90+
vmImage: $(image)
8391

8492
steps:
93+
- bash: sudo apt-get install ninja-build
94+
displayName: 'Installing dependencies'
95+
condition: eq(variables['image'], variables['linux'])
96+
8597
- bash: |
8698
brew update
8799
brew install ninja
100+
ulimit -Sn 1024
88101
displayName: 'Installing dependencies'
102+
condition: eq(variables['image'], variables['macOS'])
89103
- bash: git submodule update --init
90104
displayName: 'Updating submodules'
91105
- bash: |
92106
mkdir build
93107
cd build
94-
cmake -G Ninja .. $(cat ../utils/cmake-predefined-config-params) -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$(configuration) -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_CXX_FLAGS=${CXX_FLAGS}
95-
displayName: 'Cmake configuration'
108+
cmake -G Ninja $BUILD_SOURCESDIRECTORY $(cat $BUILD_SOURCESDIRECTORY/utils/cmake-predefined-config-params) -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${configuration} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_CXX_FLAGS=${CXX_FLAGS}
109+
displayName: 'Running Cmake'
96110
- bash: |
97111
cd build
98112
ninja
@@ -101,12 +115,11 @@ stages:
101115
./build/bin/dxc -T ps_6_0 tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
102116
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.dxil tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
103117
./build/bin/dxc -T ps_6_0 -Fo passthru-ps.spv tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
118+
ls -ld $AGENT_BUILDDIRECTORY
119+
ls -ld $BUILD_SOURCESDIRECTORY
104120
displayName: 'Smoke tests'
105-
- bash: |
106-
ulimit -Sn 1024
107-
./build/bin/clang-spirv-tests --spirv-test-root tools/clang/test/CodeGenSPIRV/
121+
- bash: ./build/bin/clang-spirv-tests --spirv-test-root tools/clang/test/CodeGenSPIRV/
108122
displayName: 'SPIRV tests'
109-
- bash: |
110-
ulimit -Sn 1024
111-
./build/bin/clang-hlsl-tests --HlslDataDir $PWD/tools/clang/test/HLSL/
123+
- bash: ./build/bin/clang-hlsl-tests --HlslDataDir $PWD/tools/clang/test/HLSL/
112124
displayName: 'DXIL tests'
125+

0 commit comments

Comments
 (0)