From ebb701e0cceb490ff7658d1cd356ab9cf0d5a284 Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Wed, 13 Sep 2023 23:09:08 +0200 Subject: [PATCH] sscache + Swatinem --- .github/workflows/build_test.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 7e02558..381a78b 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -12,6 +12,7 @@ on: env: SCCACHE_GHA_ENABLED: true RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: "1G" jobs: build_all: @@ -31,30 +32,30 @@ jobs: with: # use toolchain version from rust-toolchain.toml components: rustfmt, clippy - cache: false + cache: true # avoid the default "-D warnings" which thrashes cache rustflags: "" + - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 # https://github.com/actions/cache/blob/main/examples.md#rust---cargo - - uses: actions/cache@v3 + # https://blog.arriven.wtf/posts/rust-ci-cache/ + - uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/bin/ - target/ + # will be covered by sscache + cache-targets: false key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Early Build run: | - rustc --version - echo $RUSTFLAGS cargo build --workspace --tests - name: Run fmt+clippy run: | cargo fmt --all --check - cargo clippy --workspace --all-targets + cargo clippy --locked --workspace --all-targets