From 312b836c819f80e0ffb7c3af7181d9f0b5d3e58e Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Mon, 20 Jul 2026 17:11:01 +0200 Subject: [PATCH 1/7] [CI] Add docker containers for Linux GPU jobs To have access to latest drivers and packages --- .github/workflows/reusable_gpu.yml | 198 +++---------------------- .github/workflows/reusable_gpu_lin.yml | 178 ++++++++++++++++++++++ .github/workflows/reusable_gpu_win.yml | 168 +++++++++++++++++++++ 3 files changed, 365 insertions(+), 179 deletions(-) create mode 100644 .github/workflows/reusable_gpu_lin.yml create mode 100644 .github/workflows/reusable_gpu_win.yml diff --git a/.github/workflows/reusable_gpu.yml b/.github/workflows/reusable_gpu.yml index 108347f6c..b2388f9df 100644 --- a/.github/workflows/reusable_gpu.yml +++ b/.github/workflows/reusable_gpu.yml @@ -1,5 +1,10 @@ # This workflow builds and tests providers using GPU memory. It requires properly # labelled self-hosted runners on systems with the correct GPU and drivers. +# +# It starts jobs for both Windows and Linux runners - it's only a thin wrapper for +# the OS-specific workflows. It's better to call them twice here, instead of +# duplicating two workflow calls in the PR/push workflow, for each tested device. +# name: GPU on: @@ -13,10 +18,6 @@ on: description: Runner name (without 'DSS-' prefix) type: string required: true - os: - description: A list of OSes - type: string - default: "['Ubuntu', 'Windows']" shared_lib: description: A list of options for building shared library type: string @@ -25,181 +26,20 @@ on: permissions: contents: read -env: - BUILD_DEBUG_DIR : "${{github.workspace}}/debug/build" - BUILD_RELEASE_DIR : "${{github.workspace}}/release/build" - INSTL_DEBUG_DIR : "${{github.workspace}}/debug/install-dir" - INSTL_RELEASE_DIR : "${{github.workspace}}/release/install-dir" - COVERAGE_DIR : "${{github.workspace}}/coverage" - jobs: - gpu: - env: - VCPKG_PATH: "${{github.workspace}}/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows;" - COVERAGE_NAME : "exports-coverage-${{inputs.provider}}-${{inputs.runner}}" + win: # run only on upstream; forks will not have the HW if: github.repository == 'oneapi-src/unified-memory-framework' - strategy: - fail-fast: false - matrix: - shared_library: ${{ fromJSON(inputs.shared_lib)}} - os: ${{ fromJSON(inputs.os)}} - name: GPU (${{matrix.os}}, shared=${{matrix.shared_library}}) - runs-on: ["DSS-${{inputs.runner}}", "DSS-${{matrix.os}}"] - - steps: - # Set various build params based on OS - - name: "[Win] Establish build params" - if : ${{ matrix.os == 'Windows' }} - run: | - echo "C_COMPILER=cl" >> $env:GITHUB_ENV - echo "CXX_COMPILER=cl" >> $env:GITHUB_ENV - echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $env:GITHUB_ENV - echo "EXTRA_CMAKE_PATH=$Env:CUDA_PATH" >> $env:GITHUB_ENV - - - name: "[Lin] Establish build params" - if : ${{ matrix.os == 'Ubuntu' }} - run: | - echo "C_COMPILER=gcc" >> $GITHUB_ENV - echo "CXX_COMPILER=g++" >> $GITHUB_ENV - echo "PROCS=$(nproc)" >> $GITHUB_ENV - - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - fetch-depth: 0 - - - name: "[Lin] Get information about platform" - if: matrix.os == 'Ubuntu' - run: .github/scripts/get_system_info.sh - - - name: "[Win] Restore vcpkg cache" - if: matrix.os == 'Windows' - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - id: cache - with: - path: vcpkg_pkgs_cache.zip - key: vcpkg-gpu-${{inputs.runner}}-windows-${{ hashFiles('vcpkg.json') }} - - - name: "[Win] Unpack vcpkg cache" - if: matrix.os == 'Windows' && steps.cache.outputs.cache-hit == 'true' - run: | - Expand-Archive -Path ${{github.workspace}}/vcpkg_pkgs_cache.zip -DestinationPath ${{github.workspace}}/vcpkg -Force - - - name: "[Win] Initialize vcpkg" - if: matrix.os == 'Windows' && steps.cache.outputs.cache-hit != 'true' - uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6 - with: - vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025 - vcpkgDirectory: ${{github.workspace}}/vcpkg - vcpkgJsonGlob: '**/vcpkg.json' - - - name: "[Win] Install dependencies" - if: matrix.os == 'Windows' && steps.cache.outputs.cache-hit != 'true' - env: - VCPKG_BINARY_SOURCES: clear - run: vcpkg install --triplet x64-windows - - # note: disable all providers except the one being tested - # '-DCMAKE_SUPPRESS_REGENERATION=ON' is the WA for the error: "CUSTOMBUILD : CMake error : Cannot restore timestamp" - - name: Configure build (Debug) - run: > - cmake - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" - -B ${{env.BUILD_DEBUG_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DEBUG_DIR}}" - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_C_COMPILER=${{env.C_COMPILER}} - -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DUMF_BUILD_BENCHMARKS=ON - -DUMF_BUILD_BENCHMARKS_MT=ON - -DUMF_BUILD_TESTS=ON - -DUMF_BUILD_GPU_TESTS=ON - -DUMF_BUILD_GPU_EXAMPLES=ON - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_CUDA_PROVIDER=OFF - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF - -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - ${{ matrix.os == 'Ubuntu' && '-DUMF_USE_COVERAGE=ON' || '' }} - ${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }} - - - name: Build UMF (Debug) - run: cmake --build ${{env.BUILD_DEBUG_DIR}} --config Debug -j ${{env.PROCS}} - - - name: Run tests (Debug) - working-directory: ${{env.BUILD_DEBUG_DIR}} - run: ctest -C Debug --output-on-failure --test-dir test - - - name: Run examples (Debug) - working-directory: ${{env.BUILD_DEBUG_DIR}} - run: ctest --output-on-failure --test-dir examples -C Debug - - - name: Configure build (Release) - run: > - cmake - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" - -B ${{env.BUILD_RELEASE_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_RELEASE_DIR}}" - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_C_COMPILER=${{env.C_COMPILER}} - -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DUMF_BUILD_BENCHMARKS=ON - -DUMF_BUILD_BENCHMARKS_MT=ON - -DUMF_BUILD_TESTS=ON - -DUMF_BUILD_GPU_TESTS=ON - -DUMF_BUILD_GPU_EXAMPLES=ON - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_CUDA_PROVIDER=OFF - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF - -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - ${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }} - - - name: Build UMF (Release) - run: cmake --build ${{env.BUILD_RELEASE_DIR}} --config Release -j ${{env.PROCS}} - - - name: Run tests (Release) - working-directory: ${{env.BUILD_RELEASE_DIR}} - run: ctest -C Release --output-on-failure --test-dir test - - - name: Run examples (Release) - working-directory: ${{env.BUILD_RELEASE_DIR}} - run: ctest --output-on-failure --test-dir examples -C Release - - - name: Run benchmarks (Release) - working-directory: ${{env.BUILD_RELEASE_DIR}} - run: ctest --output-on-failure --test-dir benchmark -C Release --exclude-regex umf-multithreaded - - - name: "[Lin] Check coverage (Debug)" - if: ${{ matrix.os == 'Ubuntu' }} - working-directory: ${{env.BUILD_DEBUG_DIR}} - run: | - export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} - echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME" - ${{github.workspace}}/scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME - mkdir -p ${{env.COVERAGE_DIR}} - mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}} - - - name: "[Lin] Upload coverage" - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ matrix.os == 'Ubuntu' }} - with: - name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} - path: ${{env.COVERAGE_DIR}} - - - name: "[Win] Prepare vcpkg cache" - if: matrix.os == 'Windows' && 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: "[Win] Save vcpkg cache" - if: matrix.os == 'Windows' && steps.cache.outputs.cache-hit != 'true' - uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: ${{github.workspace}}/vcpkg_pkgs_cache.zip - key: ${{ steps.cache.outputs.cache-primary-key }} + uses: ./.github/workflows/reusable_gpu_win.yml + with: + provider: ${{ inputs.provider }} + runner: ${{ inputs.runner }} + shared_lib: ${{ inputs.shared_lib }} + lin: + # run only on upstream; forks will not have the HW + if: github.repository == 'oneapi-src/unified-memory-framework' + uses: ./.github/workflows/reusable_gpu_lin.yml + with: + provider: ${{ inputs.provider }} + runner: ${{ inputs.runner }} + shared_lib: ${{ inputs.shared_lib }} diff --git a/.github/workflows/reusable_gpu_lin.yml b/.github/workflows/reusable_gpu_lin.yml new file mode 100644 index 000000000..5d66206bc --- /dev/null +++ b/.github/workflows/reusable_gpu_lin.yml @@ -0,0 +1,178 @@ +# This workflow builds and tests providers using GPU memory. It requires properly +# labelled self-hosted runners on systems with the correct GPU and drivers. +# +# Linux runners, using docker containers. +# +name: "[Lin] GPU" + +on: + workflow_call: + inputs: + provider: + description: Provider name + type: string + required: true + runner: + description: Runner name (without 'DSS-' prefix) + type: string + required: true + shared_lib: + description: A list of options for building shared library + type: string + default: "['ON', 'OFF']" + +permissions: + contents: read + +env: + BUILD_DEBUG_DIR : "${{github.workspace}}/debug/build" + BUILD_RELEASE_DIR : "${{github.workspace}}/release/build" + INSTL_DEBUG_DIR : "${{github.workspace}}/debug/install-dir" + INSTL_RELEASE_DIR : "${{github.workspace}}/release/install-dir" + COVERAGE_DIR : "${{github.workspace}}/coverage" + +jobs: + gpu: + env: + COVERAGE_NAME : "exports-coverage-${{inputs.provider}}-${{inputs.runner}}" + strategy: + fail-fast: false + matrix: + shared_library: ${{ fromJSON(inputs.shared_lib)}} + name: GPU (Lin, shared=${{matrix.shared_library}}) + runs-on: ["DSS-${{inputs.runner}}", "DSS-Ubuntu"] + container: + image: intel/oneapi:2026.1.0-devel-ubuntu26.04 # intel/oneapi:2025.3.1-0-devel-ubuntu24.04 + options: >- + --device=/dev/dri + credentials: + username: urbuildbot + password: ${{ secrets.GH_BB_DOCKER_TOKEN }} + + steps: + - name: "Establish build params" + run: | + echo "C_COMPILER=gcc" >> $GITHUB_ENV + echo "CXX_COMPILER=g++" >> $GITHUB_ENV + echo "PROCS=$(nproc)" >> $GITHUB_ENV + + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + fetch-depth: 0 + + # - name: Install drivers + # run: | + # # extra proxy inherited to docker has to be removed + # unset no_proxy + # unset NO_PROXY + + # add-apt-repository -y ppa:kobuk-team/intel-graphics + # apt-get update + # apt-get install -y \ + # clinfo \ + # intel-gsc \ + # intel-media-va-driver-non-free \ + # intel-metrics-discovery \ + # intel-ocloc \ + # intel-opencl-icd \ + # libmfx-gen1 \ + # libva-glx2 \ + # libvpl2 \ + # libvpl-tools \ + # libze1 \ + # libze-dev \ + # libze-intel-gpu1 \ + # software-properties-common \ + # va-driver-all \ + # vainfo + + - name: "Get information about platform" + run: .github/scripts/get_system_info.sh + + # note: disable all providers except the one being tested + - name: Configure build (Debug) + run: > + cmake + -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" + -B ${{env.BUILD_DEBUG_DIR}} + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DEBUG_DIR}}" + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_C_COMPILER=${{env.C_COMPILER}} + -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} + -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} + -DUMF_BUILD_BENCHMARKS=ON + -DUMF_BUILD_BENCHMARKS_MT=ON + -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_GPU_TESTS=ON + -DUMF_BUILD_GPU_EXAMPLES=ON + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + -DUMF_BUILD_CUDA_PROVIDER=OFF + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF + -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON + -DUMF_TESTS_FAIL_ON_SKIP=ON + -DUMF_USE_COVERAGE=ON + + - name: Build UMF (Debug) + run: cmake --build ${{env.BUILD_DEBUG_DIR}} --config Debug -j ${{env.PROCS}} + + - name: Run tests (Debug) + working-directory: ${{env.BUILD_DEBUG_DIR}} + run: ctest -C Debug --output-on-failure --test-dir test + + - name: Run examples (Debug) + working-directory: ${{env.BUILD_DEBUG_DIR}} + run: ctest --output-on-failure --test-dir examples -C Debug + + - name: Configure build (Release) + run: > + cmake + -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" + -B ${{env.BUILD_RELEASE_DIR}} + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_RELEASE_DIR}}" + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_C_COMPILER=${{env.C_COMPILER}} + -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} + -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} + -DUMF_BUILD_BENCHMARKS=ON + -DUMF_BUILD_BENCHMARKS_MT=ON + -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_GPU_TESTS=ON + -DUMF_BUILD_GPU_EXAMPLES=ON + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + -DUMF_BUILD_CUDA_PROVIDER=OFF + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF + -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON + -DUMF_TESTS_FAIL_ON_SKIP=ON + + - name: Build UMF (Release) + run: cmake --build ${{env.BUILD_RELEASE_DIR}} --config Release -j ${{env.PROCS}} + + - name: Run tests (Release) + working-directory: ${{env.BUILD_RELEASE_DIR}} + run: ctest -C Release --output-on-failure --test-dir test + + - name: Run examples (Release) + working-directory: ${{env.BUILD_RELEASE_DIR}} + run: ctest --output-on-failure --test-dir examples -C Release + + - name: Run benchmarks (Release) + working-directory: ${{env.BUILD_RELEASE_DIR}} + run: ctest --output-on-failure --test-dir benchmark -C Release --exclude-regex umf-multithreaded + + - name: "Check coverage (Debug)" + working-directory: ${{env.BUILD_DEBUG_DIR}} + run: | + export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} + echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME" + ${{github.workspace}}/scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME + mkdir -p ${{env.COVERAGE_DIR}} + mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}} + + - name: "Upload coverage" + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} + path: ${{env.COVERAGE_DIR}} diff --git a/.github/workflows/reusable_gpu_win.yml b/.github/workflows/reusable_gpu_win.yml new file mode 100644 index 000000000..aa5b5cf89 --- /dev/null +++ b/.github/workflows/reusable_gpu_win.yml @@ -0,0 +1,168 @@ +# This workflow builds and tests providers using GPU memory. It requires properly +# labelled self-hosted runners on systems with the correct GPU and drivers. +# +# Windows runners. +# +name: "[Win] GPU" + +on: + workflow_call: + inputs: + provider: + description: Provider name + type: string + required: true + runner: + description: Runner name (without 'DSS-' prefix) + type: string + required: true + shared_lib: + description: A list of options for building shared library + type: string + default: "['ON', 'OFF']" + +permissions: + contents: read + +env: + BUILD_DEBUG_DIR : "${{github.workspace}}/debug/build" + BUILD_RELEASE_DIR : "${{github.workspace}}/release/build" + INSTL_DEBUG_DIR : "${{github.workspace}}/debug/install-dir" + INSTL_RELEASE_DIR : "${{github.workspace}}/release/install-dir" + +jobs: + gpu: + env: + VCPKG_PATH: "${{github.workspace}}/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows;" + strategy: + fail-fast: false + matrix: + shared_library: ${{ fromJSON(inputs.shared_lib)}} + name: GPU (Win, shared=${{matrix.shared_library}}) + runs-on: ["DSS-${{inputs.runner}}", "DSS-Windows"] + + steps: + # Set various build params based on OS + - name: "Establish build params" + run: | + echo "C_COMPILER=cl" >> $env:GITHUB_ENV + echo "CXX_COMPILER=cl" >> $env:GITHUB_ENV + echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $env:GITHUB_ENV + echo "EXTRA_CMAKE_PATH=$Env:CUDA_PATH" >> $env:GITHUB_ENV + + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + fetch-depth: 0 + + - name: "Restore vcpkg cache" + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + id: cache + with: + path: vcpkg_pkgs_cache.zip + key: vcpkg-gpu-${{inputs.runner}}-windows-${{ 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@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6 + with: + vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025 + vcpkgDirectory: ${{github.workspace}}/vcpkg + vcpkgJsonGlob: '**/vcpkg.json' + + - name: "Install dependencies" + if: steps.cache.outputs.cache-hit != 'true' + env: + VCPKG_BINARY_SOURCES: clear + run: vcpkg install --triplet x64-windows + + # note: disable all providers except the one being tested + # '-DCMAKE_SUPPRESS_REGENERATION=ON' is the WA for the error: "CUSTOMBUILD : CMake error : Cannot restore timestamp" + - name: Configure build (Debug) + run: > + cmake + -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" + -B ${{env.BUILD_DEBUG_DIR}} + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DEBUG_DIR}}" + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_C_COMPILER=${{env.C_COMPILER}} + -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} + -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} + -DUMF_BUILD_BENCHMARKS=ON + -DUMF_BUILD_BENCHMARKS_MT=ON + -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_GPU_TESTS=ON + -DUMF_BUILD_GPU_EXAMPLES=ON + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + -DUMF_BUILD_CUDA_PROVIDER=OFF + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF + -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON + -DUMF_TESTS_FAIL_ON_SKIP=ON + -DCMAKE_SUPPRESS_REGENERATION=ON + + - name: Build UMF (Debug) + run: cmake --build ${{env.BUILD_DEBUG_DIR}} --config Debug -j ${{env.PROCS}} + + - name: Run tests (Debug) + working-directory: ${{env.BUILD_DEBUG_DIR}} + run: ctest -C Debug --output-on-failure --test-dir test + + - name: Run examples (Debug) + working-directory: ${{env.BUILD_DEBUG_DIR}} + run: ctest --output-on-failure --test-dir examples -C Debug + + - name: Configure build (Release) + run: > + cmake + -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" + -B ${{env.BUILD_RELEASE_DIR}} + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_RELEASE_DIR}}" + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_C_COMPILER=${{env.C_COMPILER}} + -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} + -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} + -DUMF_BUILD_BENCHMARKS=ON + -DUMF_BUILD_BENCHMARKS_MT=ON + -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_GPU_TESTS=ON + -DUMF_BUILD_GPU_EXAMPLES=ON + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + -DUMF_BUILD_CUDA_PROVIDER=OFF + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF + -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON + -DUMF_TESTS_FAIL_ON_SKIP=ON + -DCMAKE_SUPPRESS_REGENERATION=ON + + - name: Build UMF (Release) + run: cmake --build ${{env.BUILD_RELEASE_DIR}} --config Release -j ${{env.PROCS}} + + - name: Run tests (Release) + working-directory: ${{env.BUILD_RELEASE_DIR}} + run: ctest -C Release --output-on-failure --test-dir test + + - name: Run examples (Release) + working-directory: ${{env.BUILD_RELEASE_DIR}} + run: ctest --output-on-failure --test-dir examples -C Release + + - name: Run benchmarks (Release) + working-directory: ${{env.BUILD_RELEASE_DIR}} + run: ctest --output-on-failure --test-dir benchmark -C Release --exclude-regex umf-multithreaded + + - 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@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ${{github.workspace}}/vcpkg_pkgs_cache.zip + key: ${{ steps.cache.outputs.cache-primary-key }} From 2fd6c5d596ada6b91ab14bc46d7c4d5c847cb829 Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Mon, 20 Jul 2026 17:12:05 +0200 Subject: [PATCH 2/7] TEST CI --- .github/workflows/pr_push.yml | 132 ++++++++++++++--------------- .github/workflows/reusable_gpu.yml | 3 +- 2 files changed, 68 insertions(+), 67 deletions(-) diff --git a/.github/workflows/pr_push.yml b/.github/workflows/pr_push.yml index fffdc7373..c446fe0a8 100644 --- a/.github/workflows/pr_push.yml +++ b/.github/workflows/pr_push.yml @@ -17,87 +17,87 @@ permissions: packages: read jobs: - CodeChecks: - uses: ./.github/workflows/reusable_checks.yml - FastBuild: - name: Fast builds - needs: [CodeChecks] - uses: ./.github/workflows/reusable_fast.yml - Build: - name: Basic builds - needs: [FastBuild] - uses: ./.github/workflows/reusable_basic.yml - DevDax: - needs: [FastBuild] - uses: ./.github/workflows/reusable_dax.yml - MultiNuma: - needs: [FastBuild] - uses: ./.github/workflows/reusable_multi_numa.yml + # CodeChecks: + # uses: ./.github/workflows/reusable_checks.yml + # FastBuild: + # name: Fast builds + # needs: [CodeChecks] + # uses: ./.github/workflows/reusable_fast.yml + # Build: + # name: Basic builds + # needs: [FastBuild] + # uses: ./.github/workflows/reusable_basic.yml + # DevDax: + # needs: [FastBuild] + # uses: ./.github/workflows/reusable_dax.yml + # MultiNuma: + # needs: [FastBuild] + # uses: ./.github/workflows/reusable_multi_numa.yml L0: - needs: [Build] + # needs: [Build] uses: ./.github/workflows/reusable_gpu.yml with: provider: "LEVEL_ZERO" runner: "L0" shared_lib: "['ON']" L0-BMG: - needs: [Build] + # needs: [Build] uses: ./.github/workflows/reusable_gpu.yml with: provider: "LEVEL_ZERO" runner: "L0-BMG" shared_lib: "['ON']" CUDA: - needs: [Build] + # needs: [Build] uses: ./.github/workflows/reusable_gpu.yml with: provider: "CUDA" runner: "CUDA" shared_lib: "['ON']" - Sanitizers: - needs: [FastBuild] - uses: ./.github/workflows/reusable_sanitizers.yml - QEMU: - needs: [FastBuild] - uses: ./.github/workflows/reusable_qemu.yml - with: - short_run: true - ProxyLib: - needs: [Build] - uses: ./.github/workflows/reusable_proxy_lib.yml - Valgrind: - needs: [Build] - uses: ./.github/workflows/reusable_valgrind.yml - Coverage: - # total coverage (on upstream only) - if: github.repository == 'oneapi-src/unified-memory-framework' - needs: [Build, DevDax, L0, CUDA, MultiNuma, QEMU, ProxyLib] - uses: ./.github/workflows/reusable_coverage.yml - secrets: inherit - with: - trigger: "${{github.event_name}}" - Coverage_partial: - # partial coverage (on forks) - if: github.repository != 'oneapi-src/unified-memory-framework' - needs: [Build, QEMU, ProxyLib] - uses: ./.github/workflows/reusable_coverage.yml - CodeQL: - needs: [Build] - permissions: - contents: read - security-events: write - uses: ./.github/workflows/reusable_codeql.yml - Trivy: - needs: [Build] - permissions: - contents: read - security-events: write - uses: ./.github/workflows/reusable_trivy.yml - Compatibility: - needs: [Build] - uses: ./.github/workflows/reusable_compatibility.yml - strategy: - matrix: - tag: ["v1.0.1"] - with: - tag: ${{matrix.tag}} + # Sanitizers: + # needs: [FastBuild] + # uses: ./.github/workflows/reusable_sanitizers.yml + # QEMU: + # needs: [FastBuild] + # uses: ./.github/workflows/reusable_qemu.yml + # with: + # short_run: true + # ProxyLib: + # needs: [Build] + # uses: ./.github/workflows/reusable_proxy_lib.yml + # Valgrind: + # needs: [Build] + # uses: ./.github/workflows/reusable_valgrind.yml + # Coverage: + # # total coverage (on upstream only) + # if: github.repository == 'oneapi-src/unified-memory-framework' + # needs: [Build, DevDax, L0, CUDA, MultiNuma, QEMU, ProxyLib] + # uses: ./.github/workflows/reusable_coverage.yml + # secrets: inherit + # with: + # trigger: "${{github.event_name}}" + # Coverage_partial: + # # partial coverage (on forks) + # if: github.repository != 'oneapi-src/unified-memory-framework' + # needs: [Build, QEMU, ProxyLib] + # uses: ./.github/workflows/reusable_coverage.yml + # CodeQL: + # needs: [Build] + # permissions: + # contents: read + # security-events: write + # uses: ./.github/workflows/reusable_codeql.yml + # Trivy: + # needs: [Build] + # permissions: + # contents: read + # security-events: write + # uses: ./.github/workflows/reusable_trivy.yml + # Compatibility: + # needs: [Build] + # uses: ./.github/workflows/reusable_compatibility.yml + # strategy: + # matrix: + # tag: ["v1.0.1"] + # with: + # tag: ${{matrix.tag}} diff --git a/.github/workflows/reusable_gpu.yml b/.github/workflows/reusable_gpu.yml index b2388f9df..fc9a30f2e 100644 --- a/.github/workflows/reusable_gpu.yml +++ b/.github/workflows/reusable_gpu.yml @@ -29,7 +29,8 @@ permissions: jobs: win: # run only on upstream; forks will not have the HW - if: github.repository == 'oneapi-src/unified-memory-framework' + # if: github.repository == 'oneapi-src/unified-memory-framework' + if: false uses: ./.github/workflows/reusable_gpu_win.yml with: provider: ${{ inputs.provider }} From ff40a83339b4e0ed222313f7df5fa7b905d10505 Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Mon, 20 Jul 2026 19:00:53 +0200 Subject: [PATCH 3/7] fix secrets --- .github/workflows/pr_push.yml | 3 +++ .github/workflows/reusable_gpu.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/pr_push.yml b/.github/workflows/pr_push.yml index c446fe0a8..3881e216b 100644 --- a/.github/workflows/pr_push.yml +++ b/.github/workflows/pr_push.yml @@ -40,6 +40,7 @@ jobs: provider: "LEVEL_ZERO" runner: "L0" shared_lib: "['ON']" + secrets: inherit L0-BMG: # needs: [Build] uses: ./.github/workflows/reusable_gpu.yml @@ -47,6 +48,7 @@ jobs: provider: "LEVEL_ZERO" runner: "L0-BMG" shared_lib: "['ON']" + secrets: inherit CUDA: # needs: [Build] uses: ./.github/workflows/reusable_gpu.yml @@ -54,6 +56,7 @@ jobs: provider: "CUDA" runner: "CUDA" shared_lib: "['ON']" + secrets: inherit # Sanitizers: # needs: [FastBuild] # uses: ./.github/workflows/reusable_sanitizers.yml diff --git a/.github/workflows/reusable_gpu.yml b/.github/workflows/reusable_gpu.yml index fc9a30f2e..b1d60df5f 100644 --- a/.github/workflows/reusable_gpu.yml +++ b/.github/workflows/reusable_gpu.yml @@ -44,3 +44,4 @@ jobs: provider: ${{ inputs.provider }} runner: ${{ inputs.runner }} shared_lib: ${{ inputs.shared_lib }} + secrets: inherit From 930cc46ddda7c76d9e8d7507bf144fba3e929a9c Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Tue, 21 Jul 2026 11:50:14 +0200 Subject: [PATCH 4/7] fix hwloc build --- .github/workflows/reusable_gpu_lin.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable_gpu_lin.yml b/.github/workflows/reusable_gpu_lin.yml index 5d66206bc..66cd2f580 100644 --- a/.github/workflows/reusable_gpu_lin.yml +++ b/.github/workflows/reusable_gpu_lin.yml @@ -61,12 +61,6 @@ jobs: with: fetch-depth: 0 - # - name: Install drivers - # run: | - # # extra proxy inherited to docker has to be removed - # unset no_proxy - # unset NO_PROXY - # add-apt-repository -y ppa:kobuk-team/intel-graphics # apt-get update # apt-get install -y \ @@ -86,6 +80,18 @@ jobs: # software-properties-common \ # va-driver-all \ # vainfo + - name: Install dependencies + run: | + # extra proxy inherited to docker has to be removed + unset no_proxy + unset NO_PROXY + + apt-get update + apt-get install -y \ + automake \ + lcov \ + libnuma-dev \ + libtool - name: "Get information about platform" run: .github/scripts/get_system_info.sh From 341d5f6206881512563cc7424d8361e93cec4f5a Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Tue, 21 Jul 2026 12:31:56 +0200 Subject: [PATCH 5/7] fix paths --- .github/workflows/reusable_gpu_lin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable_gpu_lin.yml b/.github/workflows/reusable_gpu_lin.yml index 66cd2f580..53bffaee8 100644 --- a/.github/workflows/reusable_gpu_lin.yml +++ b/.github/workflows/reusable_gpu_lin.yml @@ -56,6 +56,8 @@ jobs: echo "CXX_COMPILER=g++" >> $GITHUB_ENV echo "PROCS=$(nproc)" >> $GITHUB_ENV + mkdir -p ${{env.BUILD_DEBUG_DIR}} ${{env.BUILD_RELEASE_DIR}} ${{env.INSTL_DEBUG_DIR}} ${{env.INSTL_RELEASE_DIR}} + - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: @@ -100,7 +102,6 @@ jobs: - name: Configure build (Debug) run: > cmake - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" -B ${{env.BUILD_DEBUG_DIR}} -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DEBUG_DIR}}" -DCMAKE_BUILD_TYPE=Debug @@ -134,7 +135,6 @@ jobs: - name: Configure build (Release) run: > cmake - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}};${{env.EXTRA_CMAKE_PATH}}" -B ${{env.BUILD_RELEASE_DIR}} -DCMAKE_INSTALL_PREFIX="${{env.INSTL_RELEASE_DIR}}" -DCMAKE_BUILD_TYPE=Release From 1378768e6305ea1daab7924201988dad617eef2b Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Tue, 21 Jul 2026 12:52:50 +0200 Subject: [PATCH 6/7] match workspaces within docker --- .github/workflows/reusable_gpu_lin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable_gpu_lin.yml b/.github/workflows/reusable_gpu_lin.yml index 53bffaee8..9a46ed25e 100644 --- a/.github/workflows/reusable_gpu_lin.yml +++ b/.github/workflows/reusable_gpu_lin.yml @@ -45,6 +45,8 @@ jobs: image: intel/oneapi:2026.1.0-devel-ubuntu26.04 # intel/oneapi:2025.3.1-0-devel-ubuntu24.04 options: >- --device=/dev/dri + volumes: + - ${{ github.workspace }}:${{ github.workspace }} credentials: username: urbuildbot password: ${{ secrets.GH_BB_DOCKER_TOKEN }} From 5d48aa0ebd36e60af2a28aeda1353dafdf8833dc Mon Sep 17 00:00:00 2001 From: Lukasz Stolarczuk Date: Tue, 21 Jul 2026 14:45:44 +0200 Subject: [PATCH 7/7] rm credentials to work on PR --- .github/workflows/reusable_gpu_lin.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/reusable_gpu_lin.yml b/.github/workflows/reusable_gpu_lin.yml index 9a46ed25e..ead27e11a 100644 --- a/.github/workflows/reusable_gpu_lin.yml +++ b/.github/workflows/reusable_gpu_lin.yml @@ -47,9 +47,6 @@ jobs: --device=/dev/dri volumes: - ${{ github.workspace }}:${{ github.workspace }} - credentials: - username: urbuildbot - password: ${{ secrets.GH_BB_DOCKER_TOKEN }} steps: - name: "Establish build params"