Skip to content

Commit

Permalink
ci/gha: switch to or add ubuntu 22.04
Browse files Browse the repository at this point in the history
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 <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Apr 10, 2023
1 parent d8a3daa commit 953e1cc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ env:

jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
go-version: [1.19.x, 1.20.x]
rootless: ["rootless", ""]
race: ["-race", ""]
criu: [""]
include:
# Also test against latest criu-dev
- go-version: 1.19.x
rootless: ""
race: ""
criu: "criu-dev"
criu: ["", "criu-dev"]
exclude:
- criu: criu-dev
rootless: rootless
- criu: criu-dev
go-version: 1.19.x
- criu: criu-dev
race: -race
runs-on: ${{ matrix.os }}

steps:

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

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

steps:

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -40,7 +40,7 @@ jobs:
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1 --out-format=github-actions
compile-buildtags:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
CGO_CFLAGS: -g -O2 -Werror
Expand All @@ -54,7 +54,7 @@ jobs:
run: make BUILDTAGS=""

codespell:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install deps
Expand All @@ -64,14 +64,14 @@ jobs:
run: codespell

shfmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: shfmt
run: make shfmt

shellcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install shellcheck
Expand All @@ -95,7 +95,7 @@ jobs:
run : ./script/check-config.sh

deps:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install go
Expand All @@ -118,7 +118,7 @@ jobs:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
# Only check commits on pull requests.
if: github.event_name == 'pull_request'
steps:
Expand All @@ -136,7 +136,7 @@ jobs:
error: 'Subject too long (max 72)'

cfmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -153,7 +153,7 @@ jobs:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:


get-images:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit 953e1cc

Please sign in to comment.