Skip to content

Commit 67f6c37

Browse files
committed
ci/gha: switch to ubuntu 24.04
Let's replace ubuntu-22.04 with ubuntu-24.04 where we can, and keep ubuntu-20.04 to test cgroup v1 stuff. Leave ubuntu-22.04 for ci/cross-i386 (issue with systemctl restart hang after apt install). This can be addressed separately later. The only kludge we have to add is enable userns for runc binary being tested (as userns is disabled by apparmor system-wide by default now, see [1]). [1] https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions-15 Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 73bb57e commit 67f6c37

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
os: [ubuntu-20.04, ubuntu-22.04, actuated-arm64-6cpu-8gb]
26+
os: [ubuntu-20.04, ubuntu-24.04, actuated-arm64-6cpu-8gb]
2727
go-version: [1.20.x, 1.21.x]
2828
rootless: ["rootless", ""]
2929
race: ["-race", ""]
@@ -158,6 +158,12 @@ jobs:
158158
with:
159159
bats-version: 1.9.0
160160

161+
- name: Allow userns for runc
162+
# https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions-15
163+
if: matrix.os == 'ubuntu-24.04'
164+
run: |
165+
sed "s;^profile runc /usr/sbin/;profile runc-test $PWD/;" < /etc/apparmor.d/runc | sudo apparmor_parser
166+
161167
- name: unit test
162168
if: matrix.rootless != 'rootless'
163169
env:
@@ -174,7 +180,7 @@ jobs:
174180
sudo cp $HOME/rootless.key /home/rootless/.ssh/id_ecdsa
175181
sudo cp $HOME/rootless.key.pub /home/rootless/.ssh/authorized_keys
176182
sudo chown -R rootless.rootless /home/rootless
177-
sudo chmod a+X $HOME # for Ubuntu 22.04
183+
sudo chmod a+X $HOME # for Ubuntu 22.04 and later
178184
179185
- name: integration test (fs driver)
180186
run: sudo -E PATH="$PATH" script -e -c 'make local${{ matrix.rootless }}integration'

.github/workflows/validate.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
keyring:
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-24.04
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: check runc.keyring
@@ -26,7 +26,7 @@ jobs:
2626
contents: read
2727
pull-requests: read
2828
checks: write # to allow the action to annotate code in the PR.
29-
runs-on: ubuntu-22.04
29+
runs-on: ubuntu-24.04
3030
steps:
3131
- uses: actions/checkout@v4
3232
with:
@@ -48,7 +48,7 @@ jobs:
4848
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1
4949
5050
compile-buildtags:
51-
runs-on: ubuntu-22.04
51+
runs-on: ubuntu-24.04
5252
env:
5353
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
5454
CGO_CFLAGS: -g -O2 -Werror
@@ -62,24 +62,24 @@ jobs:
6262
run: make BUILDTAGS=""
6363

6464
codespell:
65-
runs-on: ubuntu-22.04
65+
runs-on: ubuntu-24.04
6666
steps:
6767
- uses: actions/checkout@v4
6868
- name: install deps
6969
# Version of codespell bundled with Ubuntu is way old, so use pip.
70-
run: pip install codespell==v2.3.0
70+
run: pip install --break-system-packages codespell==v2.3.0
7171
- name: run codespell
7272
run: codespell
7373

7474
shfmt:
75-
runs-on: ubuntu-22.04
75+
runs-on: ubuntu-24.04
7676
steps:
7777
- uses: actions/checkout@v4
7878
- name: shfmt
7979
run: make shfmt
8080

8181
shellcheck:
82-
runs-on: ubuntu-22.04
82+
runs-on: ubuntu-24.04
8383
steps:
8484
- uses: actions/checkout@v4
8585
- name: install shellcheck
@@ -110,7 +110,7 @@ jobs:
110110
- run: if git -P grep -I -n '\s$'; then echo "^^^ extra whitespace at EOL, please fix"; exit 1; fi
111111

112112
deps:
113-
runs-on: ubuntu-22.04
113+
runs-on: ubuntu-24.04
114114
steps:
115115
- uses: actions/checkout@v4
116116
- name: install go
@@ -125,7 +125,7 @@ jobs:
125125
permissions:
126126
contents: read
127127
pull-requests: read
128-
runs-on: ubuntu-22.04
128+
runs-on: ubuntu-24.04
129129
# Only check commits on pull requests.
130130
if: github.event_name == 'pull_request'
131131
steps:
@@ -143,7 +143,7 @@ jobs:
143143
error: 'Subject too long (max 72)'
144144

145145
cfmt:
146-
runs-on: ubuntu-22.04
146+
runs-on: ubuntu-24.04
147147
steps:
148148
- name: checkout
149149
uses: actions/checkout@v4
@@ -161,7 +161,7 @@ jobs:
161161
162162
release:
163163
timeout-minutes: 30
164-
runs-on: ubuntu-22.04
164+
runs-on: ubuntu-24.04
165165
steps:
166166
- name: checkout
167167
uses: actions/checkout@v4
@@ -192,7 +192,7 @@ jobs:
192192

193193

194194
get-images:
195-
runs-on: ubuntu-22.04
195+
runs-on: ubuntu-24.04
196196
steps:
197197
- uses: actions/checkout@v4
198198
with:

0 commit comments

Comments
 (0)