Skip to content
Draft
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
14 changes: 14 additions & 0 deletions .github/actions/setup-sccache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Set up sccache
description: Install sccache and enable the GitHub Actions cache backend for Rust builds.

runs:
using: composite
steps:
- name: sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10

- name: Configure sccache for Rust
shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
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:
shared-key: "${{ runner.os }}-debug"
cache-on-failure: "true"

- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Build guest binaries
run: just guests

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/PrimeCaches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,8 @@ jobs:
# 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

- name: Build host
run: just build ${{ matrix.config }}
5 changes: 4 additions & 1 deletion .github/workflows/RustNightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ jobs:
. -> target
src/tests/rust_guests -> target

- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Install cargo-hyperlight
run: just ensure-cargo-hyperlight

Expand All @@ -90,7 +93,7 @@ jobs:
run: just build ${{ matrix.config }}

- name: Run Miri tests
run: just miri-tests
run: env -u RUSTC_WRAPPER just miri-tests

- name: Run Rust tests
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dep_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ jobs:
shared-key: "${{ runner.os }}-${{ inputs.hypervisor }}-release"
save-if: "false"

- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Download Rust guests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dep_build_guests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
. -> target
src/tests/rust_guests -> target
- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Install cargo-hyperlight
run: just ensure-cargo-hyperlight

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/dep_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ jobs:
# 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

- name: Download Rust guests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down Expand Up @@ -105,7 +108,7 @@ jobs:

- name: Run Miri tests
if: runner.os == 'Linux'
run: just miri-tests
run: env -u RUSTC_WRAPPER just miri-tests

- name: Run Rust tests
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/dep_code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
. -> target
src/tests/rust_guests -> target
- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Ensure up-to-date Cargo.lock
run: |
cargo fetch --locked
Expand Down Expand Up @@ -128,6 +131,9 @@ jobs:
. -> target
src/tests/rust_guests -> target
- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Ensure up-to-date Cargo.lock
run: |
cargo fetch --locked
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dep_fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Download Rust guests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dep_run_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
shared-key: "${{ runner.os }}-${{ inputs.hypervisor }}-${{ inputs.config }}"
save-if: "false"

- name: Set up sccache
uses: ./.github/actions/setup-sccache

- name: Download Rust guests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down
Loading