Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
with:
shared-key: "${{ runner.os }}-debug"
cache-on-failure: "true"
# Only save on main as caches are not shared across branches.
# https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#restrictions-for-accessing-a-cache
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Set up sccache
uses: ./.github/actions/setup-sccache
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/dep_build_guests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ jobs:
# cargo-hyperlight builds a custom sysroot for the Hyperlight guest target.
# rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot.
# We cache sysroot separately to avoid rebuilding it (~10s) on every run.
- name: Sysroot cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- name: Restore sysroot cache
id: sysroot-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
src/tests/rust_guests/target/sysroot
Expand Down Expand Up @@ -145,3 +146,15 @@ jobs:
path: src/tests/c_guests/bin/${{ inputs.config }}/
retention-days: 1
if-no-files-found: error

# A job step, not a post-job step, so the save runs before rust-cache's
# post-job cleanup deletes the sysroot. Only main saves, as caches are not
# shared across branches.
- name: Save sysroot cache
if: ${{ github.ref == 'refs/heads/main' && steps.sysroot-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
src/tests/rust_guests/target/sysroot
src/tests/rust_guests/target-non-pie/sysroot
key: ${{ steps.sysroot-cache.outputs.cache-primary-key }}
32 changes: 28 additions & 4 deletions .github/workflows/dep_code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jobs:
# cargo-hyperlight builds a custom sysroot for x86_64-hyperlight-none target.
# rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot.
# We cache sysroot separately to avoid rebuilding it (~10s) on every run.
- name: Sysroot cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- name: Restore sysroot cache
id: sysroot-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
src/tests/rust_guests/target/sysroot
Expand Down Expand Up @@ -101,6 +102,17 @@ jobs:
- name: Run loom concurrency tests
run: just test-loom

# A job step, not a post-job step, so the save runs before rust-cache's
# post-job cleanup deletes the sysroot. Only main saves, as caches are not
# shared across branches.
- name: Save sysroot cache
if: ${{ github.ref == 'refs/heads/main' && steps.sysroot-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
src/tests/rust_guests/target/sysroot
key: ${{ steps.sysroot-cache.outputs.cache-primary-key }}

windows-checks:
if: ${{ inputs.docs_only == 'false' }}
timeout-minutes: ${{ fromJSON(vars.CODE_CHECKS_JOB_TIMEOUT || '30') }}
Expand All @@ -122,8 +134,9 @@ jobs:
# cargo-hyperlight builds a custom sysroot for x86_64-hyperlight-none target.
# rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot.
# We cache sysroot separately to avoid rebuilding it (~10s) on every run.
- name: Sysroot cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- name: Restore sysroot cache
id: sysroot-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
src/tests/rust_guests/target/sysroot
Expand Down Expand Up @@ -175,3 +188,14 @@ jobs:
run: |
just test-compilation-no-default-features debug
just test-compilation-no-default-features release

# A job step, not a post-job step, so the save runs before rust-cache's
# post-job cleanup deletes the sysroot. Only main saves, as caches are not
# shared across branches.
- name: Save sysroot cache
if: ${{ github.ref == 'refs/heads/main' && steps.sysroot-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
src/tests/rust_guests/target/sysroot
key: ${{ steps.sysroot-cache.outputs.cache-primary-key }}
Loading