Skip to content

Commit a0a286b

Browse files
authored
Add caching in release builds (#145)
1 parent 5408662 commit a0a286b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build-rust.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ jobs:
8989
- uses: actions/checkout@v2
9090
with:
9191
fetch-depth: 0
92+
- uses: actions/cache@v1
93+
with:
94+
path: ~/.cargo
95+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
96+
restore-keys: |
97+
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
98+
${{ runner.os }}-cargo
9299
- uses: actions-rs/toolchain@v1
93100
with:
94101
profile: minimal
@@ -149,6 +156,13 @@ jobs:
149156
if: github.ref == 'refs/heads/master'
150157
steps:
151158
- uses: actions/checkout@v2
159+
- uses: actions/cache@v1
160+
with:
161+
path: ~/.cargo
162+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
163+
restore-keys: |
164+
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
165+
${{ runner.os }}-cargo
152166
- uses: actions-rs/toolchain@v1
153167
with:
154168
profile: minimal

0 commit comments

Comments
 (0)