8
8
vmImage : ubuntu-16.04
9
9
workspace :
10
10
clean : all
11
+ strategy :
12
+ matrix :
13
+ debug :
14
+ config : Debug
15
+ lib.type : Static
16
+ cmake.args : -DCUTTLEFISH_SHARED=OFF
17
+ release_static :
18
+ config : Release
19
+ lib.type : Static
20
+ cmake.args : -DCUTTLEFISH_SHARED=OFF
21
+ release_shared :
22
+ config : Release
23
+ lib.type : Shared
24
+ cmake.args : -DCUTTLEFISH_SHARED=ON
11
25
steps :
12
26
- script : |
13
27
git submodule init
30
44
inputs :
31
45
workingDirectory : $(Build.BinariesDirectory)
32
46
cmakeArgs : >
33
- -DCMAKE_BUILD_TYPE=Debug -DCUTTLEFISH_FORCE_INTERNAL_FREEIMAGE=ON
34
- -DCMAKE_FIND_ROOT_PATH=$(dependency.location)
47
+ -DCMAKE_BUILD_TYPE=$(config) -DCUTTLEFISH_FORCE_INTERNAL_FREEIMAGE=ON
48
+ -DCMAKE_FIND_ROOT_PATH=$(dependency.location) $(cmake.args)
35
49
$(Build.SourcesDirectory)
36
50
displayName : Run CMake
37
51
- task : CMake@1
@@ -44,18 +58,36 @@ jobs:
44
58
workingDirectory : $(Build.BinariesDirectory)
45
59
cmakeArgs : --build . --target test
46
60
displayName : Run tests
61
+ continueOnError : true
47
62
timeoutInMinutes : 5
48
63
- task : PublishTestResults@2
49
64
inputs :
50
65
testResultsFormat : JUnit
51
66
testResultsFiles : ' *.xml'
52
67
searchFolder : $(Common.TestResultsDirectory)
68
+ failTaskOnFailedTests : true
69
+ testRunTitle : Linux-$(config)-$(lib.type)
70
+ buildConfiguration : $(config)-$(lib.type)
53
71
displayName : Publish test results
54
72
- job : Mac
55
73
pool :
56
74
vmImage : macOS-10.13
57
75
workspace :
58
76
clean : all
77
+ strategy :
78
+ matrix :
79
+ debug :
80
+ config : Debug
81
+ lib.type : Static
82
+ cmake.args : -DCUTTLEFISH_SHARED=OFF
83
+ release_static :
84
+ config : Release
85
+ lib.type : Static
86
+ cmake.args : -DCUTTLEFISH_SHARED=OFF
87
+ release_shared :
88
+ config : Release
89
+ lib.type : Shared
90
+ cmake.args : -DCUTTLEFISH_SHARED=ON
59
91
steps :
60
92
- script : |
61
93
git submodule init
@@ -92,18 +124,41 @@ jobs:
92
124
workingDirectory : $(Build.BinariesDirectory)
93
125
cmakeArgs : --build . --target test
94
126
displayName : Run tests
127
+ continueOnError : true
95
128
timeoutInMinutes : 5
96
129
- task : PublishTestResults@2
97
130
inputs :
98
131
testResultsFormat : JUnit
99
132
testResultsFiles : ' *.xml'
100
133
searchFolder : $(Common.TestResultsDirectory)
134
+ failTaskOnFailedTests : true
135
+ testRunTitle : Mac-$(config)-$(lib.type)
136
+ buildConfiguration : $(config)-$(lib.type)
101
137
displayName : Publish test results
102
138
- job : Windows
139
+ # NOTE: No debug builds since PVRTexTool lib only provided for release runtime.
103
140
pool :
104
141
vmImage : vs2017-win2016
105
142
workspace :
106
143
clean : all
144
+ strategy :
145
+ matrix :
146
+ win32_static :
147
+ arch : Win32
148
+ lib.type : Static
149
+ cmake.args : -DCUTTLEFISH_SHARED=OFF
150
+ win32_shared :
151
+ arch : Win32
152
+ lib.type : Shared
153
+ cmake.args : -DCUTTLEFISH_SHARED=ON
154
+ win64_static :
155
+ arch : x64
156
+ lib.type : Static
157
+ cmake.args : -DCUTTLEFISH_SHARED=OFF
158
+ win64_shared :
159
+ arch : x64
160
+ lib.type : Shared
161
+ cmake.args : -DCUTTLEFISH_SHARED=ON
107
162
steps :
108
163
- bash : |
109
164
git submodule init
@@ -118,7 +173,8 @@ jobs:
118
173
displayName: Checkout gtest
119
174
workingDirectory: $(Build.BinariesDirectory)
120
175
- script : |
121
- cmake .. -DCMAKE_INSTALL_PREFIX=$(dependency.location) -Dgtest_force_shared_crt=ON
176
+ cmake .. -DCMAKE_INSTALL_PREFIX=$(dependency.location) -Dgtest_force_shared_crt=ON ^
177
+ -A $(arch)
122
178
cmake --build . --config Release
123
179
cmake --build . --config Release --target install
124
180
displayName: Build gtest
@@ -128,26 +184,30 @@ jobs:
128
184
workingDirectory : $(Build.BinariesDirectory)
129
185
cmakeArgs : >
130
186
-DCUTTLEFISH_FORCE_INTERNAL_FREEIMAGE=ON
131
- -DCMAKE_PREFIX_PATH=$(dependency.location)
187
+ -DCMAKE_PREFIX_PATH=$(dependency.location) -A $(arch) $(cmake.args)
132
188
$(Build.SourcesDirectory)
133
189
displayName : Run CMake
134
190
- task : CMake@1
135
191
inputs :
136
192
workingDirectory : $(Build.BinariesDirectory)
137
- # NOTE: Would prefer to do a debug build, but it conflicts with PVRTexTool lib.
138
193
cmakeArgs : --build . --config Release
139
194
displayName : Build
140
195
- task : CMake@1
141
196
inputs :
142
197
workingDirectory : $(Build.BinariesDirectory)
143
198
cmakeArgs : --build . --config Release --target run_tests
144
199
displayName : Run tests
200
+ continueOnError : true
145
201
timeoutInMinutes : 5
146
202
- task : PublishTestResults@2
147
203
inputs :
148
204
testResultsFormat : JUnit
149
205
testResultsFiles : ' *.xml'
150
206
searchFolder : $(Common.TestResultsDirectory)
207
+ failTaskOnFailedTests : true
208
+ testRunTitle : Windows-$(arch)-$(lib.type)
209
+ buildPlatform : $(arch)
210
+ buildConfiguration : Release-$(lib.type)
151
211
displayName : Publish test results
152
212
153
213
# vim: ts=4 sts=4 sw=4 et
0 commit comments