Skip to content

Commit febf568

Browse files
authored
Use caching to speed up CI (#23)
1 parent 341411f commit febf568

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
- uses: dtolnay/rust-toolchain@stable
2222
with:
2323
components: rustfmt
24+
- name: Cache
25+
uses: Swatinem/rust-cache@v2.8.0
2426
- name: Format
2527
run: cargo fmt --check
2628

@@ -29,6 +31,8 @@ jobs:
2931
steps:
3032
- uses: actions/checkout@v4
3133
- uses: dtolnay/rust-toolchain@stable
34+
- name: Cache
35+
uses: Swatinem/rust-cache@v2.8.0
3236
- name: Check
3337
run: cargo check
3438

@@ -39,6 +43,8 @@ jobs:
3943
- uses: dtolnay/rust-toolchain@stable
4044
with:
4145
components: clippy
46+
- name: Cache
47+
uses: Swatinem/rust-cache@v2.8.0
4248
- name: Run clippy
4349
run: cargo clippy --all-features -- -D warnings
4450

@@ -53,6 +59,8 @@ jobs:
5359
- uses: dtolnay/rust-toolchain@master
5460
with:
5561
toolchain: ${{ matrix.toolchain }}
62+
- name: Cache
63+
uses: Swatinem/rust-cache@v2.8.0
5664
- name: Build
5765
run: cargo build --all-features
5866

@@ -61,6 +69,8 @@ jobs:
6169
steps:
6270
- uses: actions/checkout@v4
6371
- uses: dtolnay/rust-toolchain@stable
72+
- name: Cache
73+
uses: Swatinem/rust-cache@v2.8.0
6474
- name: Compile benchmarks, but do not run them
6575
# There are no benchmarks with "nothing" in their name, hence this command only compiles the benchmarks but does not run them.
6676
run: cargo bench --all-features nothing

0 commit comments

Comments
 (0)