forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos-windows.yml
444 lines (371 loc) · 16.9 KB
/
os-windows.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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# Windows-specific builder configurations and build commands
## Base configurations
.windows:
variables:
GIT_SUBMODULE_STRATEGY: none
GIT_CLONE_PATH: "$CI_BUILDS_DIR\\vtk-ci-ext\\$CI_CONCURRENT_ID"
# Turn off direct mode until we test it.
BUILDCACHE_DIRECT_MODE: "false"
.wheel_windows_x86_64:
extends: .windows
variables:
VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
VCVARSPLATFORM: "x64"
VCVARSVERSION: "14.35.32215"
VTK_INSTALL: 1
.wheel_windows_osmesa_addon:
variables:
VTK_DEFAULT_OPENGL_WINDOW: vtkOSOpenGLRenderWindow
.wheel_windows38_x86_64:
extends: .wheel_windows_x86_64
variables:
CMAKE_CONFIGURATION: wheel_windows38_x86_64
.wheel_windows38_x86_64_osmesa:
extends:
- .wheel_windows38_x86_64
- .wheel_windows_osmesa_addon
variables:
CMAKE_CONFIGURATION: wheel_windows38_x86_64_osmesa
.wheel_windows39_x86_64:
extends: .wheel_windows_x86_64
variables:
CMAKE_CONFIGURATION: wheel_windows39_x86_64
.wheel_windows39_x86_64_osmesa:
extends:
- .wheel_windows39_x86_64
- .wheel_windows_osmesa_addon
variables:
CMAKE_CONFIGURATION: wheel_windows39_x86_64_osmesa
.wheel_windows310_x86_64:
extends: .wheel_windows_x86_64
variables:
CMAKE_CONFIGURATION: wheel_windows310_x86_64
.wheel_windows310_x86_64_osmesa:
extends:
- .wheel_windows310_x86_64
- .wheel_windows_osmesa_addon
variables:
CMAKE_CONFIGURATION: wheel_windows310_x86_64_osmesa
.wheel_windows311_x86_64:
extends: .wheel_windows_x86_64
variables:
CMAKE_CONFIGURATION: wheel_windows311_x86_64
.wheel_windows311_x86_64_osmesa:
extends:
- .wheel_windows311_x86_64
- .wheel_windows_osmesa_addon
variables:
CMAKE_CONFIGURATION: wheel_windows311_x86_64_osmesa
.wheel_windows312_x86_64:
extends: .wheel_windows_x86_64
variables:
CMAKE_CONFIGURATION: wheel_windows312_x86_64
.wheel_windows312_x86_64_osmesa:
extends:
- .wheel_windows312_x86_64
- .wheel_windows_osmesa_addon
variables:
CMAKE_CONFIGURATION: wheel_windows312_x86_64_osmesa
### Build and test
.windows_build:
extends: .windows
variables:
# Note that shell runners only support runners with a single
# concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may
# change between the build and test stages which CMake doesn't support.
# Even if we could, it could change if other runners on the machine
# could run at the same time, so we drop it.
GIT_CLONE_PATH: "$CI_BUILDS_DIR\\vtk-ci"
# Force "desktop" OpenGL support. Qt seems to want to use EGL when run
# from GitLab-CI by default (it runs as a Windows service).
QT_OPENGL: desktop
.windows_vs2022:
extends: .windows_build
variables:
VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
VCVARSPLATFORM: "x64"
VCVARSVERSION: "14.35.32215"
.windows_vs2022_debug_mpi_qt:
extends:
- .windows_vs2022
variables:
CMAKE_CONFIGURATION: windows_vs2022_debug_mpi_qt
CMAKE_BUILD_TYPE: Debug
.windows_vs2022_kits_mpi_python_qt:
extends:
- .windows_vs2022
variables:
CMAKE_CONFIGURATION: windows_vs2022_kits_mpi_python_qt
.windows_vs2022_kits_mpi_python_qt_stdthread:
extends:
- .windows_vs2022
variables:
CMAKE_CONFIGURATION: windows_vs2022_kits_mpi_python_qt_stdthread
.windows_vs2022_kits_mpi_python_qt_ext_vtk:
extends:
- .windows_vs2022
variables:
CMAKE_CONFIGURATION: windows_vs2022_kits_mpi_python_qt_ext_vtk
.windows_vs2022_mpi_python_qt:
extends:
- .windows_vs2022
variables:
CMAKE_CONFIGURATION: windows_vs2022_mpi_python_qt
.windows_vs2022_mpi_python_qt_static:
extends:
- .windows_vs2022
variables:
CMAKE_CONFIGURATION: windows_vs2022_mpi_python_qt_static
.wasm32_emscripten_windows_chrome_ext_vtk:
extends: .windows
variables:
CMAKE_CONFIGURATION: wasm32_emscripten_windows_chrome_ext_vtk
WASM_ARCHITECTURE: wasm32-emscripten
.wasm64_emscripten_windows_chrome_ext_vtk:
extends: .windows
variables:
CMAKE_CONFIGURATION: wasm64_emscripten_windows_chrome_ext_vtk
WASM_ARCHITECTURE: wasm64-emscripten
.windows_vs2022_java:
extends: .windows_vs2022
variables:
CMAKE_BUILD_TYPE: Release
CMAKE_CONFIGURATION: windows_vs2022_java
VTK_INSTALL: 1
## Tags
.windows_builder_tags:
tags:
- vtk # Since this is a bare runner, pin to a project.
- msvc-19.35
- nonconcurrent
- shell
- vs2022
- windows-x86_64
.windows_wheel_builder_tags:
tags:
- vtk # Since this is a bare runner, pin to a project.
- msvc-19.35
- concurrent
- shell
- vs2022
- windows-x86_64
.windows_tester_tags:
tags:
- vtk # Since this is a bare runner, pin to a project.
- msvc-19.35
- nonconcurrent
- shell
- vs2022
- windows-x86_64
# - test # Not needed yet?
.windows_ext_builder_tags:
tags:
- vtk # Since this is a bare runner, pin to a project.
- msvc-19.35
# - concurrent
- nonconcurrent # FIXME: non-relocatability in VTK-m and `VTK_DLL_PATHS`
- shell
- vs2022
- windows-x86_64
# - test # Not needed yet?
## Windows-specific scripts
.before_script_windows: &before_script_windows
- $pwdpath = $pwd.Path
- powershell -File ".gitlab/ci/cmake.ps1"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH"
- powershell -File ".gitlab/ci/ninja.ps1"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
- cmake --version
- ninja --version
# Support submodule references to the user's fork.
- git submodule update --init --recursive
- git submodule foreach --recursive cmake -P "$pwdpath/.gitlab/ci/fetch_submodule.cmake"
- git submodule sync --recursive
- git submodule update --init --recursive
.before_script_windows_deps: &before_script_windows_deps
- cmake -P .gitlab/ci/download_qt.cmake
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH"
- cmake -P .gitlab/ci/download_python.cmake
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python;$env:PATH"
- Set-Item -Force -Path "env:PYTHONHOME" -Value "$pwdpath\.gitlab\python"
- cmake -P .gitlab/ci/download_openxr.cmake
- Set-Item -Force -Path "env:CMAKE_PREFIX_PATH" -Value "$pwdpath\.gitlab\openxr;$env:CMAKE_PREFIX_PATH"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\openxr\x64\bin;$env:PATH"
- cmake -P .gitlab/ci/download_openxrremoting.cmake
- Set-Item -Force -Path "env:CMAKE_PREFIX_PATH" -Value "$pwdpath\.gitlab\openxrremoting\build\native;$env:CMAKE_PREFIX_PATH"
- cmake -P .gitlab/ci/download_tbb.cmake
- Set-Item -Force -Path "env:CMAKE_PREFIX_PATH" -Value "$pwdpath\.gitlab\tbb;$env:CMAKE_PREFIX_PATH"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\tbb\redist\$env:TBB_REDIST_DIR;$env:PATH"
.before_script_java_windows: &before_script_java_windows
- cmake -P .gitlab/ci/download_java.cmake
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\jdk\bin\;$env:PATH"
- Set-Item -Force -Path "env:JAVA_HOME" -Value "$pwdpath\.gitlab\jdk\"
- cmake -P .gitlab/ci/download_maven.cmake
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\maven\bin\;$env:PATH"
- 'mvn dependency:get "-Dmaven.repo.local=$env:GIT_CLONE_PATH\.gitlab\m2" "-Dartifact=org.jogamp.gluegen:gluegen-rt:2.3.2"'
- 'mvn dependency:get "-Dmaven.repo.local=$env:GIT_CLONE_PATH\.gitlab\m2" "-Dartifact=org.jogamp.gluegen:gluegen-rt:2.3.2:jar:natives-windows-amd64"'
- 'mvn dependency:get "-Dmaven.repo.local=$env:GIT_CLONE_PATH\.gitlab\m2" "-Dartifact=org.jogamp.jogl:jogl-all:2.3.2"'
- 'mvn dependency:get "-Dmaven.repo.local=$env:GIT_CLONE_PATH\.gitlab\m2" "-Dartifact=org.jogamp.jogl:jogl-all:2.3.2:jar:natives-windows-amd64"'
.script_windows: &script_windows
# Build and activate the venv
- python -m venv $pwdpath\build\ci-venv
# This may be necessary when running manually.
# Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
- . .\build\ci-venv\Scripts\Activate.ps1
- pip install -qq -r $pwdpath\.gitlab\ci\requirements.txt
- Invoke-Expression -Command .gitlab/ci/buildcache.ps1
- Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$pwdpath\.gitlab\buildcache\bin"
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- buildcache --show-stats
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
- ctest -VV -S .gitlab/ci/ctest_build.cmake | Out-File -FilePath compile_output.log
- buildcache --show-stats
- .gitlab\ci\check_warnings.ps1 -BuildPath . # This will call exit in case of warnings
.cmake_build_windows:
stage: build
extends: .warning_policy
script:
- *before_script_windows
- *before_script_windows_deps
- *script_windows
interruptible: true
.cmake_test_windows:
stage: test
script:
- *before_script_windows
- *before_script_windows_deps
# Reuse the venv from the build step (avoids version changes between
# build and testing). This is set up manually because Activate.ps1
# doesn't seem to work for our extracted Python tarball.
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\build\ci-venv\Scripts;$env:PATH"
- Set-Item -Force -Path "env:PYTHONPATH" -Value "$pwdpath\build\ci-venv\Lib\site-packages"
# Some tests run CMake steps, so we need a compiler environment.
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake
interruptible: true
.cmake_test_external_windows:
stage: test-ext
extends: .warning_policy
script:
- *before_script_windows
- *before_script_windows_deps
# Reuse the venv from the build step (avoids version changes between
# build and testing). This is set up manually because Activate.ps1
# doesn't seem to work for our extracted Python tarball.
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\build\ci-venv\Scripts;$env:PATH"
- Set-Item -Force -Path "env:PYTHONPATH" -Value "$pwdpath\build\ci-venv\Lib\site-packages"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\build\install\bin;$env:PATH"
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- ctest -V --output-on-failure -S .gitlab/ci/ctest_test_external.cmake
- .gitlab\ci\check_warnings.ps1 -BuildPath .\Testing\External\ # This will call exit in case of warnings
interruptible: true
.cmake_build_wheel_windows:
stage: build
extends: .warning_policy
script:
- *before_script_windows
- cmake -P .gitlab/ci/download_wheel_python.cmake
- Set-Item -Force -Path "env:PYTHON_PREFIX" -Value "$pwdpath\.gitlab\python"
- Invoke-Expression -Command .gitlab/ci/buildcache.ps1
- Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$pwdpath\.gitlab\buildcache\bin"
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- buildcache --show-stats
- 'if ("$env:EXTRA_PYTHON_PATH" -ne "") { Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$pwdpath\$env:EXTRA_PYTHON_PATH\vtkmodules" }'
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
- ctest -VV -S .gitlab/ci/ctest_build.cmake | Out-File -FilePath compile_output.log
- buildcache --show-stats
- cd build
- Set-Item -Force -Path "env:PATH" -Value "$env:PYTHON_PREFIX;$env:PATH"
- python -m venv venv
- . .\venv\Scripts\Activate.ps1
- pip install setuptools
- pip install wheel
- python setup.py bdist_wheel
- python "$env:GIT_CLONE_PATH\.gitlab\ci\create_wheel_sdk_archive.py"
- pip install delvewheel
- delvewheel show --add-path "bin" (Get-ChildItem dist\*.whl | % FullName) | Out-File -FilePath "$env:GIT_CLONE_PATH\wheel_output.log"
- $no_mangle = (Get-ChildItem -Path ".\bin" -Filter "*.dll" -File -Name) -join ';'
- delvewheel repair --add-path "bin" --no-mangle "$no_mangle" (Get-ChildItem dist\*.whl | % FullName) | Out-File -Append -FilePath "$env:GIT_CLONE_PATH\wheel_output.log"
- Rename-Item -Path dist -NewName dist-orig
- Rename-Item -Path wheelhouse -NewName dist
- cd ..
- .gitlab\ci\check_warnings.ps1 -BuildPath . # This will call exit in case of warnings
interruptible: true
.cmake_test_wheel_windows:
stage: test
script:
- *before_script_windows
- cmake -P .gitlab/ci/download_osmesa_windows.cmake
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\osmesa\bin;$env:PATH"
- cmake -P .gitlab/ci/download_wheel_python.cmake
- Set-Item -Force -Path "env:PYTHON_PREFIX" -Value "$pwdpath\.gitlab\python"
- Set-Item -Force -Path "env:PATH" -Value "$env:PYTHON_PREFIX;$env:PATH"
- python -m venv venv
- . .\venv\Scripts\Activate.ps1
- pip install twine
- twine check (Get-ChildItem build\dist\*.whl | % FullName)
- pip install (Get-ChildItem build\dist\*.whl | % FullName)
- python -c "import vtk"
- if ( "$env:VTK_DISABLE_PYI_TESTING" -ne "1" ) { python -m vtkmodules.generate_pyi --test -p vtkmodules } else { echo "pyi test is disabled." }
- ctest -V --output-on-failure -S .gitlab/ci/ctest_test_external_wheel.cmake
# Verify default render window backend works.
- Set-Item -Force -Path "env:VTK_DEFAULT_OPENGL_WINDOW" -Value ""
- python -c "import vtk; assert(vtk.vtkRenderWindow().GetClassName() == 'vtkWin32OpenGLRenderWindow')"
# Force osmesa render window and verify it worked.
- Set-Item -Force -Path "env:VTK_DEFAULT_OPENGL_WINDOW" -Value "vtkOSOpenGLRenderWindow"
- python -c "import vtk; assert(vtk.vtkRenderWindow().GetClassName() == 'vtkOSOpenGLRenderWindow')"
- .gitlab\ci\check_warnings.ps1 -BuildPath ./Testing/ExternalWheel # This will call exit in case of warnings
interruptible: true
.before_script_windows_emscripten: &before_script_windows_emscripten
- *before_script_windows
- cmake -P .gitlab/ci/download_python.cmake
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python;$env:PATH"
- Set-Item -Force -Path "env:PYTHONHOME" -Value "$pwdpath\.gitlab\python"
# Build and activate the venv
- python -m venv $pwdpath\build\ci-venv
# This may be necessary when running manually.
# Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
- . .\build\ci-venv\Scripts\Activate.ps1
- pip install -qq -r $pwdpath\.gitlab\ci\requirements.txt
- cmake -P .gitlab/ci/download_node.cmake
- Set-Item -Force -Path "env:NODE_DIR" -Value "$pwdpath\.gitlab\node"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\node;$env:PATH"
- node --version
- .gitlab\ci\emsdk.ps1
- .gitlab\emsdk\emsdk.ps1 install latest
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\emsdk\upstream\bin;$env:PATH"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\emsdk\upstream\emscripten;$env:PATH"
- clang --version
- wasm-as --version
- wasm-ld --version
- wasm-opt --version
- emcc --version
.cmake_test_wasm_emscripten_windows_ext:
stage: test-ext
extends: .warning_policy
script:
- *before_script_windows_emscripten
- Invoke-Expression -Command .gitlab/ci/buildcache.ps1
- Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$pwdpath\.gitlab\buildcache\bin"
- buildcache --show-stats
# Fetch chrome-for-testing
- cmake -P .gitlab/ci/download_chrome.cmake
# Reuse the venv from the build step (avoids version changes between
# build and testing). This is set up manually because Activate.ps1
# doesn't seem to work for our extracted Python tarball.
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\build\ci-venv\Scripts;$env:PATH"
- Set-Item -Force -Path "env:PYTHONPATH" -Value "$pwdpath\build\ci-venv\Lib\site-packages"
- Set-Item -Force -Path "env:VTK_TESTING_WASM_ENGINE" -Value "$pwdpath\.gitlab\chrome\chrome.exe"
- ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external_wasm.cmake
- buildcache --show-stats
- powershell -File ".gitlab/ci/terminate_chrome_processes.ps1"
- .gitlab\ci\check_warnings.ps1 -BuildPath .\Testing\ExternalWasm # This will call exit in case of warnings
interruptible: true
.cmake_build_java_windows:
stage: build
extends: .cmake_build_windows
script:
- *before_script_windows
- *before_script_windows_deps
- *before_script_java_windows
- *script_windows