1212
1313jobs :
1414 check :
15- runs-on : ubuntu-latest
15+ runs-on : ubuntu-24.04
1616 steps :
1717 - uses : actions/checkout@v4
1818 - uses : taiki-e/install-action@protoc
@@ -22,41 +22,44 @@ jobs:
2222 - uses : Swatinem/rust-cache@v2
2323 with :
2424 save-if : ${{ github.ref == 'refs/heads/main' }}
25+ prefix-key : " v0-rust-ubuntu-24.04"
2526 - name : Check
2627 run : cargo clippy --workspace --all-targets --all-features -- -D warnings
2728 - name : rustfmt
2829 run : cargo fmt --all --check
2930
3031 check-docs :
31- runs-on : ubuntu-latest
32+ runs-on : ubuntu-24.04
3233 steps :
3334 - uses : actions/checkout@v4
3435 - uses : dtolnay/rust-toolchain@stable
3536 - uses : Swatinem/rust-cache@v2
3637 with :
3738 save-if : ${{ github.ref == 'refs/heads/main' }}
39+ prefix-key : " v0-rust-ubuntu-24.04"
3840 - name : cargo doc
3941 env :
4042 RUSTDOCFLAGS : " -D rustdoc::all -A rustdoc::private-doc-tests"
4143 run : cargo doc --all-features --no-deps
4244
4345 cargo-hack :
44- runs-on : ubuntu-latest
46+ runs-on : ubuntu-24.04
4547 steps :
4648 - uses : actions/checkout@v4
4749 - uses : taiki-e/install-action@protoc
4850 - uses : dtolnay/rust-toolchain@stable
4951 - uses : Swatinem/rust-cache@v2
5052 with :
5153 save-if : ${{ github.ref == 'refs/heads/main' }}
54+ prefix-key : " v0-rust-ubuntu-24.04"
5255 - name : Install cargo-hack
5356 run : |
5457 curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
5558 - name : cargo hack check
5659 run : cargo hack check --each-feature --no-dev-deps --all
5760
5861 cargo-public-api-crates :
59- runs-on : ubuntu-latest
62+ runs-on : ubuntu-24.04
6063 strategy :
6164 matrix :
6265 crate : [axum, axum-core, axum-extra, axum-macros]
6972 - uses : Swatinem/rust-cache@v2
7073 with :
7174 save-if : ${{ github.ref == 'refs/heads/main' }}
75+ prefix-key : " v0-rust-ubuntu-24.04"
7276 - name : Install cargo-public-api-crates
7377 run : |
7478 cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates
8084
8185 test-versions :
8286 needs : check
83- runs-on : ubuntu-latest
87+ runs-on : ubuntu-24.04
8488 strategy :
8589 matrix :
8690 rust : [stable, beta]
@@ -93,13 +97,14 @@ jobs:
9397 - uses : Swatinem/rust-cache@v2
9498 with :
9599 save-if : ${{ github.ref == 'refs/heads/main' }}
100+ prefix-key : " v0-rust-ubuntu-24.04"
96101 - name : Run tests
97102 run : cargo test --workspace --all-features --all-targets
98103
99- # some examples doesn 't support our MSRV so we only test axum itself on our MSRV
104+ # some examples don 't support our MSRV so we only test axum itself on our MSRV
100105 test-nightly :
101106 needs : check
102- runs-on : ubuntu-latest
107+ runs-on : ubuntu-24.04
103108 steps :
104109 - uses : actions/checkout@v4
105110 - name : Get rust-toolchain version
@@ -111,15 +116,16 @@ jobs:
111116 - uses : Swatinem/rust-cache@v2
112117 with :
113118 save-if : ${{ github.ref == 'refs/heads/main' }}
119+ prefix-key : " v0-rust-ubuntu-24.04"
114120 - name : Run nightly tests
115121 working-directory : axum-macros
116122 run : cargo test
117123
118- # some examples doesn 't support our MSRV (such as async-graphql)
124+ # some examples don 't support our MSRV (such as async-graphql)
119125 # so we only test axum itself on our MSRV
120126 test-msrv :
121127 needs : check
122- runs-on : ubuntu-latest
128+ runs-on : ubuntu-24.04
123129 steps :
124130 - uses : actions/checkout@v4
125131 - uses : dtolnay/rust-toolchain@master
@@ -130,6 +136,7 @@ jobs:
130136 - uses : Swatinem/rust-cache@v2
131137 with :
132138 save-if : ${{ github.ref == 'refs/heads/main' }}
139+ prefix-key : " v0-rust-ubuntu-24.04"
133140 - name : Select minimal version
134141 run : cargo +nightly update -Z minimal-versions
135142 - name : Fix up Cargo.lock
@@ -157,19 +164,20 @@ jobs:
157164
158165 test-docs :
159166 needs : check
160- runs-on : ubuntu-latest
167+ runs-on : ubuntu-24.04
161168 steps :
162169 - uses : actions/checkout@v4
163170 - uses : dtolnay/rust-toolchain@stable
164171 - uses : Swatinem/rust-cache@v2
165172 with :
166173 save-if : ${{ github.ref == 'refs/heads/main' }}
174+ prefix-key : " v0-rust-ubuntu-24.04"
167175 - name : Run doc tests
168176 run : cargo test --all-features --doc
169177
170178 deny-check :
171179 name : cargo-deny check
172- runs-on : ubuntu-latest
180+ runs-on : ubuntu-24.04
173181 continue-on-error : ${{ matrix.checks == 'advisories' }}
174182 strategy :
175183 matrix :
@@ -185,7 +193,7 @@ jobs:
185193
186194 armv5te-unknown-linux-musleabi :
187195 needs : check
188- runs-on : ubuntu-latest
196+ runs-on : ubuntu-24.04
189197 steps :
190198 - uses : actions/checkout@v4
191199 - uses : dtolnay/rust-toolchain@stable
@@ -194,6 +202,7 @@ jobs:
194202 - uses : Swatinem/rust-cache@v2
195203 with :
196204 save-if : ${{ github.ref == 'refs/heads/main' }}
205+ prefix-key : " v0-rust-ubuntu-24.04"
197206 - name : Check
198207 env :
199208 # Clang has native cross-compilation support
@@ -211,7 +220,7 @@ jobs:
211220
212221 wasm32-unknown-unknown :
213222 needs : check
214- runs-on : ubuntu-latest
223+ runs-on : ubuntu-24.04
215224 steps :
216225 - uses : actions/checkout@v4
217226 - uses : dtolnay/rust-toolchain@stable
@@ -220,6 +229,7 @@ jobs:
220229 - uses : Swatinem/rust-cache@v2
221230 with :
222231 save-if : ${{ github.ref == 'refs/heads/main' }}
232+ prefix-key : " v0-rust-ubuntu-24.04"
223233 - name : Check
224234 run : >
225235 cargo
@@ -228,13 +238,14 @@ jobs:
228238 --target wasm32-unknown-unknown
229239
230240 dependencies-are-sorted :
231- runs-on : ubuntu-latest
241+ runs-on : ubuntu-24.04
232242 steps :
233243 - uses : actions/checkout@v4
234244 - uses : dtolnay/rust-toolchain@beta
235245 - uses : Swatinem/rust-cache@v2
236246 with :
237247 save-if : ${{ github.ref == 'refs/heads/main' }}
248+ prefix-key : " v0-rust-ubuntu-24.04"
238249 - name : Install cargo-sort
239250 run : |
240251 cargo install cargo-sort
@@ -247,7 +258,7 @@ jobs:
247258
248259 typos :
249260 name : Spell Check with Typos
250- runs-on : ubuntu-latest
261+ runs-on : ubuntu-24.04
251262 if : github.event_name == 'push' || !github.event.pull_request.draft
252263
253264 steps :
0 commit comments