Skip to content

Commit

Permalink
Use sccache
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Jun 18, 2024
1 parent 18ca6e7 commit 200d155
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ jobs:
suffix: zip
name: cargo build
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: "release-lto"

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- run: cargo build --target=${{ matrix.target }} --profile=release-lto
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- run: |
cp target/${{ matrix.target }}/release-lto/${{ matrix.bin }} ${{ matrix.bin }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: "test"
- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- run: cargo check
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

0 comments on commit 200d155

Please sign in to comment.