on master help sign in
ci: Add dependency caching.
commit2ea5feaeb15cefaaed66a759ec895298dbf479b4 authorBlaž Hrastnik <blaz@mxxn.io> dateTue 2 Jun 2020, 10:42 (6 years ago) parentd232000
1 file changed+54
.github/workflows/rust.yml+54
.github/workflows/rust.yml+54
@@ -23,6 +23,24 @@ jobs:
2323 toolchain: stable
2424 override: true
2525
26+ - name: Cache cargo registry
27+ uses: actions/cache@v1
28+ with:
29+ path: ~/.cargo/registry
30+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
31+
32+ - name: Cache cargo index
33+ uses: actions/cache@v1
34+ with:
35+ path: ~/.cargo/git
36+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
37+
38+ - name: Cache cargo target dir
39+ uses: actions/cache@v1
40+ with:
41+ path: target
42+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
43+
2644 - name: Run cargo check
2745 uses: actions-rs/cargo@v1
2846 with:
@@ -42,6 +60,24 @@ jobs:
4260 toolchain: stable
4361 override: true
4462
63+ - name: Cache cargo registry
64+ uses: actions/cache@v1
65+ with:
66+ path: ~/.cargo/registry
67+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
68+
69+ - name: Cache cargo index
70+ uses: actions/cache@v1
71+ with:
72+ path: ~/.cargo/git
73+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
74+
75+ - name: Cache cargo target dir
76+ uses: actions/cache@v1
77+ with:
78+ path: target
79+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
80+
4581 - name: Run cargo test
4682 uses: actions-rs/cargo@v1
4783 with:
@@ -62,6 +98,24 @@ jobs:
6298 override: true
6399 components: rustfmt, clippy
64100
101+ - name: Cache cargo registry
102+ uses: actions/cache@v1
103+ with:
104+ path: ~/.cargo/registry
105+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
106+
107+ - name: Cache cargo index
108+ uses: actions/cache@v1
109+ with:
110+ path: ~/.cargo/git
111+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
112+
113+ - name: Cache cargo target dir
114+ uses: actions/cache@v1
115+ with:
116+ path: target
117+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
118+
65119 - name: Run cargo fmt
66120 uses: actions-rs/cargo@v1
67121 with: