mirror of
https://github.com/imsnif/bandwhich.git
synced 2026-02-09 01:59:18 +08:00
CI: use sccache to speed up CI (#408)
* CI: use sccache to speed up CI * Write changelog * Only use sccache for non-cross targets
This commit is contained in:
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
@@ -50,6 +50,11 @@ jobs:
|
||||
name: Test on each target
|
||||
needs: get-msrv
|
||||
env:
|
||||
# use 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 }}
|
||||
@@ -114,6 +119,12 @@ jobs:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
targets: ${{ matrix.target }}
|
||||
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/sccache-action@v0.0.4
|
||||
|
||||
- name: Install cross
|
||||
if: matrix.cargo == 'cross'
|
||||
|
||||
Reference in New Issue
Block a user