Skip to content

Commit 0626fde

Browse files
committed
cache test
1 parent cde4cb8 commit 0626fde

File tree

2 files changed

+30
-84
lines changed

2 files changed

+30
-84
lines changed

.github/workflows/pr_push.yml

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -17,88 +17,10 @@ permissions:
1717
packages: read
1818

1919
jobs:
20-
CodeChecks:
21-
uses: ./.github/workflows/reusable_checks.yml
22-
FastBuild:
23-
name: Fast builds
24-
needs: [CodeChecks]
25-
uses: ./.github/workflows/reusable_fast.yml
26-
Build:
27-
name: Basic builds
28-
needs: [FastBuild]
29-
uses: ./.github/workflows/reusable_basic.yml
30-
DevDax:
31-
needs: [FastBuild]
32-
uses: ./.github/workflows/reusable_dax.yml
33-
MultiNuma:
34-
needs: [FastBuild]
35-
uses: ./.github/workflows/reusable_multi_numa.yml
3620
L0:
37-
needs: [Build]
3821
uses: ./.github/workflows/reusable_gpu.yml
3922
with:
4023
provider: "LEVEL_ZERO"
4124
runner: "L0"
4225
shared_lib: "['ON']"
43-
L0-BMG:
44-
needs: [Build]
45-
uses: ./.github/workflows/reusable_gpu.yml
46-
with:
47-
provider: "LEVEL_ZERO"
48-
runner: "L0-BMG"
49-
shared_lib: "['ON']"
50-
os: "['Ubuntu']"
51-
CUDA:
52-
needs: [Build]
53-
uses: ./.github/workflows/reusable_gpu.yml
54-
with:
55-
provider: "CUDA"
56-
runner: "CUDA"
57-
shared_lib: "['ON']"
58-
Sanitizers:
59-
needs: [FastBuild]
60-
uses: ./.github/workflows/reusable_sanitizers.yml
61-
QEMU:
62-
needs: [FastBuild]
63-
uses: ./.github/workflows/reusable_qemu.yml
64-
with:
65-
short_run: true
66-
ProxyLib:
67-
needs: [Build]
68-
uses: ./.github/workflows/reusable_proxy_lib.yml
69-
Valgrind:
70-
needs: [Build]
71-
uses: ./.github/workflows/reusable_valgrind.yml
72-
Coverage:
73-
# total coverage (on upstream only)
74-
if: github.repository == 'oneapi-src/unified-memory-framework'
75-
needs: [Build, DevDax, L0, CUDA, MultiNuma, QEMU, ProxyLib]
76-
uses: ./.github/workflows/reusable_coverage.yml
77-
secrets: inherit
78-
with:
79-
trigger: "${{github.event_name}}"
80-
Coverage_partial:
81-
# partial coverage (on forks)
82-
if: github.repository != 'oneapi-src/unified-memory-framework'
83-
needs: [Build, QEMU, ProxyLib]
84-
uses: ./.github/workflows/reusable_coverage.yml
85-
CodeQL:
86-
needs: [Build]
87-
permissions:
88-
contents: read
89-
security-events: write
90-
uses: ./.github/workflows/reusable_codeql.yml
91-
Trivy:
92-
needs: [Build]
93-
permissions:
94-
contents: read
95-
security-events: write
96-
uses: ./.github/workflows/reusable_trivy.yml
97-
Compatibility:
98-
needs: [Build]
99-
uses: ./.github/workflows/reusable_compatibility.yml
100-
strategy:
101-
matrix:
102-
tag: ["v0.12.0-dev3"]
103-
with:
104-
tag: ${{matrix.tag}}
26+

.github/workflows/reusable_gpu.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ on:
1616
os:
1717
description: A list of OSes
1818
type: string
19-
default: "['Ubuntu', 'Windows']"
19+
default: "['Windows']"
2020
build_type:
2121
description: A list of build types
2222
type: string
23-
default: "['Debug', 'Release']"
23+
default: "['Debug']"
2424
shared_lib:
2525
description: A list of options for building shared library
2626
type: string
27-
default: "['ON', 'OFF']"
27+
default: "['ON']"
2828

2929
permissions:
3030
contents: read
@@ -75,17 +75,29 @@ jobs:
7575
- name: Get information about platform
7676
if: matrix.os == 'Ubuntu'
7777
run: .github/scripts/get_system_info.sh
78+
79+
- name: Restore vcpkg cache
80+
if: matrix.os == 'Windows'
81+
uses: actions/cache/restore@v4
82+
id: cache-restore
83+
with:
84+
path: ${{env.BUILD_DIR}}/cache.zip
85+
key: reusable-gpu-${{matrix.os}}
86+
87+
- name: Unpack vcpkg cache
88+
if: steps.cache-restore.outcome.cache-hit == 'true' && matrix.os == 'Windows'
89+
run: Expand-Archive -Path ${{github.workspace}}/cache.zip -DestinationPath ${{env.BUILD_DIR}}/vcpkg -Force
7890

7991
- name: "[Win] Initialize vcpkg"
80-
if: matrix.os == 'Windows'
92+
if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows'
8193
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
8294
with:
8395
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
8496
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
8597
vcpkgJsonGlob: '**/vcpkg.json'
8698

8799
- name: "[Win] Install dependencies"
88-
if: matrix.os == 'Windows'
100+
if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows'
89101
run: vcpkg install --triplet x64-windows
90102

91103
# note: disable all providers except the one being tested
@@ -140,6 +152,18 @@ jobs:
140152
mkdir -p ${{env.COVERAGE_DIR}}
141153
mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
142154
155+
- name: Prepare vcpkg cache
156+
if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows'
157+
run: |
158+
Compress-Archive -Path ${{env.BUILD_DIR}}/vcpkg -DestinationPath ${{github.workspace}}/cache.zip -Force
159+
160+
- name: Cache save
161+
if: steps.cache-restore.outcome.cache-hit != 'true' && matrix.os == 'Windows'
162+
uses: actions/cache/save@v4
163+
with:
164+
path: ${{github.workspace}}/cache.zip
165+
key: reusable-gpu-${{matrix.os}}
166+
143167
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
144168
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
145169
with:

0 commit comments

Comments
 (0)