Skip to content

Commit 2cf682b

Browse files
Merge pull request #96 from imbsky/actions-cache
Use multiple paths feature for cache step
2 parents 0006e3a + 6fd4f05 commit 2cf682b

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

.github/workflows/linuxci.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@ jobs:
77
name: GNU/Linux CI
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Cache cargo registry
10+
- name: Cache cargo
1111
uses: actions/cache@v2
1212
with:
13-
path: ~/.cargo/registry
14-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
15-
- name: Cache cargo index
16-
uses: actions/cache@v2
17-
with:
18-
path: ~/.cargo/git
19-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
20-
- name: Cache cargo build
21-
uses: actions/cache@v2
22-
with:
23-
path: target
24-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
13+
path: |
14+
~/.cargo/git
15+
~/.cargo/registry
16+
target
17+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2518

2619
- uses: actions/checkout@v2
2720
- name: Install latest stable toolchain

.github/workflows/macosci.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@ jobs:
77
name: macOS CI
88
runs-on: macos-latest
99
steps:
10-
- name: Cache cargo registry
10+
- name: Cache cargo
1111
uses: actions/cache@v2
1212
with:
13-
path: ~/.cargo/registry
14-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
15-
- name: Cache cargo index
16-
uses: actions/cache@v2
17-
with:
18-
path: ~/.cargo/git
19-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
20-
- name: Cache cargo build
21-
uses: actions/cache@v2
22-
with:
23-
path: target
24-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
13+
path: |
14+
~/.cargo/git
15+
~/.cargo/registry
16+
target
17+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2518

2619
- uses: actions/checkout@v2
2720
- name: Install latest stable toolchain

0 commit comments

Comments
 (0)