From 053e5be3a27a6b50c30f9f699c4690e31fd78cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20S=C3=B6rng=C3=A5rd?= <44257381+JSorngard@users.noreply.github.com> Date: Thu, 10 Jul 2025 22:41:30 +0200 Subject: [PATCH] Use caching to speed up CI --- .github/workflows/rust.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0b76178..1fea360 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,6 +21,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt + - name: Cache + uses: Swatinem/rust-cache@v2.8.0 - name: Format run: cargo fmt --check @@ -29,6 +31,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - name: Cache + uses: Swatinem/rust-cache@v2.8.0 - name: Check run: cargo check @@ -39,6 +43,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: clippy + - name: Cache + uses: Swatinem/rust-cache@v2.8.0 - name: Run clippy run: cargo clippy --all-features -- -D warnings @@ -53,6 +59,8 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} + - name: Cache + uses: Swatinem/rust-cache@v2.8.0 - name: Build run: cargo build --all-features @@ -61,6 +69,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - name: Cache + uses: Swatinem/rust-cache@v2.8.0 - name: Compile benchmarks, but do not run them # There are no benchmarks with "nothing" in their name, hence this command only compiles the benchmarks but does not run them. run: cargo bench --all-features nothing