Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: use sccache to speed up CI #408

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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/[email protected]

- name: Install cross
if: matrix.cargo == 'cross'
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* CI: add builds for target `aarch64-linux-android` #384 - @flxo
* CI: Keep GitHub Actions up to date with GitHub's Dependabot #403 - @cclauss
* CI: Enable more cross-compiled builds #401 - @cyqsimon
* CI: use sccache to speed up CI #408 - @cyqsimon

## Changed

Expand Down
Loading