File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,35 @@ jobs:
1111 runs-on : ubuntu-latest
1212 steps :
1313 - 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
1536 uses : actions/cache@v2
1637 with :
1738 path : target
18- key : cargo-build-${{ hashFiles('**/Cargo.lock') }}
39+ key : cargo-build-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
1940 restore-keys : |
20- cargo-build-
41+ cargo-build-${{ steps.rustc.outputs.version }}-
42+
2143 - run : cargo run
2244 - run : cp CNAME ./site/
2345 - run : touch site/.nojekyll
You can’t perform that action at this time.
0 commit comments