Skip to content

Commit

Permalink
ci: use Ubuntu 24.04 (#553)
Browse files Browse the repository at this point in the history
Also moves x32 into a separate build-only job because the tests fail to
link on Ubuntu 24.04.
  • Loading branch information
newpavlov authored Dec 2, 2024
1 parent c697b5c commit cddf861
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 36 deletions.
46 changes: 39 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

cross:
name: Cross
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [
Expand All @@ -60,7 +60,7 @@ jobs:

tier2:
name: Tier 2
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [
Expand All @@ -79,7 +79,7 @@ jobs:

tier3:
name: Tier 3
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [
Expand All @@ -101,9 +101,41 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo build -Z build-std=core --target=${{ matrix.target }}

# Ubuntu does not support running x32 binaries:
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1994516/comments/21
linux-x32:
name: Linux x32
runs-on: ubuntu-24.04
strategy:
matrix:
target: [x86_64-unknown-linux-gnux32]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install libc and libgcc
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libc6-dev-x32 libx32gcc-11-dev
- uses: Swatinem/rust-cache@v2
- run: cargo build --target=${{ matrix.target }} --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_getrandom"
run: cargo build --target=${{ matrix.target }} --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_rustix"
run: cargo build --target=${{ matrix.target }} --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_test_linux_fallback
run: cargo build --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="rdrand"
run: cargo build --features=std

rdrand:
name: RDRAND
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [
Expand All @@ -122,7 +154,7 @@ jobs:

rndr:
name: RNDR
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -145,7 +177,7 @@ jobs:

esp-idf:
name: ESP-IDF
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly # Required to build libcore
Expand All @@ -158,7 +190,7 @@ jobs:

no-atomics:
name: No Atomics
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nopanic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:

cross:
name: Cross
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand Down
36 changes: 12 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022]
os: [ubuntu-24.04, windows-2022]
toolchain: [nightly, beta, stable, "1.63"]
# Only Test macOS on stable to reduce macOS CI jobs
include:
Expand All @@ -42,35 +42,23 @@ jobs:

linux:
name: Linux
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [x86_64-unknown-linux-musl, i686-unknown-linux-musl]
include:
- target: i686-unknown-linux-gnu
packages: libc6-dev-i386 lib32gcc-11-dev
- target: x86_64-unknown-linux-gnux32
packages: libc6-dev-x32 libx32gcc-11-dev
# TODO: Find a Linux image/runner with CONFIG_X86_X32_ABI set
cargo_test_opts: --no-run
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install libc and libgcc
if: matrix.packages
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends ${{ matrix.packages }}
- uses: Swatinem/rust-cache@v2
- run: cargo test ${{ matrix.cargo_test_opts }} --target=${{ matrix.target }} --features=std
- run: cargo test --target=${{ matrix.target }} --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_getrandom"
run: cargo test ${{ matrix.cargo_test_opts }} --target=${{ matrix.target }} --features=std
run: cargo test --target=${{ matrix.target }} --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_rustix"
run: cargo test ${{ matrix.cargo_test_opts }} --target=${{ matrix.target }} --features=std
run: cargo test --target=${{ matrix.target }} --features=std
- env:
RUSTFLAGS: -Dwarnings --cfg getrandom_test_linux_fallback
run: cargo test --features=std
Expand Down Expand Up @@ -144,7 +132,7 @@ jobs:

sanitizer:
name: Sanitizer
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -158,7 +146,7 @@ jobs:

cross:
name: Cross
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
target: [
Expand All @@ -182,7 +170,7 @@ jobs:

freebsd:
name: FreeBSD VM
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Test in FreeBSD
Expand All @@ -196,7 +184,7 @@ jobs:

openbsd:
name: OpenBSD VM
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Test in OpenBSD
Expand All @@ -210,7 +198,7 @@ jobs:

netbsd:
name: NetBSD VM
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Test in NetBSD
Expand All @@ -226,7 +214,7 @@ jobs:
# https://github.com/rust-random/getrandom/actions/runs/11405005618/job/31735653874?pr=528
# dragonflybsd:
# name: DragonflyBSD VM
# runs-on: ubuntu-22.04
# runs-on: ubuntu-24.04
# steps:
# - uses: actions/checkout@v4
# - name: Test in DragonflyBSD
Expand Down Expand Up @@ -285,7 +273,7 @@ jobs:

wasi:
name: WASI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
RUSTFLAGS: "-Dwarnings"
steps:
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:

fmt:
name: rustfmt
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -98,7 +98,7 @@ jobs:

check-doc:
name: rustdoc
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand Down

0 comments on commit cddf861

Please sign in to comment.