Skip to content

Commit 75f72d6

Browse files
authored
Merge pull request containerd#9456 from fuweid/enable-arm64
*: enable ARM64 runner
2 parents 9e4d53d + cb5a48e commit 75f72d6

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
strategy:
3030
matrix:
31-
os: [ubuntu-22.04, macos-12, windows-2019]
31+
os: [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019]
3232

3333
steps:
3434
- uses: actions/setup-go@v4
@@ -208,7 +208,7 @@ jobs:
208208

209209
strategy:
210210
matrix:
211-
os: [ubuntu-22.04, macos-12, windows-2019, windows-2022]
211+
os: [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
212212
go-version: ["1.20.12", "1.21.5"]
213213
steps:
214214
- uses: actions/setup-go@v4
@@ -396,7 +396,7 @@ jobs:
396396
397397
integration-linux:
398398
name: Linux Integration
399-
runs-on: ubuntu-22.04
399+
runs-on: ${{ matrix.os }}
400400
timeout-minutes: 40
401401
needs: [project, linters, protos, man]
402402

@@ -406,6 +406,7 @@ jobs:
406406
runtime:
407407
- io.containerd.runc.v2
408408
runc: [runc, crun]
409+
os: [ubuntu-22.04, actuated-arm64-4cpu-16gb]
409410

410411
env:
411412
GOTEST: gotestsum --
@@ -422,14 +423,18 @@ jobs:
422423
RUNC_FLAVOR: ${{ matrix.runc }}
423424
run: |
424425
sudo apt-get update
425-
sudo apt-get install -y gperf
426+
sudo apt-get install -y gperf dmsetup strace xfsprogs
426427
script/setup/install-seccomp
427428
script/setup/install-runc
428429
script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')
429430
script/setup/install-critools
430431
script/setup/install-failpoint-binaries
431432
432433
- name: Install criu
434+
# NOTE: Required actuated enable CONFIG_CHECKPOINT_RESTORE
435+
#
436+
# REF: https://criu.org/Linux_kernel
437+
if: matrix.os != 'actuated-arm64-4cpu-16gb'
433438
run: |
434439
sudo add-apt-repository -y ppa:criu/ppa
435440
sudo apt-get update
@@ -514,7 +519,9 @@ jobs:
514519
losetup -l
515520
- name: Kernel Message
516521
if: failure()
517-
run: sudo dmesg -T -f kern
522+
run: |
523+
sudo lsmod
524+
sudo dmesg -T -f kern
518525
519526
- uses: actions/upload-artifact@v3
520527
if: always()

mount/mount_idmapped_linux_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"syscall"
2424
"testing"
2525

26+
kernel "github.com/containerd/containerd/v2/contrib/seccomp/kernelversion"
2627
"github.com/containerd/continuity/testutil"
2728
"github.com/stretchr/testify/require"
2829
"golang.org/x/sys/unix"
@@ -45,6 +46,13 @@ var (
4546
func TestGetUsernsFD(t *testing.T) {
4647
testutil.RequiresRoot(t)
4748

49+
k512 := kernel.KernelVersion{Kernel: 5, Major: 12}
50+
ok, err := kernel.GreaterEqualThan(k512)
51+
require.NoError(t, err)
52+
if !ok {
53+
t.Skip("GetUsernsFD requires kernel >= 5.12")
54+
}
55+
4856
t.Run("basic", testGetUsernsFDBasic)
4957

5058
t.Run("when kill child process before write u[g]id maps", testGetUsernsFDKillChildWhenWriteUGIDMaps)

script/setup/install-critools

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
2525
# e2e will fail with "sudo: command not found"
2626
SUDO=''
2727
if (( $EUID != 0 )); then
28-
SUDO='sudo'
28+
# The actuated ARM64 env needs PATH=$PATH to get `go` path. Otherwise
29+
# `make install` recipe will fail.
30+
SUDO="sudo -E PATH=$PATH"
2931
fi
3032

3133
cd "$(go env GOPATH)"

0 commit comments

Comments
 (0)