Skip to content

Commit f09128e

Browse files
DaanDeMeyerbluca
authored andcommitted
ci: Switch to Ubuntu 24.04
(cherry picked from commit d5474f7) (cherry picked from commit d006e13) (cherry picked from commit b6540ad) (cherry picked from commit af16350)
1 parent 1be5bf8 commit f09128e

File tree

12 files changed

+40
-19
lines changed

12 files changed

+40
-19
lines changed

.github/workflows/build_test.sh

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ PACKAGES=(
2121
expect
2222
fdisk
2323
gettext
24+
gnu-efi
2425
iputils-ping
2526
isc-dhcp-client
2627
itstool
@@ -77,6 +78,14 @@ if [[ "$COMPILER" == clang ]]; then
7778
CXX="clang++-$COMPILER_VERSION"
7879
AR="llvm-ar-$COMPILER_VERSION"
7980

81+
if systemd-analyze compare-versions "$COMPILER_VERSION" ge 17; then
82+
CFLAGS="-fno-sanitize=function"
83+
CXXFLAGS="-fno-sanitize=function"
84+
else
85+
CFLAGS=""
86+
CXXFLAGS=""
87+
fi
88+
8089
# Prefer the distro version if available
8190
if ! apt install --dry-run "llvm-$COMPILER_VERSION" >/dev/null; then
8291
# Latest LLVM stack deb packages provided by https://apt.llvm.org/
@@ -91,6 +100,8 @@ elif [[ "$COMPILER" == gcc ]]; then
91100
CC="gcc-$COMPILER_VERSION"
92101
CXX="g++-$COMPILER_VERSION"
93102
AR="gcc-ar-$COMPILER_VERSION"
103+
CFLAGS=""
104+
CXXFLAGS=""
94105

95106
if ! apt install --dry-run "gcc-$COMPILER_VERSION" >/dev/null; then
96107
# Latest gcc stack deb packages provided by
@@ -103,16 +114,20 @@ else
103114
fatal "Unknown compiler: $COMPILER"
104115
fi
105116

106-
# PPA with some newer build dependencies (like zstd)
107-
add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
108-
apt-get -y update
109-
apt-get -y build-dep systemd
110-
apt-get -y install "${PACKAGES[@]}"
117+
# This is added by default, and it is often broken, but we don't need anything from it
118+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.{list,sources}
119+
# add-apt-repository --enable-source does not work on deb822 style sources.
120+
for f in /etc/apt/sources.list.d/*.sources; do
121+
sudo sed -i "s/Types: deb/Types: deb deb-src/g" "$f"
122+
done
123+
sudo apt-get -y update
124+
sudo apt-get -y build-dep systemd
125+
sudo apt-get -y install "${PACKAGES[@]}"
111126
# Install more or less recent meson and ninja with pip, since the distro versions don't
112127
# always support all the features we need (like --optimization=). Since the build-dep
113128
# command above installs the distro versions, let's install the pip ones just
114129
# locally and add the local bin directory to the $PATH.
115-
pip3 install --user -r .github/workflows/requirements.txt --require-hashes
130+
pip3 install --user -r .github/workflows/requirements.txt --require-hashes --break-system-packages
116131
export PATH="$HOME/.local/bin:$PATH"
117132

118133
$CC --version
@@ -139,8 +154,8 @@ for args in "${ARGS[@]}"; do
139154
info "Checking build with $args"
140155
# shellcheck disable=SC2086
141156
if ! AR="$AR" \
142-
CC="$CC" CC_LD="$LD" CFLAGS="-Werror" \
143-
CXX="$CXX" CXX_LD="$LD" CXXFLAGS="-Werror" \
157+
CC="$CC" CC_LD="$LD" CFLAGS="$CFLAGS" \
158+
CXX="$CXX" CXX_LD="$LD" CXXFLAGS="$CXXFLAGS" \
144159
meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
145160
-Dnobody-group=nogroup -Dcryptolib="${CRYPTOLIB:?}" \
146161
$args build; then

.github/workflows/build_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
jobs:
1919
build:
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
concurrency:
2222
group: ${{ github.workflow }}-${{ toJSON(matrix.env) }}-${{ github.ref }}
2323
cancel-in-progress: true

.github/workflows/cflite_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions: read-all
1313

1414
jobs:
1515
PR:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
if: github.repository != 'systemd/systemd' || github.event.pull_request.user.login == 'dependabot[bot]'
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ github.ref }}

.github/workflows/cifuzz.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ on:
2222
- main
2323
jobs:
2424
Fuzzing:
25-
runs-on: ubuntu-latest
25+
# FIXME: Figure out why 32-bit applications fail to run in docker on Ubuntu 24.04.
26+
runs-on: ubuntu-22.04
2627
if: github.repository == 'systemd/systemd'
2728
concurrency:
2829
group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ matrix.architecture }}-${{ github.ref }}

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ permissions:
2626
jobs:
2727
analyze:
2828
name: Analyze
29-
runs-on: ubuntu-22.04
29+
runs-on: ubuntu-24.04
3030
concurrency:
3131
group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
3232
cancel-in-progress: true

.github/workflows/coverity.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
build:
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-24.04
1818
if: github.repository == 'systemd/systemd'
1919
env:
2020
# Set in repo settings -> secrets -> actions

.github/workflows/differential-shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
lint:
1515
if: github.event.repository.name != 'systemd-security'
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717

1818
permissions:
1919
security-events: write

.github/workflows/issue_labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
label-component:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414

1515
permissions:
1616
issues: write

.github/workflows/make_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
release:
1313
if: github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable'
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515

1616
permissions:
1717
contents: write

.github/workflows/mkosi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525

2626
jobs:
2727
ci:
28-
runs-on: ubuntu-22.04
28+
runs-on: ubuntu-24.04
2929
concurrency:
3030
group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}
3131
cancel-in-progress: true
@@ -53,7 +53,7 @@ jobs:
5353
# (should be done by the end of 2022).
5454
- name: Fix C9S/EPEL9
5555
if: ${{ matrix.release == '9-stream' }}
56-
run: sudo sed -i '/add_packages/s/systemd-boot/systemd/g' /usr/local/lib/python3.10/dist-packages/mkosi/__init__.py
56+
run: sudo sed -i '/add_packages/s/systemd-boot/systemd/g' /usr/local/lib/python3.12/dist-packages/mkosi/__init__.py
5757

5858
# FIXME: temporary workaround for debootstrap issue of Debian testing/sid on Jammy
5959
- name: Fix Debian testing/sid

0 commit comments

Comments
 (0)