File tree Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,36 @@ jobs:
11
11
runs-on : ubuntu-latest
12
12
steps :
13
13
- uses : actions/checkout@v2
14
- - name : Cache cargo
14
+
15
+ - name : Detect the installed Rust version
16
+ id : rustc
17
+ run : echo "::set-output name=version::$(rustc -V)"
18
+
19
+ - name : Cache Cargo's registry cache
20
+ uses : actions/cache@v2
21
+ with :
22
+ path : ~/.cargo/registry/cache
23
+ key : cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
24
+ restore-keys : |
25
+ cargo-registry-cache-
26
+
27
+ - name : Cache Cargo's registry index
28
+ uses : actions/cache@v2
29
+ with :
30
+ path : ~/.cargo/registry/index
31
+ key : cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
32
+ restore-keys : |
33
+ cargo-registry-index-
34
+
35
+ - name : Cache Cargo's target directory
15
36
uses : actions/cache@v2
16
37
with :
17
38
path : target
18
- key : cargo-build-${{ hashFiles('**/Cargo.lock') }}
39
+ key : cargo-build-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('src/** ') }}
19
40
restore-keys : |
20
- cargo-build-
41
+ cargo-build-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}-
42
+ cargo-build-${{ steps.rustc.outputs.version }}-
43
+
21
44
- run : cargo run
22
45
- run : cp CNAME ./site/
23
46
- run : touch site/.nojekyll
You can’t perform that action at this time.
0 commit comments