Skip to content

Commit

Permalink
Only use sccache for non-cross targets
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Apr 16, 2024
1 parent b78dd26 commit 432aba6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
needs: get-msrv
env:
# use sccache
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
# It's too much of a hassle to set up sccache in cross.
# See https://github.com/cross-rs/cross/wiki/Recipes#sccache.
SCCACHE_GHA_ENABLED: ${{ matrix.cargo == 'cargo' && 'true' || 'false'}}
RUSTC_WRAPPER: ${{ matrix.cargo == 'cargo' && 'sccache' || '' }}
# Emit backtraces on panics.
RUST_BACKTRACE: 1
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -119,6 +121,9 @@ jobs:
components: clippy

- name: Set up sccache
# It's too much of a hassle to set up sccache in cross.
# See https://github.com/cross-rs/cross/wiki/Recipes#sccache.
if: matrix.cargo == 'cargo'
uses: mozilla-actions/[email protected]

- name: Install cross
Expand Down

0 comments on commit 432aba6

Please sign in to comment.