-
Notifications
You must be signed in to change notification settings - Fork 966
318 lines (291 loc) · 12 KB
/
ci.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
on:
pull_request:
# Run on all pull requests.
push:
# Run on merges/pushes to main.
branches:
- main
schedule:
# Run nightly, at midnight.
- cron: '8 0 * * *'
name: draco-ci
jobs:
# Main build and test job.
draco-tests:
strategy:
matrix:
include:
- test_name: macos-make-release-shared
os: macos-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: macos-make-release-shared-with-transcoder
os: macos-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: macos-make-release-static
os: macos-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: macos-make-release-static-with-transcoder
os: macos-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: macos-xcode-release-shared
os: macos-latest
cmake_configure_command: |-
cmake .. -G Xcode \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . --config Release
draco_test_command: Release/draco_tests
- test_name: macos-xcode-release-shared-with-transcoder
os: macos-latest
cmake_configure_command: |-
cmake .. -G Xcode \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . --config Release
draco_test_command: Release/draco_tests
- test_name: macos-xcode-release-static
os: macos-latest
cmake_configure_command: |-
cmake .. -G Xcode \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . --config Release
draco_test_command: Release/draco_tests
- test_name: macos-xcode-release-static-with-transcoder
os: macos-latest
cmake_configure_command: |-
cmake .. -G Xcode \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . --config Release
draco_test_command: Release/draco_tests
- test_name: ubuntu-make-release-shared
os: ubuntu-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_CXX_COMPILER=g++-10 \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: ubuntu-make-release-shared-with-transcoder
os: ubuntu-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_CXX_COMPILER=g++-10 \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: ubuntu-make-release-static
os: ubuntu-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_CXX_COMPILER=g++-10 \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: ubuntu-make-release-static-with-transcoder
os: ubuntu-latest
cmake_configure_command: |-
cmake .. -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_CXX_COMPILER=g++-10 \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: windows-msvc-release-shared
os: windows-2019
cmake_configure_command: |-
cmake .. -G "Visual Studio 16 2019" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . --config Release -- -m:2
draco_test_command: Release/draco_tests
- test_name: windows-msvc-release-shared-with-transcoder
os: windows-2019
cmake_configure_command: |-
cmake .. -G "Visual Studio 16 2019" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . --config Release -- -m:2
draco_test_command: Release/draco_tests
- test_name: windows-msvc-release-static
os: windows-2019
cmake_configure_command: |-
cmake .. -G "Visual Studio 16 2019" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . --config Release -- -m:2
draco_test_command: Release/draco_tests
- test_name: windows-msvc-release-static-with-transcoder
os: windows-2019
cmake_configure_command: |-
cmake .. -G "Visual Studio 16 2019" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CONFIGURATION_TYPES=Release \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . --config Release -- -m:2
draco_test_command: Release/draco_tests
- test_name: windows-make-release-shared
os: windows-2019
cmake_configure_command: |-
cmake .. -G "MinGW Makefiles" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: windows-make-release-shared-with-transcoder
os: windows-2019
cmake_configure_command: |-
cmake .. -G "MinGW Makefiles" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: windows-make-release-static
os: windows-2019
cmake_configure_command: |-
cmake .. -G "MinGW Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DDRACO_TESTS=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
- test_name: windows-make-release-static-with-transcoder
os: windows-2019
cmake_configure_command: |-
cmake .. -G "MinGW Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . -- -j2
draco_test_command: ./draco_tests
name: test-${{ matrix.test_name }}
runs-on: ${{ matrix.os }}
steps:
- name: Clone Draco with Submodules.
uses: actions/checkout@v2
with:
submodules: true
- name: Create build directory
shell: bash
run: mkdir _gh_build
- name: Configure CMake build
shell: bash
run: ${{ matrix.cmake_configure_command }}
working-directory: ./_gh_build
- name: Build with CMake
shell: bash
run: ${{ matrix.cmake_build_command }}
working-directory: ./_gh_build
- name: Run tests
shell: bash
run: ${{ matrix.draco_test_command }}
working-directory: ./_gh_build
# Runs src/draco/tools/install_test.
draco-install-tests:
strategy:
matrix:
include:
- test_name: ubuntu-make
os: ubuntu-latest
test_command: python3 test.py -v -G "Unix Makefiles"
- test_name: ubuntu-make-with-transcoder
os: ubuntu-latest
test_command: python3 test.py -v -t -G "Unix Makefiles"
- test_name: macos-make
os: macos-latest
test_command: python3 test.py -v -G "Unix Makefiles"
- test_name: macos-make-with-transcoder
os: macos-latest
test_command: python3 test.py -v -t -G "Unix Makefiles"
- test_name: macos-xcode
os: macos-latest
test_command: python3 test.py -v -G Xcode
- test_name: macos-xcode-with-transcoder
os: macos-latest
test_command: python3 test.py -v -t -G Xcode
- test_name: windows-make
os: windows-2019
test_command: python3 test.py -v -G "MinGW Makefiles"
- test_name: windows-make-with-transcoder
os: windows-2019
test_command: python3 test.py -v -t -G "MinGW Makefiles"
- test_name: windows-msvc
os: windows-2019
test_command: python3 test.py -v -G "Visual Studio 16 2019"
- test_name: windows-msvc-with-transcoder
os: windows-2019
test_command: python3 test.py -v -t -G "Visual Studio 16 2019"
name: install-test-${{ matrix.test_name }}
runs-on: ${{ matrix.os }}
steps:
- name: Clone Draco with Submodules
uses: actions/checkout@v2
with:
submodules: true
- name: Run src/draco/tools/install_test/test.py
shell: bash
run: ${{ matrix.test_command }}
working-directory: ./src/draco/tools/install_test