Skip to content

Commit cddf861

Browse files
authored
ci: use Ubuntu 24.04 (#553)
Also moves x32 into a separate build-only job because the tests fail to link on Ubuntu 24.04.
1 parent c697b5c commit cddf861

File tree

4 files changed

+56
-36
lines changed

4 files changed

+56
-36
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
cross:
4040
name: Cross
41-
runs-on: ubuntu-22.04
41+
runs-on: ubuntu-24.04
4242
strategy:
4343
matrix:
4444
target: [
@@ -60,7 +60,7 @@ jobs:
6060

6161
tier2:
6262
name: Tier 2
63-
runs-on: ubuntu-22.04
63+
runs-on: ubuntu-24.04
6464
strategy:
6565
matrix:
6666
target: [
@@ -79,7 +79,7 @@ jobs:
7979

8080
tier3:
8181
name: Tier 3
82-
runs-on: ubuntu-22.04
82+
runs-on: ubuntu-24.04
8383
strategy:
8484
matrix:
8585
target: [
@@ -101,9 +101,41 @@ jobs:
101101
- uses: Swatinem/rust-cache@v2
102102
- run: cargo build -Z build-std=core --target=${{ matrix.target }}
103103

104+
# Ubuntu does not support running x32 binaries:
105+
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1994516/comments/21
106+
linux-x32:
107+
name: Linux x32
108+
runs-on: ubuntu-24.04
109+
strategy:
110+
matrix:
111+
target: [x86_64-unknown-linux-gnux32]
112+
steps:
113+
- uses: actions/checkout@v4
114+
- uses: dtolnay/rust-toolchain@stable
115+
with:
116+
targets: ${{ matrix.target }}
117+
- name: Install libc and libgcc
118+
run: |
119+
sudo apt-get update
120+
sudo apt-get install --no-install-recommends libc6-dev-x32 libx32gcc-11-dev
121+
- uses: Swatinem/rust-cache@v2
122+
- run: cargo build --target=${{ matrix.target }} --features=std
123+
- env:
124+
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_getrandom"
125+
run: cargo build --target=${{ matrix.target }} --features=std
126+
- env:
127+
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_rustix"
128+
run: cargo build --target=${{ matrix.target }} --features=std
129+
- env:
130+
RUSTFLAGS: -Dwarnings --cfg getrandom_test_linux_fallback
131+
run: cargo build --features=std
132+
- env:
133+
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="rdrand"
134+
run: cargo build --features=std
135+
104136
rdrand:
105137
name: RDRAND
106-
runs-on: ubuntu-22.04
138+
runs-on: ubuntu-24.04
107139
strategy:
108140
matrix:
109141
target: [
@@ -122,7 +154,7 @@ jobs:
122154

123155
rndr:
124156
name: RNDR
125-
runs-on: ubuntu-22.04
157+
runs-on: ubuntu-24.04
126158
steps:
127159
- uses: actions/checkout@v4
128160
- uses: dtolnay/rust-toolchain@master
@@ -145,7 +177,7 @@ jobs:
145177

146178
esp-idf:
147179
name: ESP-IDF
148-
runs-on: ubuntu-22.04
180+
runs-on: ubuntu-24.04
149181
steps:
150182
- uses: actions/checkout@v4
151183
- uses: dtolnay/rust-toolchain@nightly # Required to build libcore
@@ -158,7 +190,7 @@ jobs:
158190

159191
no-atomics:
160192
name: No Atomics
161-
runs-on: ubuntu-22.04
193+
runs-on: ubuntu-24.04
162194
steps:
163195
- uses: actions/checkout@v4
164196
- uses: dtolnay/rust-toolchain@stable

.github/workflows/nopanic.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ env:
2828
jobs:
2929
linux:
3030
name: Linux
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-24.04
3232
steps:
3333
- uses: actions/checkout@v4
3434
- uses: dtolnay/rust-toolchain@master
@@ -82,7 +82,7 @@ jobs:
8282

8383
cross:
8484
name: Cross
85-
runs-on: ubuntu-latest
85+
runs-on: ubuntu-24.04
8686
steps:
8787
- uses: actions/checkout@v4
8888
- uses: dtolnay/rust-toolchain@master

.github/workflows/tests.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
os: [ubuntu-22.04, windows-2022]
24+
os: [ubuntu-24.04, windows-2022]
2525
toolchain: [nightly, beta, stable, "1.63"]
2626
# Only Test macOS on stable to reduce macOS CI jobs
2727
include:
@@ -42,35 +42,23 @@ jobs:
4242

4343
linux:
4444
name: Linux
45-
runs-on: ubuntu-22.04
45+
runs-on: ubuntu-24.04
4646
strategy:
4747
matrix:
4848
target: [x86_64-unknown-linux-musl, i686-unknown-linux-musl]
49-
include:
50-
- target: i686-unknown-linux-gnu
51-
packages: libc6-dev-i386 lib32gcc-11-dev
52-
- target: x86_64-unknown-linux-gnux32
53-
packages: libc6-dev-x32 libx32gcc-11-dev
54-
# TODO: Find a Linux image/runner with CONFIG_X86_X32_ABI set
55-
cargo_test_opts: --no-run
5649
steps:
5750
- uses: actions/checkout@v4
5851
- uses: dtolnay/rust-toolchain@stable
5952
with:
6053
targets: ${{ matrix.target }}
61-
- name: Install libc and libgcc
62-
if: matrix.packages
63-
run: |
64-
sudo apt-get update
65-
sudo apt-get install --no-install-recommends ${{ matrix.packages }}
6654
- uses: Swatinem/rust-cache@v2
67-
- run: cargo test ${{ matrix.cargo_test_opts }} --target=${{ matrix.target }} --features=std
55+
- run: cargo test --target=${{ matrix.target }} --features=std
6856
- env:
6957
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_getrandom"
70-
run: cargo test ${{ matrix.cargo_test_opts }} --target=${{ matrix.target }} --features=std
58+
run: cargo test --target=${{ matrix.target }} --features=std
7159
- env:
7260
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_rustix"
73-
run: cargo test ${{ matrix.cargo_test_opts }} --target=${{ matrix.target }} --features=std
61+
run: cargo test --target=${{ matrix.target }} --features=std
7462
- env:
7563
RUSTFLAGS: -Dwarnings --cfg getrandom_test_linux_fallback
7664
run: cargo test --features=std
@@ -144,7 +132,7 @@ jobs:
144132

145133
sanitizer:
146134
name: Sanitizer
147-
runs-on: ubuntu-22.04
135+
runs-on: ubuntu-24.04
148136
steps:
149137
- uses: actions/checkout@v4
150138
- uses: dtolnay/rust-toolchain@master
@@ -158,7 +146,7 @@ jobs:
158146

159147
cross:
160148
name: Cross
161-
runs-on: ubuntu-22.04
149+
runs-on: ubuntu-24.04
162150
strategy:
163151
matrix:
164152
target: [
@@ -182,7 +170,7 @@ jobs:
182170

183171
freebsd:
184172
name: FreeBSD VM
185-
runs-on: ubuntu-22.04
173+
runs-on: ubuntu-24.04
186174
steps:
187175
- uses: actions/checkout@v4
188176
- name: Test in FreeBSD
@@ -196,7 +184,7 @@ jobs:
196184

197185
openbsd:
198186
name: OpenBSD VM
199-
runs-on: ubuntu-22.04
187+
runs-on: ubuntu-24.04
200188
steps:
201189
- uses: actions/checkout@v4
202190
- name: Test in OpenBSD
@@ -210,7 +198,7 @@ jobs:
210198

211199
netbsd:
212200
name: NetBSD VM
213-
runs-on: ubuntu-22.04
201+
runs-on: ubuntu-24.04
214202
steps:
215203
- uses: actions/checkout@v4
216204
- name: Test in NetBSD
@@ -226,7 +214,7 @@ jobs:
226214
# https://github.com/rust-random/getrandom/actions/runs/11405005618/job/31735653874?pr=528
227215
# dragonflybsd:
228216
# name: DragonflyBSD VM
229-
# runs-on: ubuntu-22.04
217+
# runs-on: ubuntu-24.04
230218
# steps:
231219
# - uses: actions/checkout@v4
232220
# - name: Test in DragonflyBSD
@@ -285,7 +273,7 @@ jobs:
285273

286274
wasi:
287275
name: WASI
288-
runs-on: ubuntu-22.04
276+
runs-on: ubuntu-24.04
289277
steps:
290278
- uses: actions/checkout@v4
291279
- uses: dtolnay/rust-toolchain@master

.github/workflows/workspace.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
clippy:
1414
name: Clippy
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1616
env:
1717
RUSTFLAGS: "-Dwarnings"
1818
steps:
@@ -86,7 +86,7 @@ jobs:
8686

8787
fmt:
8888
name: rustfmt
89-
runs-on: ubuntu-latest
89+
runs-on: ubuntu-24.04
9090
steps:
9191
- uses: actions/checkout@v4
9292
- uses: dtolnay/rust-toolchain@stable
@@ -98,7 +98,7 @@ jobs:
9898

9999
check-doc:
100100
name: rustdoc
101-
runs-on: ubuntu-latest
101+
runs-on: ubuntu-24.04
102102
steps:
103103
- uses: actions/checkout@v4
104104
- uses: dtolnay/rust-toolchain@master

0 commit comments

Comments
 (0)