From ca4f63ac916d39e880e634d1573555446de479a7 Mon Sep 17 00:00:00 2001 From: Ulyssa Date: Fri, 26 Jul 2024 14:15:34 -0700 Subject: [PATCH 1/3] Use mozilla-actions/sccache-action for caching builds --- .github/workflows/test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c4482735..d0b19f77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,9 @@ jobs: matrix: platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, macos-12, macos-13, macos-14] runs-on: ${{ matrix.platform }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" steps: - name: Checkout code uses: actions/checkout@v3 @@ -27,13 +30,10 @@ jobs: uses: actions/cache@v3 with: path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - test-fixtures/target/ + ~/.cargo/registry key: ${{ runner.os }}-cargo-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.5 - name: Install rustfmt run: rustup component add rustfmt shell: bash @@ -54,6 +54,9 @@ jobs: matrix: platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, macos-12, macos-13, macos-14] runs-on: ${{ matrix.platform }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" steps: - name: Checkout code uses: actions/checkout@v3 @@ -70,13 +73,10 @@ jobs: uses: actions/cache@v3 with: path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - cli/tests/trap-test/target/ - test-fixtures/target/ + ~/.cargo/registry key: ${{ runner.os }}-cargo-trap-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.5 - name: trap-test run: make trap-test-ci shell: bash From bdf8678290c59eedcacb38af0e6e40d683a70fb3 Mon Sep 17 00:00:00 2001 From: Ulyssa Date: Tue, 13 Aug 2024 08:46:55 -0700 Subject: [PATCH 2/3] Update .github/workflows/test.yml Co-authored-by: Kevin P. Fleming --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0b19f77..cbfa1686 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: with: path: | ~/.cargo/registry - key: ${{ runner.os }}-cargo-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.platform }}-cargo-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.5 - name: Install rustfmt From eaae594d17a647411e4871c15f603651dbadf2c2 Mon Sep 17 00:00:00 2001 From: Ulyssa Date: Tue, 13 Aug 2024 08:47:01 -0700 Subject: [PATCH 3/3] Update .github/workflows/test.yml Co-authored-by: Kevin P. Fleming --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbfa1686..34543067 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: with: path: | ~/.cargo/registry - key: ${{ runner.os }}-cargo-trap-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.platform }}-cargo-trap-v${{ env.CACHE_GENERATION }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.5 - name: trap-test