@@ -13,20 +13,14 @@ jobs:
13
13
runs-on : ubuntu-18.04
14
14
steps :
15
15
- uses : actions/checkout@v2
16
- # Work around https://github.com/actions/cache/issues/133#issuecomment-599102035
17
- - run : sudo chown -R $(whoami):$(id -ng) ~/.cargo/
18
- name : Fix perms on .cargo so we can restore the cache.
19
16
- name : Cache cargo
20
- uses : actions/cache@v1
21
- with :
22
- path : ~/.cargo/
23
- key : ${{ github.job }}
17
+ uses : Swatinem/rust-cache@v1
24
18
- uses : actions-rs/toolchain@v1
25
19
with :
26
20
profile : minimal
27
21
toolchain : nightly
28
22
override : true
29
- - run : rustup component add rustfmt
23
+ components : rustfmt
30
24
- uses : actions-rs/cargo@v1
31
25
with :
32
26
command : fmt
57
51
target : x86_64-pc-windows-msvc
58
52
steps :
59
53
- uses : actions/checkout@v2
60
- # Work around https://github.com/actions/cache/issues/133#issuecomment-599102035
61
- - run : sudo chown -R $(whoami):$(id -ng) ~/.cargo/
62
- name : Fix perms on .cargo so we can restore the cache.
63
- if : " !contains(runner.os, 'windows')"
64
54
- name : Cache cargo
65
- uses : actions/cache@v1
66
- with :
67
- path : ~/.cargo/
68
- key : ${{ github.job }}-${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}
69
- - name : Cache cargo build
70
- uses : actions/cache@v1
71
- with :
72
- path : target
73
- key : ${{ github.job }}-${{ runner.os }}-${{ matrix.target }}-target-${{ hashFiles('**/Cargo.toml') }}
55
+ uses : Swatinem/rust-cache@v1
74
56
- uses : actions-rs/toolchain@v1
75
57
with :
76
58
toolchain : stable
@@ -91,23 +73,12 @@ jobs:
91
73
rust :
92
74
- stable
93
75
- beta
94
- - 1.41.1 # MSRV
76
+ - 1.48 # MSRV
95
77
fail-fast : false
96
78
steps :
97
79
- uses : actions/checkout@v2
98
- # Work around https://github.com/actions/cache/issues/133#issuecomment-599102035
99
- - run : sudo chown -R $(whoami):$(id -ng) ~/.cargo/
100
- name : Fix perms on .cargo so we can restore the cache.
101
80
- name : Cache cargo
102
- uses : actions/cache@v1
103
- with :
104
- path : ~/.cargo/
105
- key : ${{ github.job }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ matrix.rust }}
106
- - name : Cache cargo build
107
- uses : actions/cache@v1
108
- with :
109
- path : target
110
- key : ${{ github.job }}-${{ runner.os }}-target-${{ hashFiles('**/Cargo.toml') }}-${{ matrix.rust }}
81
+ uses : Swatinem/rust-cache@v1
111
82
- uses : actions-rs/toolchain@v1
112
83
with :
113
84
profile : minimal
@@ -133,19 +104,8 @@ jobs:
133
104
- uses : actions/checkout@v2
134
105
with :
135
106
ref : ${{ matrix.ref }}
136
- # Work around https://github.com/actions/cache/issues/133#issuecomment-599102035
137
- - run : sudo chown -R $(whoami):$(id -ng) ~/.cargo/
138
- name : Fix perms on .cargo so we can restore the cache.
139
107
- name : Cache cargo
140
- uses : actions/cache@v1
141
- with :
142
- path : ~/.cargo/
143
- key : ${{ github.job }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
144
- - name : Cache cargo build
145
- uses : actions/cache@v1
146
- with :
147
- path : target
148
- key : ${{ github.job }}-${{ runner.os }}-target-${{ hashFiles('**/Cargo.toml') }}
108
+ uses : Swatinem/rust-cache@v1
149
109
- uses : actions-rs/toolchain@v1
150
110
with :
151
111
profile : minimal
@@ -174,14 +134,8 @@ jobs:
174
134
runs-on : ubuntu-18.04
175
135
steps :
176
136
- uses : actions/checkout@v2
177
- # Work around https://github.com/actions/cache/issues/133#issuecomment-599102035
178
- - run : sudo chown -R $(whoami):$(id -ng) ~/.cargo/
179
- name : Fix perms on .cargo so we can restore the cache.
180
137
- name : Cache cargo
181
- uses : actions/cache@v1
182
- with :
183
- path : ~/.cargo/
184
- key : ${{ github.job }}
138
+ uses : Swatinem/rust-cache@v1
185
139
- name : Retrieve benchmark results
186
140
uses : actions/download-artifact@v1
187
141
with :
0 commit comments