@@ -18,17 +18,14 @@ jobs:
18
18
- name : Install Rust toolchain
19
19
run : |
20
20
rustup update --no-self-update stable
21
- rustup component add rustfmt rust-src
22
21
rustup default stable
22
+ rustup component add --toolchain stable rustfmt rust-src
23
+
23
24
- name : Cache cargo
24
- uses : actions/ cache@v4
25
+ uses : Swatinem/rust- cache@640a22190e7a783d4c409684cea558f081f92012
25
26
with :
26
- path : |
27
- ~/.cargo/bin/
28
- ~/.cargo/registry/index/
29
- ~/.cargo/registry/cache/
30
- ~/.cargo/git/db/
31
27
key : ${{ runner.os }}-cargo-${{ github.sha }}
28
+ cache-targets : " false"
32
29
33
30
build_metrics :
34
31
runs-on : ubuntu-latest
@@ -39,23 +36,19 @@ jobs:
39
36
uses : actions/checkout@v4
40
37
41
38
- name : Restore cargo cache
42
- uses : actions/ cache@v4
39
+ uses : Swatinem/rust- cache@640a22190e7a783d4c409684cea558f081f92012
43
40
with :
44
- path : |
45
- ~/.cargo/bin/
46
- ~/.cargo/registry/index/
47
- ~/.cargo/registry/cache/
48
- ~/.cargo/git/db/
49
41
key : ${{ runner.os }}-cargo-${{ github.sha }}
42
+ cache-targets : " false"
50
43
51
44
- name : Collect build metrics
52
45
run : cargo xtask metrics build
53
46
54
47
- name : Cache target
55
- uses : actions/ cache@v4
48
+ uses : Swatinem/rust- cache@640a22190e7a783d4c409684cea558f081f92012
56
49
with :
57
- path : target/
58
- key : ${{ runner.os }}-target-${{ github.sha }}
50
+ key : ${{ runner.os }}-cargo-${{ github.sha }}
51
+ cache-targets : " true "
59
52
60
53
- name : Upload build metrics
61
54
uses : actions/upload-artifact@v4
@@ -76,20 +69,10 @@ jobs:
76
69
uses : actions/checkout@v4
77
70
78
71
- name : Restore cargo cache
79
- uses : actions/ cache@v4
72
+ uses : Swatinem/rust- cache@640a22190e7a783d4c409684cea558f081f92012
80
73
with :
81
- path : |
82
- ~/.cargo/bin/
83
- ~/.cargo/registry/index/
84
- ~/.cargo/registry/cache/
85
- ~/.cargo/git/db/
86
74
key : ${{ runner.os }}-cargo-${{ github.sha }}
87
-
88
- - name : Restore target cache
89
- uses : actions/cache@v4
90
- with :
91
- path : target/
92
- key : ${{ runner.os }}-target-${{ github.sha }}
75
+ cache-targets : " true"
93
76
94
77
- name : Collect metrics
95
78
run : cargo xtask metrics "${{ matrix.names }}"
0 commit comments