Skip to content

Commit 3c015d4

Browse files
authored
Merge pull request #1452 from lukaszstolarczuk/merge-stable-v1.0.x-into-main
Merge stable 'v1.0.x' into 'main'
2 parents 038fd72 + 55bdb16 commit 3c015d4

20 files changed

+735
-118
lines changed

.github/workflows/nightly.yml

Lines changed: 120 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,34 @@ jobs:
130130
with:
131131
fetch-depth: 0
132132

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
136144
137145
- name: Initialize vcpkg
146+
if: steps.cache.outputs.cache-hit != 'true'
138147
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
139148
with:
140149
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
141150
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
142151
vcpkgJsonGlob: '**/vcpkg.json'
143152

144153
- name: Install dependencies
154+
if: steps.cache.outputs.cache-hit != 'true'
145155
run: vcpkg install --triplet x64-windows
146156

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+
147161
- name: Install Ninja
148162
if: matrix.generator == 'Ninja'
149163
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
@@ -222,6 +236,18 @@ jobs:
222236
working-directory: ${{github.workspace}}/examples/fetch_content/build
223237
run: ctest -V
224238

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+
225251
# Build and test UMF with Intel C++ Compiler (ICX) on Windows
226252
Windows-icx:
227253
env:
@@ -241,71 +267,97 @@ jobs:
241267
runs-on: ${{matrix.os}}
242268

243269
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 }}
309361

310362
# Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
311363
# The hwloc library is fetched implicitly

.github/workflows/pr_push.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,10 @@ jobs:
9595
security-events: write
9696
uses: ./.github/workflows/reusable_trivy.yml
9797
Compatibility:
98-
# TODO: bring back when new UMF version is ready
99-
if: false
10098
needs: [Build]
10199
uses: ./.github/workflows/reusable_compatibility.yml
102100
strategy:
103101
matrix:
104-
tag: ["v1.0.0-rc1"]
102+
tag: ["v1.0.0"]
105103
with:
106104
tag: ${{matrix.tag}}

.github/workflows/reusable_basic.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,27 +285,40 @@ jobs:
285285
with:
286286
arch: x64
287287

288+
- name: Restore vcpkg cache
289+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
290+
id: cache
291+
with:
292+
path: vcpkg_pkgs_cache.zip
293+
key: vcpkg-basic-${{matrix.os}}-${{ hashFiles('vcpkg.json') }}
294+
295+
- name: Unpack vcpkg cache
296+
if: steps.cache.outputs.cache-hit == 'true'
297+
run: |
298+
Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{github.workspace}}/vcpkg -Force
299+
288300
- name: Initialize vcpkg
301+
if: steps.cache.outputs.cache-hit != 'true'
289302
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
290303
with:
291304
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
292305
vcpkgDirectory: ${{github.workspace}}/vcpkg
293306
vcpkgJsonGlob: '**/vcpkg.json'
294307

295-
# Install the dependencies and add the bin folders to the PATH for older
296-
# versions of CMake to correctly locate the libraries
297308
- name: Install dependencies
309+
if: steps.cache.outputs.cache-hit != 'true'
310+
run: vcpkg install --triplet x64-windows
311+
312+
# Older versions of CMake require this step to correctly locate dependencies
313+
- name: Add vcpkg bin dirs to PATH
298314
run: |
299-
vcpkg install --triplet x64-windows
300315
$env:Path = "${{env.VCPKG_PATH_BIN}};$env:Path"
301316
echo "PATH=$env:Path" >> $env:GITHUB_ENV
302-
shell: pwsh
303317
304318
- name: Get UMF version
305319
run: |
306320
$version = (git describe --tags --abbrev=0 | Select-String -Pattern '\d+\.\d+\.\d+').Matches.Value
307321
echo "UMF_VERSION=$version" >> $env:GITHUB_ENV
308-
shell: pwsh
309322
310323
- name: Configure build (Debug)
311324
run: >
@@ -416,6 +429,18 @@ jobs:
416429
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll
417430
shell: pwsh
418431

432+
- name: Prepare vcpkg cache
433+
if: steps.cache.outputs.cache-hit != 'true'
434+
run: |
435+
Compress-Archive -Path ${{github.workspace}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest
436+
437+
- name: Save vcpkg cache
438+
if: steps.cache.outputs.cache-hit != 'true'
439+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
440+
with:
441+
path: ${{github.workspace}}/vcpkg_pkgs_cache.zip
442+
key: ${{ steps.cache.outputs.cache-primary-key }}
443+
419444
windows-dynamic_build_hwloc:
420445
name: "Windows dynamic UMF + static hwloc"
421446
strategy:

.github/workflows/reusable_codeql.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,34 @@ jobs:
4646
languages: cpp
4747
trap-caching: false
4848

49-
- name: "[Win] Initialize vcpkg"
49+
- name: "[Win] Restore vcpkg cache"
5050
if: matrix.os == 'windows-latest'
51+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
52+
id: cache
53+
with:
54+
path: vcpkg_pkgs_cache.zip
55+
key: vcpkg-codeql-${{matrix.os}}-${{ hashFiles('vcpkg.json') }}
56+
57+
- name: "[Win] Unpack vcpkg cache"
58+
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit == 'true'
59+
run: |
60+
Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force
61+
62+
- name: "[Win] Initialize vcpkg"
63+
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
5164
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
5265
with:
5366
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
5467
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
5568
vcpkgJsonGlob: '**/vcpkg.json'
5669

57-
- name: "[Win] Install dependencies"
70+
- name: "[Win] Install vcpkg dependencies"
71+
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
72+
run: vcpkg install --triplet x64-windows
73+
74+
- name: "[Win] Install Python requirements"
5875
if: matrix.os == 'windows-latest'
59-
run: |
60-
vcpkg install --triplet x64-windows
61-
python3 -m pip install -r third_party/requirements.txt
76+
run: python3 -m pip install -r third_party/requirements.txt
6277

6378
- name: "[Lin] Install apt packages"
6479
if: matrix.os == 'ubuntu-latest'
@@ -94,3 +109,15 @@ jobs:
94109

95110
- name: Perform CodeQL Analysis
96111
uses: github/codeql-action/analyze@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
112+
113+
- name: "[Win] Prepare vcpkg cache"
114+
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
115+
run: |
116+
Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest
117+
118+
- name: "[Win] Save vcpkg cache"
119+
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
120+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
121+
with:
122+
path: ${{github.workspace}}/vcpkg_pkgs_cache.zip
123+
key: ${{ steps.cache.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)