on master help sign in
ci: configure restore-keys for caches (#1806)
43fc073Michael Davis
.github/workflows/build.yml+13
@@ -27,18 +27,21 @@ jobs:
27 with:
27 with:
28 path: ~/.cargo/registry
28 path: ~/.cargo/registry
29 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
29 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30+ restore-keys: ${{ runner.os }}-v2-cargo-registry-
30
31
31 - name: Cache cargo index
32 - name: Cache cargo index
32 uses: actions/cache@v2.1.7
33 uses: actions/cache@v2.1.7
33 with:
34 with:
34 path: ~/.cargo/git
35 path: ~/.cargo/git
35 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
36 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
37+ restore-keys: ${{ runner.os }}-v2-cargo-index-
36
38
37 - name: Cache cargo target dir
39 - name: Cache cargo target dir
38 uses: actions/cache@v2.1.7
40 uses: actions/cache@v2.1.7
39 with:
41 with:
40 path: target
42 path: target
41 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
43 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
44+ restore-keys: ${{ runner.os }}-v2-cargo-build-target-
42
45
43 - name: Run cargo check
46 - name: Run cargo check
44 uses: actions-rs/cargo@v1
47 uses: actions-rs/cargo@v1
@@ -64,18 +67,21 @@ jobs:
64 with:
67 with:
65 path: ~/.cargo/registry
68 path: ~/.cargo/registry
66 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
69 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
70+ restore-keys: ${{ runner.os }}-v2-cargo-registry-
67
71
68 - name: Cache cargo index
72 - name: Cache cargo index
69 uses: actions/cache@v2.1.7
73 uses: actions/cache@v2.1.7
70 with:
74 with:
71 path: ~/.cargo/git
75 path: ~/.cargo/git
72 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
76 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
77+ restore-keys: ${{ runner.os }}-v2-cargo-index-
73
78
74 - name: Cache cargo target dir
79 - name: Cache cargo target dir
75 uses: actions/cache@v2.1.7
80 uses: actions/cache@v2.1.7
76 with:
81 with:
77 path: target
82 path: target
78 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
83 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
84+ restore-keys: ${{ runner.os }}-v2-cargo-build-target-
79
85
80 - name: Copy minimal languages config
86 - name: Copy minimal languages config
81 run: cp .github/workflows/languages.toml ./languages.toml
87 run: cp .github/workflows/languages.toml ./languages.toml
@@ -85,6 +91,7 @@ jobs:
85 with:
91 with:
86 path: runtime/grammars
92 path: runtime/grammars
87 key: ${{ runner.os }}-v2-tree-sitter-grammars-${{ hashFiles('languages.toml') }}
93 key: ${{ runner.os }}-v2-tree-sitter-grammars-${{ hashFiles('languages.toml') }}
94+ restore-keys: ${{ runner.os }}-v2-tree-sitter-grammars-
88
95
89 - name: Run cargo test
96 - name: Run cargo test
90 uses: actions-rs/cargo@v1
97 uses: actions-rs/cargo@v1
@@ -117,18 +124,21 @@ jobs:
117 with:
124 with:
118 path: ~/.cargo/registry
125 path: ~/.cargo/registry
119 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
126 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
127+ restore-keys: ${{ runner.os }}-v2-cargo-registry-
120
128
121 - name: Cache cargo index
129 - name: Cache cargo index
122 uses: actions/cache@v2.1.7
130 uses: actions/cache@v2.1.7
123 with:
131 with:
124 path: ~/.cargo/git
132 path: ~/.cargo/git
125 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
133 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
134+ restore-keys: ${{ runner.os }}-v2-cargo-index-
126
135
127 - name: Cache cargo target dir
136 - name: Cache cargo target dir
128 uses: actions/cache@v2.1.7
137 uses: actions/cache@v2.1.7
129 with:
138 with:
130 path: target
139 path: target
131 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
140 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
141+ restore-keys: ${{ runner.os }}-v2-cargo-build-target-
132
142
133 - name: Run cargo fmt
143 - name: Run cargo fmt
134 uses: actions-rs/cargo@v1
144 uses: actions-rs/cargo@v1
@@ -161,18 +171,21 @@ jobs:
161 with:
171 with:
162 path: ~/.cargo/registry
172 path: ~/.cargo/registry
163 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
173 key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
174+ restore-keys: ${{ runner.os }}-v2-cargo-registry-
164
175
165 - name: Cache cargo index
176 - name: Cache cargo index
166 uses: actions/cache@v2.1.6
177 uses: actions/cache@v2.1.6
167 with:
178 with:
168 path: ~/.cargo/git
179 path: ~/.cargo/git
169 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
180 key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
181+ restore-keys: ${{ runner.os }}-v2-cargo-index-
170
182
171 - name: Cache cargo target dir
183 - name: Cache cargo target dir
172 uses: actions/cache@v2.1.6
184 uses: actions/cache@v2.1.6
173 with:
185 with:
174 path: target
186 path: target
175 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
187 key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
188+ restore-keys: ${{ runner.os }}-v2-cargo-build-target-
176
189
177 - name: Generate docs
190 - name: Generate docs
178 uses: actions-rs/cargo@v1
191 uses: actions-rs/cargo@v1