-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
184 lines (179 loc) · 7.08 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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
trigger:
- master
stages:
- stage: Build
displayName: Build
jobs:
- job: BuildTest
displayName: Build & Test
strategy:
matrix:
Linux GCC Debug:
OS: "Linux"
imageName: "ubuntu-latest"
BuildConfiguration: "Debug"
Generator: ""
ExtraArgs: ""
performTests: true
Linux GCC Release:
OS: "Linux"
imageName: "ubuntu-latest"
BuildConfiguration: "RelWithDebInfo"
Generator: ""
ExtraArgs: ""
performTests: true
Linux Clang Debug:
OS: "Linux"
imageName: "ubuntu-24.04"
BuildConfiguration: "Debug"
Generator: ""
ExtraArgs: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
performTests: true
Linux Clang Release:
OS: "Linux"
imageName: "ubuntu-24.04"
BuildConfiguration: "RelWithDebInfo"
Generator: ""
ExtraArgs: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
performTests: true
MacOS AMD64 Debug:
OS: "MacOS"
imageName: "macos-latest"
BuildConfiguration: "Debug"
Generator: ""
ExtraArgs: ""
performTests: true
MacOS AMD64 Release:
OS: "MacOS"
imageName: "macos-latest"
BuildConfiguration: "RelWithDebInfo"
Generator: ""
ExtraArgs: ""
performTests: true
Windows x86 Debug:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "Debug"
Generator: "-A Win32"
ExtraArgs: ""
performTests: true
Windows x86 Release:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "RelWithDebInfo"
Generator: "-A Win32"
ExtraArgs: ""
performTests: true
Windows AMD64 Debug:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "Debug"
Generator: "-A x64"
ExtraArgs: ""
performTests: true
Windows AMD64 Release:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "RelWithDebInfo"
Generator: "-A x64"
ExtraArgs: ""
performTests: true
Windows ARM64 Debug:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "Debug"
Generator: "-A ARM64"
ExtraArgs: ""
performTests: false
Windows ARM64 Release:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "RelWithDebInfo"
Generator: "-A ARM64"
ExtraArgs: ""
performTests: false
Windows ARM64EC Debug:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "Debug"
Generator: "-A ARM64EC"
ExtraArgs: ""
performTests: false
Windows ARM64EC Release:
OS: "Windows"
imageName: "windows-latest"
BuildConfiguration: "RelWithDebInfo"
Generator: "-A ARM64EC"
ExtraArgs: ""
performTests: false
pool:
vmImage: $(imageName)
steps:
- script: |
echo "Agent.OS:" $(agent.os)
echo "Agent.OSArchitecture:" $(agent.osarchitecture)
displayName: "Basic Info"
- bash: exit 1
displayName: Fail if architecture changes
condition: notIn(variables['agent.osarchitecture'], 'X64')
- script: sudo apt-get update
displayName: "Update packages"
condition: in(variables['agent.os'], 'Linux')
- script: mkdir $(BuildConfiguration)
displayName: Create Build Directory
workingDirectory: $(Build.SourcesDirectory)
- task: CMake@1
displayName: Generate CMake Cache
inputs:
workingDirectory: $(BuildConfiguration)
cmakeArgs: "-DCMAKE_BUILD_TYPE=$(BuildConfiguration) $(Generator) .. -Dljh_BUILD_TESTS=ON $(ExtraArgs)"
- task: CMake@1
displayName: Build Info
condition: eq(variables.performTests, true)
inputs:
workingDirectory: $(BuildConfiguration)
cmakeArgs: "--build . --config $(BuildConfiguration) --target tests_info"
- pwsh: |
if ($IsWindows) {
./$(BuildConfiguration)/tests_info.exe -r jUnit -s --out tests_info_data.xml
} else {
./tests_info -r jUnit -s --out tests_info_data.xml
}
ignoreLASTEXITCODE: true
displayName: Print Info
workingDirectory: "$(BuildConfiguration)/tests"
condition: and(succeeded(), eq(variables.performTests, true))
- task: CMake@1
displayName: Build Everything
inputs:
workingDirectory: $(BuildConfiguration)
cmakeArgs: "--build . --config $(BuildConfiguration)"
- pwsh: |
if ($IsWindows) {
./$(BuildConfiguration)/tests_11.exe -r jUnit -s --out tests_11_data.xml
./$(BuildConfiguration)/tests_14.exe -r jUnit -s --out tests_14_data.xml
./$(BuildConfiguration)/tests_17.exe -r jUnit -s --out tests_17_data.xml
./$(BuildConfiguration)/tests_20.exe -r jUnit -s --out tests_20_data.xml
./$(BuildConfiguration)/tests_23.exe -r jUnit -s --out tests_23_data.xml
} else {
./tests_11 -r jUnit -s --out tests_11_data.xml
./tests_11 -r jUnit -s --out tests_14_data.xml
./tests_17 -r jUnit -s --out tests_17_data.xml
./tests_20 -r jUnit -s --out tests_20_data.xml
./tests_23 -r jUnit -s --out tests_23_data.xml
}
ignoreLASTEXITCODE: true
displayName: Run Tests
workingDirectory: "$(BuildConfiguration)/tests"
condition: and(succeeded(), eq(variables.performTests, true))
- task: PublishTestResults@2
displayName: Publish Test Results
condition: always()
inputs:
testResultsFormat: JUnit
testResultsFiles: "**/tests_*.xml"
failTaskOnFailedTests: true
configuration: "$(BuildConfiguration)"
searchFolder: "$(BuildConfiguration)"
mergeTestResults: true
testRunTitle: "$(Agent.JobName)"