From 644b9051247657c72e0cbb50b04a8ea327d80cbe Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Tue, 20 Feb 2024 17:03:48 +0100 Subject: [PATCH 1/3] chore(workflows): use sccache --- .github/workflows/build-and-test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 36edf37d..f2415b6d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,6 +24,10 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + steps: - uses: actions/checkout@v2 - name: Install Rust @@ -32,6 +36,8 @@ jobs: toolchain: 1.76.0 override: true components: rustfmt, clippy + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.4 - name: FMT run: cargo fmt --all -- --check - name: Clippy From 689b1116bd306e3f8ddb0a9fe30466ffd62b71a1 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Tue, 20 Feb 2024 17:24:48 +0100 Subject: [PATCH 2/3] chore(workflows): cache cargo registry --- .github/workflows/build-and-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f2415b6d..3c559578 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -36,6 +36,14 @@ jobs: toolchain: 1.76.0 override: true components: rustfmt, clippy + - name: Cache Cargo registry + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.4 - name: FMT From efae8557c54975e65184c37fe721e019acdd62dc Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Tue, 20 Feb 2024 17:39:25 +0100 Subject: [PATCH 3/3] fixup! chore(workflows): cache cargo registry --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3c559578..2f0f392c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -37,7 +37,7 @@ jobs: override: true components: rustfmt, clippy - name: Cache Cargo registry - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/registry/index/