Skip to content

Commit 953e1cc

Browse files
committed
ci/gha: switch to or add ubuntu 22.04
For test jobs, add ubuntu 22.04 into the matrix, so we can test of both cgroup v1 and v2. For validate jobs, just switch to ubuntu 22.04 Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent d8a3daa commit 953e1cc

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ env:
1919

2020
jobs:
2121
test:
22-
runs-on: ubuntu-20.04
2322
strategy:
2423
fail-fast: false
2524
matrix:
25+
os: [ubuntu-20.04, ubuntu-22.04]
2626
go-version: [1.19.x, 1.20.x]
2727
rootless: ["rootless", ""]
2828
race: ["-race", ""]
29-
criu: [""]
30-
include:
31-
# Also test against latest criu-dev
32-
- go-version: 1.19.x
33-
rootless: ""
34-
race: ""
35-
criu: "criu-dev"
29+
criu: ["", "criu-dev"]
30+
exclude:
31+
- criu: criu-dev
32+
rootless: rootless
33+
- criu: criu-dev
34+
go-version: 1.19.x
35+
- criu: criu-dev
36+
race: -race
37+
runs-on: ${{ matrix.os }}
3638

3739
steps:
3840

@@ -42,9 +44,10 @@ jobs:
4244
- name: install deps
4345
if: matrix.criu == ''
4446
env:
45-
REPO: https://download.opensuse.org/repositories/devel:/tools:/criu/xUbuntu_20.04
47+
PREFIX: https://download.opensuse.org/repositories/devel:/tools:/criu/xUbuntu
4648
run: |
4749
# criu repo
50+
REPO=${PREFIX}_$(echo ${{ matrix.os }} | sed 's/.*-//')
4851
curl -fSsl $REPO/Release.key | sudo apt-key add -
4952
echo "deb $REPO/ /" | sudo tee /etc/apt/sources.list.d/criu.list
5053
sudo apt update
@@ -64,6 +67,7 @@ jobs:
6467
- name: install go ${{ matrix.go-version }}
6568
uses: actions/setup-go@v4
6669
with:
70+
cache: false # https://github.com/actions/setup-go/issues/368
6771
go-version: ${{ matrix.go-version }}
6872

6973
- name: build
@@ -88,6 +92,7 @@ jobs:
8892
sudo cp $HOME/rootless.key /home/rootless/.ssh/id_ecdsa
8993
sudo cp $HOME/rootless.key.pub /home/rootless/.ssh/authorized_keys
9094
sudo chown -R rootless.rootless /home/rootless
95+
sudo chmod a+X $HOME # for Ubuntu 22.04
9196
9297
- name: integration test (fs driver)
9398
run: sudo -E PATH="$PATH" script -e -c 'make local${{ matrix.rootless }}integration'
@@ -101,7 +106,7 @@ jobs:
101106
# However, we do not have 32-bit ARM CI, so we use i386 for testing 32bit stuff.
102107
# We are not interested in providing official support for i386.
103108
cross-i386:
104-
runs-on: ubuntu-20.04
109+
runs-on: ubuntu-22.04
105110

106111
steps:
107112

.github/workflows/validate.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
permissions:
1919
contents: read
2020
pull-requests: read
21-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-22.04
2222
steps:
2323
- uses: actions/checkout@v3
2424
with:
@@ -40,7 +40,7 @@ jobs:
4040
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1 --out-format=github-actions
4141
4242
compile-buildtags:
43-
runs-on: ubuntu-20.04
43+
runs-on: ubuntu-22.04
4444
env:
4545
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
4646
CGO_CFLAGS: -g -O2 -Werror
@@ -54,7 +54,7 @@ jobs:
5454
run: make BUILDTAGS=""
5555

5656
codespell:
57-
runs-on: ubuntu-20.04
57+
runs-on: ubuntu-22.04
5858
steps:
5959
- uses: actions/checkout@v3
6060
- name: install deps
@@ -64,14 +64,14 @@ jobs:
6464
run: codespell
6565

6666
shfmt:
67-
runs-on: ubuntu-20.04
67+
runs-on: ubuntu-22.04
6868
steps:
6969
- uses: actions/checkout@v3
7070
- name: shfmt
7171
run: make shfmt
7272

7373
shellcheck:
74-
runs-on: ubuntu-20.04
74+
runs-on: ubuntu-22.04
7575
steps:
7676
- uses: actions/checkout@v3
7777
- name: install shellcheck
@@ -95,7 +95,7 @@ jobs:
9595
run : ./script/check-config.sh
9696

9797
deps:
98-
runs-on: ubuntu-20.04
98+
runs-on: ubuntu-22.04
9999
steps:
100100
- uses: actions/checkout@v3
101101
- name: install go
@@ -118,7 +118,7 @@ jobs:
118118
permissions:
119119
contents: read
120120
pull-requests: read
121-
runs-on: ubuntu-20.04
121+
runs-on: ubuntu-22.04
122122
# Only check commits on pull requests.
123123
if: github.event_name == 'pull_request'
124124
steps:
@@ -136,7 +136,7 @@ jobs:
136136
error: 'Subject too long (max 72)'
137137

138138
cfmt:
139-
runs-on: ubuntu-20.04
139+
runs-on: ubuntu-22.04
140140
steps:
141141
- name: checkout
142142
uses: actions/checkout@v3
@@ -153,7 +153,7 @@ jobs:
153153
154154
155155
release:
156-
runs-on: ubuntu-20.04
156+
runs-on: ubuntu-22.04
157157
steps:
158158
- name: checkout
159159
uses: actions/checkout@v3
@@ -184,7 +184,7 @@ jobs:
184184

185185

186186
get-images:
187-
runs-on: ubuntu-20.04
187+
runs-on: ubuntu-22.04
188188
steps:
189189
- uses: actions/checkout@v3
190190
with:

0 commit comments

Comments
 (0)