diff --git a/.github/workflows/pr_push.yml b/.github/workflows/pr_push.yml index fbdc8c56d..e0e490eae 100644 --- a/.github/workflows/pr_push.yml +++ b/.github/workflows/pr_push.yml @@ -17,88 +17,7 @@ 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 - L0: - needs: [Build] - uses: ./.github/workflows/reusable_gpu.yml - with: - provider: "LEVEL_ZERO" - runner: "L0" - shared_lib: "['ON']" - L0-BMG: - needs: [Build] - uses: ./.github/workflows/reusable_gpu.yml - with: - provider: "LEVEL_ZERO" - runner: "L0-BMG" - shared_lib: "['ON']" - os: "['Ubuntu']" - CUDA: - 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: ["v0.12.0-dev3"] -# with: -# tag: ${{matrix.tag}} + \ No newline at end of file diff --git a/.github/workflows/reusable_fast.yml b/.github/workflows/reusable_fast.yml index 63bbc85d0..2c703e35e 100644 --- a/.github/workflows/reusable_fast.yml +++ b/.github/workflows/reusable_fast.yml @@ -108,7 +108,23 @@ jobs: with: fetch-depth: 0 + - name: Restore vcpkg cache + uses: actions/cache@v4 + id: cache + with: + path: cache.zip + key: reusable-fast-windows-latest-${{ hashFiles('vcpkg.json') }} + restore-keys: + reusable-fast-windows-latest- + + - name: Unpack vcpkg cache + if: steps.cache.outputs.cache-hit == 'true' + run: | + Expand-Archive -Path ${{github.workspace}}/cache.zip -DestinationPath ${{env.BUILD_DIR}} -Force + shell: pwsh + - name: Initialize vcpkg + if: steps.cache.outputs.cache-hit != 'true' uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 with: vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025 @@ -116,6 +132,7 @@ jobs: vcpkgJsonGlob: '**/vcpkg.json' - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' run: vcpkg install --triplet x64-windows shell: pwsh # Specifies PowerShell as the shell for running the script. @@ -164,3 +181,15 @@ jobs: run: | get-command ${{github.workspace}}/build/bin/Release/umf.dll | format-list get-command ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll | format-list + + - name: Prepare vcpkg cache + if: steps.cache.outputs.cache-hit != 'true' + run: | + Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg -DestinationPath ${{github.workspace}}/cache.zip -Force -CompressionLevel Fastest + + - name: Cache save + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ${{github.workspace}}/cache.zip + key: reusable-fast-windows-latest-${{ hashFiles('vcpkg.json') }}