Skip to content

Commit

Permalink
Add rust cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Firaenix committed Nov 30, 2024
1 parent ab60ba2 commit 7ec0ee6
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
pull_request:
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'
- "**[0-9]+.[0-9]+.[0-9]+*"

jobs:
# Run 'dist plan' (or host) to determine what tasks we need to do
Expand Down Expand Up @@ -129,6 +129,27 @@ jobs:
- name: Install dependencies
run: |
${{ matrix.packages_install }}
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "v1-rust"
shared-key: "${{ matrix.target }}-build"
cache-targets: "true"
cache-on-failure: "true"
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
workspaces: |
. -> target
- name: Build artifacts
run: |
# Actually do builds and make zips and whatnot
Expand All @@ -147,6 +168,7 @@ jobs:
echo "EOF" >> "$GITHUB_OUTPUT"
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 7ec0ee6

Please sign in to comment.