@@ -13,20 +13,14 @@ jobs:
1313 runs-on : ubuntu-18.04
1414 steps :
1515 - 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.
1916 - name : Cache cargo
20- uses : actions/cache@v1
21- with :
22- path : ~/.cargo/
23- key : ${{ github.job }}
17+ uses : Swatinem/rust-cache@v1
2418 - uses : actions-rs/toolchain@v1
2519 with :
2620 profile : minimal
2721 toolchain : nightly
2822 override : true
29- - run : rustup component add rustfmt
23+ components : rustfmt
3024 - uses : actions-rs/cargo@v1
3125 with :
3226 command : fmt
5751 target : x86_64-pc-windows-msvc
5852 steps :
5953 - 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')"
6454 - 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
7456 - uses : actions-rs/toolchain@v1
7557 with :
7658 toolchain : stable
@@ -91,23 +73,12 @@ jobs:
9173 rust :
9274 - stable
9375 - beta
94- - 1.41.1 # MSRV
76+ - 1.48 # MSRV
9577 fail-fast : false
9678 steps :
9779 - 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.
10180 - 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
11182 - uses : actions-rs/toolchain@v1
11283 with :
11384 profile : minimal
@@ -133,19 +104,8 @@ jobs:
133104 - uses : actions/checkout@v2
134105 with :
135106 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.
139107 - 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
149109 - uses : actions-rs/toolchain@v1
150110 with :
151111 profile : minimal
@@ -174,14 +134,8 @@ jobs:
174134 runs-on : ubuntu-18.04
175135 steps :
176136 - 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.
180137 - name : Cache cargo
181- uses : actions/cache@v1
182- with :
183- path : ~/.cargo/
184- key : ${{ github.job }}
138+ uses : Swatinem/rust-cache@v1
185139 - name : Retrieve benchmark results
186140 uses : actions/download-artifact@v1
187141 with :
0 commit comments