on master help sign in
ci: Add dependency caching.
2ea5feaBlaž Hrastnik
.github/workflows/rust.yml+54
@@ -23,6 +23,24 @@ jobs:
23 toolchain: stable
23 toolchain: stable
24 override: true
24 override: true
25
25
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+
26 - name: Run cargo check
44 - name: Run cargo check
27 uses: actions-rs/cargo@v1
45 uses: actions-rs/cargo@v1
28 with:
46 with:
@@ -42,6 +60,24 @@ jobs:
42 toolchain: stable
60 toolchain: stable
43 override: true
61 override: true
44
62
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+
45 - name: Run cargo test
81 - name: Run cargo test
46 uses: actions-rs/cargo@v1
82 uses: actions-rs/cargo@v1
47 with:
83 with:
@@ -62,6 +98,24 @@ jobs:
62 override: true
98 override: true
63 components: rustfmt, clippy
99 components: rustfmt, clippy
64
100
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+
65 - name: Run cargo fmt
119 - name: Run cargo fmt
66 uses: actions-rs/cargo@v1
120 uses: actions-rs/cargo@v1
67 with:
121 with: