41
41
env :
42
42
GITHUB_CONTEXT : ${{ toJson(github) }}
43
43
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"
52
44
- name : Dump runner context
53
45
env :
54
46
RUNNER_CONTEXT : ${{ toJson(runner) }}
@@ -66,15 +58,15 @@ jobs:
66
58
uses : actions/cache@v1
67
59
with :
68
60
path : ~/.rustup
69
- key : ${{ runner.os }}-rustup-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock ') }}
61
+ key : ${{ runner.os }}-rustup-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml ') }}
70
62
restore-key : |
71
- ${{ runner.os }}-rustup-${{ matrix.rust }}-
63
+ ${{ runner.os }}-rustup-${{ matrix.rust }}-
72
64
73
65
- name : Cache cargo registry cache
74
66
uses : actions/cache@v1
75
67
with :
76
68
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 ') }}
78
70
restore-key : |
79
71
${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}-
80
72
${{ runner.os }}-cargo-registry-cache-
@@ -85,24 +77,26 @@ jobs:
85
77
path : ~/.cargo/registry/index
86
78
key : ${{ runner.os }}-cargo-registry-index-${{ github.ref }}-${{ github.sha }}
87
79
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-
89
82
90
83
- name : Cache cargo git db
91
84
uses : actions/cache@v1
92
85
with :
93
86
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 ') }}
95
88
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-
97
91
98
92
- name : Cache cargo build
99
93
uses : actions/cache@v1
100
94
with :
101
95
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 ') }}
103
97
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-
106
100
107
101
- name : Install ${{ matrix.rust }} Rust
108
102
run : |
@@ -131,6 +125,3 @@ jobs:
131
125
132
126
- name : Test
133
127
run : cargo test
134
-
135
- - name : Prune unnecessary cache
136
- run : script/ci/prune-cache.sh
0 commit comments