Skip to content

Merge stable 'v1.0.x' into 'main' #1452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 120 additions & 68 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,34 @@ jobs:
with:
fetch-depth: 0

- name: Set VCPKG_PATH without hwloc
if: matrix.static_hwloc == 'ON'
run: echo "VCPKG_PATH=${{env.VCPKG_PATH_NO_HWLOC}}" >> $env:GITHUB_ENV
- name: Restore vcpkg cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: vcpkg_pkgs_cache.zip
key: vcpkg-generators-windows-latest-${{ hashFiles('vcpkg.json') }}

- name: Unpack vcpkg cache
if: steps.cache.outputs.cache-hit == 'true'
run: |
Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force

- name: Initialize vcpkg
if: steps.cache.outputs.cache-hit != 'true'
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'

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

- name: Set VCPKG_PATH without hwloc
if: matrix.static_hwloc == 'ON'
run: echo "VCPKG_PATH=${{env.VCPKG_PATH_NO_HWLOC}}" >> $env:GITHUB_ENV

- name: Install Ninja
if: matrix.generator == 'Ninja'
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
Expand Down Expand Up @@ -222,6 +236,18 @@ jobs:
working-directory: ${{github.workspace}}/examples/fetch_content/build
run: ctest -V

- name: Prepare vcpkg cache
if: steps.cache.outputs.cache-hit != 'true'
run: |
Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest

- name: Save vcpkg cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{github.workspace}}/vcpkg_pkgs_cache.zip
key: ${{ steps.cache.outputs.cache-primary-key }}

# Build and test UMF with Intel C++ Compiler (ICX) on Windows
Windows-icx:
env:
Expand All @@ -241,71 +267,97 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Initialize vcpkg
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'

- name: Install dependencies
run: vcpkg install --triplet x64-windows

- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6

- name: Download icx compiler
env:
# Link source: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html
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"
run: |
Invoke-WebRequest -Uri "${{ env.CMPLR_LINK }}" -OutFile compiler_install.exe

- name: Install icx compiler
shell: cmd
run: |
start /b /wait .\compiler_install.exe -s -x -f extracted --log extract.log
extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 ^
-p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.

- name: Configure build
shell: cmd
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
cmake ^
-B ${{env.BUILD_DIR}} ^
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" ^
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} ^
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} ^
-G Ninja ^
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} ^
-DUMF_FORMAT_CODE_STYLE=OFF ^
-DUMF_DEVELOPER_MODE=ON ^
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON ^
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON ^
-DUMF_BUILD_CUDA_PROVIDER=ON ^
-DUMF_TESTS_FAIL_ON_SKIP=ON

- name: Build UMF
shell: cmd
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%

- name: Run tests
shell: cmd
working-directory: ${{env.BUILD_DIR}}
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Restore vcpkg cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: vcpkg_pkgs_cache.zip
key: vcpkg-icx-${{matrix.os}}-${{ hashFiles('vcpkg.json') }}

- name: Unpack vcpkg cache
if: steps.cache.outputs.cache-hit == 'true'
run: |
Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force

- name: Initialize vcpkg
if: steps.cache.outputs.cache-hit != 'true'
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'

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

- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6

- name: Download icx compiler
env:
# Link source: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html
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"
run: |
Invoke-WebRequest -Uri "${{ env.CMPLR_LINK }}" -OutFile compiler_install.exe

- name: Install icx compiler
shell: cmd
run: |
start /b /wait .\compiler_install.exe -s -x -f extracted --log extract.log
extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 ^
-p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.

- name: Configure build
shell: cmd
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
cmake ^
-B ${{env.BUILD_DIR}} ^
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" ^
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} ^
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} ^
-G Ninja ^
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} ^
-DUMF_FORMAT_CODE_STYLE=OFF ^
-DUMF_DEVELOPER_MODE=ON ^
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON ^
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON ^
-DUMF_BUILD_CUDA_PROVIDER=ON ^
-DUMF_TESTS_FAIL_ON_SKIP=ON

- name: Build UMF
shell: cmd
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%

- name: Run tests
shell: cmd
working-directory: ${{env.BUILD_DIR}}
run: |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test

- name: Prepare vcpkg cache
if: steps.cache.outputs.cache-hit != 'true'
run: |
Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest

- name: Save vcpkg cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{github.workspace}}/vcpkg_pkgs_cache.zip
key: ${{ steps.cache.outputs.cache-primary-key }}

# Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
# The hwloc library is fetched implicitly
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pr_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ jobs:
security-events: write
uses: ./.github/workflows/reusable_trivy.yml
Compatibility:
# TODO: bring back when new UMF version is ready
if: false
needs: [Build]
uses: ./.github/workflows/reusable_compatibility.yml
strategy:
matrix:
tag: ["v1.0.0-rc1"]
tag: ["v1.0.0"]
with:
tag: ${{matrix.tag}}
35 changes: 30 additions & 5 deletions .github/workflows/reusable_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,27 +285,40 @@ jobs:
with:
arch: x64

- name: Restore vcpkg cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: vcpkg_pkgs_cache.zip
key: vcpkg-basic-${{matrix.os}}-${{ hashFiles('vcpkg.json') }}

- name: Unpack vcpkg cache
if: steps.cache.outputs.cache-hit == 'true'
run: |
Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{github.workspace}}/vcpkg -Force

- name: Initialize vcpkg
if: steps.cache.outputs.cache-hit != 'true'
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
vcpkgDirectory: ${{github.workspace}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'

# Install the dependencies and add the bin folders to the PATH for older
# versions of CMake to correctly locate the libraries
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: vcpkg install --triplet x64-windows

# Older versions of CMake require this step to correctly locate dependencies
- name: Add vcpkg bin dirs to PATH
run: |
vcpkg install --triplet x64-windows
$env:Path = "${{env.VCPKG_PATH_BIN}};$env:Path"
echo "PATH=$env:Path" >> $env:GITHUB_ENV
shell: pwsh

- name: Get UMF version
run: |
$version = (git describe --tags --abbrev=0 | Select-String -Pattern '\d+\.\d+\.\d+').Matches.Value
echo "UMF_VERSION=$version" >> $env:GITHUB_ENV
shell: pwsh

- name: Configure build (Debug)
run: >
Expand Down Expand Up @@ -416,6 +429,18 @@ jobs:
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll
shell: pwsh

- name: Prepare vcpkg cache
if: steps.cache.outputs.cache-hit != 'true'
run: |
Compress-Archive -Path ${{github.workspace}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest

- name: Save vcpkg cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{github.workspace}}/vcpkg_pkgs_cache.zip
key: ${{ steps.cache.outputs.cache-primary-key }}

windows-dynamic_build_hwloc:
name: "Windows dynamic UMF + static hwloc"
strategy:
Expand Down
37 changes: 32 additions & 5 deletions .github/workflows/reusable_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,34 @@ jobs:
languages: cpp
trap-caching: false

- name: "[Win] Initialize vcpkg"
- name: "[Win] Restore vcpkg cache"
if: matrix.os == 'windows-latest'
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: vcpkg_pkgs_cache.zip
key: vcpkg-codeql-${{matrix.os}}-${{ hashFiles('vcpkg.json') }}

- name: "[Win] Unpack vcpkg cache"
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit == 'true'
run: |
Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force

- name: "[Win] Initialize vcpkg"
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'

- name: "[Win] Install dependencies"
- name: "[Win] Install vcpkg dependencies"
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
run: vcpkg install --triplet x64-windows

- name: "[Win] Install Python requirements"
if: matrix.os == 'windows-latest'
run: |
vcpkg install --triplet x64-windows
python3 -m pip install -r third_party/requirements.txt
run: python3 -m pip install -r third_party/requirements.txt

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3

- name: "[Win] Prepare vcpkg cache"
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
run: |
Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg/packages -DestinationPath ${{github.workspace}}/vcpkg_pkgs_cache.zip -Force -CompressionLevel Fastest

- name: "[Win] Save vcpkg cache"
if: matrix.os == 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{github.workspace}}/vcpkg_pkgs_cache.zip
key: ${{ steps.cache.outputs.cache-primary-key }}
Loading