@@ -130,20 +130,34 @@ jobs:
130
130
with :
131
131
fetch-depth : 0
132
132
133
- - name : Set VCPKG_PATH without hwloc
134
- if : matrix.static_hwloc == 'ON'
135
- run : echo "VCPKG_PATH=${{env.VCPKG_PATH_NO_HWLOC}}" >> $env:GITHUB_ENV
133
+ - name : Restore vcpkg cache
134
+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
135
+ id : cache
136
+ with :
137
+ path : vcpkg_pkgs_cache.zip
138
+ key : vcpkg-generators-windows-latest-${{ hashFiles('vcpkg.json') }}
139
+
140
+ - name : Unpack vcpkg cache
141
+ if : steps.cache.outputs.cache-hit == 'true'
142
+ run : |
143
+ Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force
136
144
137
145
- name : Initialize vcpkg
146
+ if : steps.cache.outputs.cache-hit != 'true'
138
147
uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
139
148
with :
140
149
vcpkgGitCommitId : ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
141
150
vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
142
151
vcpkgJsonGlob : ' **/vcpkg.json'
143
152
144
153
- name : Install dependencies
154
+ if : steps.cache.outputs.cache-hit != 'true'
145
155
run : vcpkg install --triplet x64-windows
146
156
157
+ - name : Set VCPKG_PATH without hwloc
158
+ if : matrix.static_hwloc == 'ON'
159
+ run : echo "VCPKG_PATH=${{env.VCPKG_PATH_NO_HWLOC}}" >> $env:GITHUB_ENV
160
+
147
161
- name : Install Ninja
148
162
if : matrix.generator == 'Ninja'
149
163
uses : seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
@@ -222,6 +236,18 @@ jobs:
222
236
working-directory : ${{github.workspace}}/examples/fetch_content/build
223
237
run : ctest -V
224
238
239
+ - name : Prepare vcpkg cache
240
+ if : steps.cache.outputs.cache-hit != 'true'
241
+ run : |
242
+ Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest
243
+
244
+ - name : Save vcpkg cache
245
+ if : steps.cache.outputs.cache-hit != 'true'
246
+ uses : actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
247
+ with :
248
+ path : ${{github.workspace}}/vcpkg_pkgs_cache.zip
249
+ key : ${{ steps.cache.outputs.cache-primary-key }}
250
+
225
251
# Build and test UMF with Intel C++ Compiler (ICX) on Windows
226
252
Windows-icx :
227
253
env :
@@ -241,71 +267,97 @@ jobs:
241
267
runs-on : ${{matrix.os}}
242
268
243
269
steps :
244
- - name : Checkout
245
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
246
- with :
247
- fetch-depth : 0
248
-
249
- - name : Initialize vcpkg
250
- uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
251
- with :
252
- vcpkgGitCommitId : ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
253
- vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
254
- vcpkgJsonGlob : ' **/vcpkg.json'
255
-
256
- - name : Install dependencies
257
- run : vcpkg install --triplet x64-windows
258
-
259
- - name : Install Ninja
260
- uses : seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
261
-
262
- - name : Download icx compiler
263
- env :
264
- # Link source: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html
265
- CMPLR_LINK : " https://registrationcenter-download.intel.com/akdlm/IRC_NAS/15a35578-2f9a-4f39-804b-3906e0a5f8fc/w_dpcpp-cpp-compiler_p_2024.2.1.83_offline.exe"
266
- run : |
267
- Invoke-WebRequest -Uri "${{ env.CMPLR_LINK }}" -OutFile compiler_install.exe
268
-
269
- - name : Install icx compiler
270
- shell : cmd
271
- run : |
272
- start /b /wait .\compiler_install.exe -s -x -f extracted --log extract.log
273
- extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 ^
274
- -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.
275
-
276
- - name : Configure build
277
- shell : cmd
278
- run : |
279
- call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
280
- call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
281
- cmake ^
282
- -B ${{env.BUILD_DIR}} ^
283
- -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" ^
284
- -DCMAKE_C_COMPILER=${{matrix.compiler.c}} ^
285
- -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} ^
286
- -G Ninja ^
287
- -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} ^
288
- -DUMF_FORMAT_CODE_STYLE=OFF ^
289
- -DUMF_DEVELOPER_MODE=ON ^
290
- -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON ^
291
- -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON ^
292
- -DUMF_BUILD_CUDA_PROVIDER=ON ^
293
- -DUMF_TESTS_FAIL_ON_SKIP=ON
294
-
295
- - name : Build UMF
296
- shell : cmd
297
- run : |
298
- call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
299
- call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
300
- cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%
301
-
302
- - name : Run tests
303
- shell : cmd
304
- working-directory : ${{env.BUILD_DIR}}
305
- run : |
306
- call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
307
- call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
308
- ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
270
+ - name : Checkout
271
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
272
+ with :
273
+ fetch-depth : 0
274
+
275
+ - name : Restore vcpkg cache
276
+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
277
+ id : cache
278
+ with :
279
+ path : vcpkg_pkgs_cache.zip
280
+ key : vcpkg-icx-${{matrix.os}}-${{ hashFiles('vcpkg.json') }}
281
+
282
+ - name : Unpack vcpkg cache
283
+ if : steps.cache.outputs.cache-hit == 'true'
284
+ run : |
285
+ Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force
286
+
287
+ - name : Initialize vcpkg
288
+ if : steps.cache.outputs.cache-hit != 'true'
289
+ uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
290
+ with :
291
+ vcpkgGitCommitId : ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
292
+ vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
293
+ vcpkgJsonGlob : ' **/vcpkg.json'
294
+
295
+ - name : Install dependencies
296
+ if : steps.cache.outputs.cache-hit != 'true'
297
+ run : vcpkg install --triplet x64-windows
298
+
299
+ - name : Install Ninja
300
+ uses : seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
301
+
302
+ - name : Download icx compiler
303
+ env :
304
+ # Link source: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html
305
+ CMPLR_LINK : " https://registrationcenter-download.intel.com/akdlm/IRC_NAS/15a35578-2f9a-4f39-804b-3906e0a5f8fc/w_dpcpp-cpp-compiler_p_2024.2.1.83_offline.exe"
306
+ run : |
307
+ Invoke-WebRequest -Uri "${{ env.CMPLR_LINK }}" -OutFile compiler_install.exe
308
+
309
+ - name : Install icx compiler
310
+ shell : cmd
311
+ run : |
312
+ start /b /wait .\compiler_install.exe -s -x -f extracted --log extract.log
313
+ extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 ^
314
+ -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.
315
+
316
+ - name : Configure build
317
+ shell : cmd
318
+ run : |
319
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
320
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
321
+ cmake ^
322
+ -B ${{env.BUILD_DIR}} ^
323
+ -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" ^
324
+ -DCMAKE_C_COMPILER=${{matrix.compiler.c}} ^
325
+ -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} ^
326
+ -G Ninja ^
327
+ -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} ^
328
+ -DUMF_FORMAT_CODE_STYLE=OFF ^
329
+ -DUMF_DEVELOPER_MODE=ON ^
330
+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON ^
331
+ -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON ^
332
+ -DUMF_BUILD_CUDA_PROVIDER=ON ^
333
+ -DUMF_TESTS_FAIL_ON_SKIP=ON
334
+
335
+ - name : Build UMF
336
+ shell : cmd
337
+ run : |
338
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
339
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
340
+ cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%
341
+
342
+ - name : Run tests
343
+ shell : cmd
344
+ working-directory : ${{env.BUILD_DIR}}
345
+ run : |
346
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
347
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
348
+ ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
349
+
350
+ - name : Prepare vcpkg cache
351
+ if : steps.cache.outputs.cache-hit != 'true'
352
+ run : |
353
+ Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest
354
+
355
+ - name : Save vcpkg cache
356
+ if : steps.cache.outputs.cache-hit != 'true'
357
+ uses : actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
358
+ with :
359
+ path : ${{github.workspace}}/vcpkg_pkgs_cache.zip
360
+ key : ${{ steps.cache.outputs.cache-primary-key }}
309
361
310
362
# Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
311
363
# The hwloc library is fetched implicitly
0 commit comments