Skip to content

Commit

Permalink
Merge pull request containerd#9456 from fuweid/enable-arm64
Browse files Browse the repository at this point in the history
*: enable ARM64 runner
  • Loading branch information
samuelkarp authored Dec 10, 2023
2 parents 9e4d53d + cb5a48e commit 75f72d6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

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

steps:
- uses: actions/setup-go@v4
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2019, windows-2022]
os: [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
go-version: ["1.20.12", "1.21.5"]
steps:
- uses: actions/setup-go@v4
Expand Down Expand Up @@ -396,7 +396,7 @@ jobs:
integration-linux:
name: Linux Integration
runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
timeout-minutes: 40
needs: [project, linters, protos, man]

Expand All @@ -406,6 +406,7 @@ jobs:
runtime:
- io.containerd.runc.v2
runc: [runc, crun]
os: [ubuntu-22.04, actuated-arm64-4cpu-16gb]

env:
GOTEST: gotestsum --
Expand All @@ -422,14 +423,18 @@ jobs:
RUNC_FLAVOR: ${{ matrix.runc }}
run: |
sudo apt-get update
sudo apt-get install -y gperf
sudo apt-get install -y gperf dmsetup strace xfsprogs
script/setup/install-seccomp
script/setup/install-runc
script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')
script/setup/install-critools
script/setup/install-failpoint-binaries
- name: Install criu
# NOTE: Required actuated enable CONFIG_CHECKPOINT_RESTORE
#
# REF: https://criu.org/Linux_kernel
if: matrix.os != 'actuated-arm64-4cpu-16gb'
run: |
sudo add-apt-repository -y ppa:criu/ppa
sudo apt-get update
Expand Down Expand Up @@ -514,7 +519,9 @@ jobs:
losetup -l
- name: Kernel Message
if: failure()
run: sudo dmesg -T -f kern
run: |
sudo lsmod
sudo dmesg -T -f kern
- uses: actions/upload-artifact@v3
if: always()
Expand Down
8 changes: 8 additions & 0 deletions mount/mount_idmapped_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"syscall"
"testing"

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

k512 := kernel.KernelVersion{Kernel: 5, Major: 12}
ok, err := kernel.GreaterEqualThan(k512)
require.NoError(t, err)
if !ok {
t.Skip("GetUsernsFD requires kernel >= 5.12")
}

t.Run("basic", testGetUsernsFDBasic)

t.Run("when kill child process before write u[g]id maps", testGetUsernsFDKillChildWhenWriteUGIDMaps)
Expand Down
4 changes: 3 additions & 1 deletion script/setup/install-critools
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
# e2e will fail with "sudo: command not found"
SUDO=''
if (( $EUID != 0 )); then
SUDO='sudo'
# The actuated ARM64 env needs PATH=$PATH to get `go` path. Otherwise
# `make install` recipe will fail.
SUDO="sudo -E PATH=$PATH"
fi

cd "$(go env GOPATH)"
Expand Down

0 comments on commit 75f72d6

Please sign in to comment.