Skip to content

Commit 3ff84a6

Browse files
committed
Fix an error in the configuration, misc other improvements
Cargo.lock is not checked into the repo becuase this is a library. Switch to hashing Cargo.toml.
1 parent ca41992 commit 3ff84a6

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ jobs:
4141
env:
4242
GITHUB_CONTEXT: ${{ toJson(github) }}
4343
run: echo "$GITHUB_CONTEXT"
44-
- name: Dump job context
45-
env:
46-
JOB_CONTEXT: ${{ toJson(job) }}
47-
run: echo "$JOB_CONTEXT"
48-
- name: Dump steps context
49-
env:
50-
STEPS_CONTEXT: ${{ toJson(steps) }}
51-
run: echo "$STEPS_CONTEXT"
5244
- name: Dump runner context
5345
env:
5446
RUNNER_CONTEXT: ${{ toJson(runner) }}
@@ -66,15 +58,15 @@ jobs:
6658
uses: actions/cache@v1
6759
with:
6860
path: ~/.rustup
69-
key: ${{ runner.os }}-rustup-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
61+
key: ${{ runner.os }}-rustup-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
7062
restore-key: |
71-
${{ runner.os }}-rustup-${{ matrix.rust }}-
63+
${{ runner.os }}-rustup-${{ matrix.rust }}-
7264
7365
- name: Cache cargo registry cache
7466
uses: actions/cache@v1
7567
with:
7668
path: ~/.cargo/registry/cache
77-
key: ${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
69+
key: ${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
7870
restore-key: |
7971
${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}-
8072
${{ runner.os }}-cargo-registry-cache-
@@ -85,24 +77,26 @@ jobs:
8577
path: ~/.cargo/registry/index
8678
key: ${{ runner.os }}-cargo-registry-index-${{ github.ref }}-${{ github.sha }}
8779
restore-key: |
88-
${{ runner.os }}-cargo-registry-index-master-
80+
${{ runner.os }}-cargo-registry-index-${{ github.ref }}-
81+
${{ runner.os }}-cargo-registry-index-ref/heads/master-
8982
9083
- name: Cache cargo git db
9184
uses: actions/cache@v1
9285
with:
9386
path: ~/.cargo/git/db
94-
key: ${{ runner.os }}-cargo-git-db--${{ github.ref }}-${{ hashFiles('**/Cargo.lock') }}
87+
key: ${{ runner.os }}-cargo-git-db-${{ github.ref }}-${{ hashFiles('**/Cargo.toml') }}
9588
restore-key: |
96-
${{ runner.os }}-cargo-git-db-master
89+
${{ runner.os }}-cargo-git-db-${{ github.ref }}-
90+
${{ runner.os }}-cargo-git-db-ref/heads/master-
9791
9892
- name: Cache cargo build
9993
uses: actions/cache@v1
10094
with:
10195
path: target
102-
key: ${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
96+
key: ${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ github.ref }}-${{ hashFiles('**/Cargo.toml') }}
10397
restore-key: |
104-
${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-
105-
${{ runner.os }}-cargo-build-target-
98+
${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ github.ref }}-
99+
${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-ref/heads/master-
106100
107101
- name: Install ${{ matrix.rust }} Rust
108102
run: |
@@ -131,6 +125,3 @@ jobs:
131125
132126
- name: Test
133127
run: cargo test
134-
135-
- name: Prune unnecessary cache
136-
run: script/ci/prune-cache.sh

0 commit comments

Comments
 (0)