Skip to content

[CI]: remove arm/v7 from testing #4156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/test-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,8 @@ jobs:
sudo losetup -lv
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Run unit tests"
run: go test -v ./pkg/...
- name: "Run integration tests"
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,8 @@ jobs:
sudo losetup -lv
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Run integration tests"
run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=false
- name: "Run integration tests (flaky)"
Expand Down Expand Up @@ -190,13 +185,8 @@ jobs:
sudo losetup -lv
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Run integration tests"
# The nested IPv6 network inside docker and qemu is complex and needs a bunch of sysctl config.
# Therefore, it's hard to debug why the IPv6 tests fail in such an isolation layer.
Expand Down Expand Up @@ -265,13 +255,8 @@ jobs:
fetch-depth: 1
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Expose GitHub Runtime variables for gha"
uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3.1.0
- name: "Prepare (network driver=slirp4netns, port driver=builtin)"
Expand Down Expand Up @@ -327,13 +312,8 @@ jobs:
check-latest: true
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Prepare integration test environment"
run: |
# FIXME: remove expect when we are done removing unbuffer from tests
Expand Down
33 changes: 13 additions & 20 deletions cmd/nerdctl/container/multi_platform_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ import (

func testMultiPlatformRun(base *testutil.Base, alpineImage string) {
t := base.T
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
testCases := map[string]string{
"amd64": "x86_64",
"arm64": "aarch64",
"arm": "armv7l",
"linux/arm": "armv7l",
"linux/arm/v7": "armv7l",
"amd64": "x86_64",
"arm64": "aarch64",
"linux/arm64": "aarch64",
"linux/arm64/v8": "aarch64",
}
for plat, expectedUnameM := range testCases {
t.Logf("Testing %q (%q)", plat, expectedUnameM)
Expand All @@ -56,7 +55,7 @@ func TestMultiPlatformBuildPush(t *testing.T) {
testutil.DockerIncompatible(t) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
testutil.RequiresBuild(t)
testutil.RegisterBuildCacheCleanup(t)
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
base := testutil.NewBase(t)
tID := testutil.Identifier(t)
reg := testregistry.NewWithNoAuth(base, 0, false)
Expand All @@ -71,9 +70,9 @@ RUN echo dummy

buildCtx := helpers.CreateBuildContext(t, dockerfile)

base.Cmd("build", "-t", imageName, "--platform=amd64,arm64,linux/arm/v7", buildCtx).AssertOK()
base.Cmd("build", "-t", imageName, "--platform=amd64,linux/arm64/v8", buildCtx).AssertOK()
testMultiPlatformRun(base, imageName)
base.Cmd("push", "--platform=amd64,arm64,linux/arm/v7", imageName).AssertOK()
base.Cmd("push", "--platform=amd64,linux/arm64/v8", imageName).AssertOK()
}

// TestMultiPlatformBuildPushNoRun tests if the push succeeds in a situation where nerdctl builds
Expand All @@ -83,7 +82,7 @@ func TestMultiPlatformBuildPushNoRun(t *testing.T) {
testutil.DockerIncompatible(t) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
testutil.RequiresBuild(t)
testutil.RegisterBuildCacheCleanup(t)
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
base := testutil.NewBase(t)
tID := testutil.Identifier(t)
reg := testregistry.NewWithNoAuth(base, 0, false)
Expand All @@ -98,9 +97,9 @@ CMD echo dummy

buildCtx := helpers.CreateBuildContext(t, dockerfile)

base.Cmd("build", "-t", imageName, "--platform=amd64,arm64,linux/arm/v7", buildCtx).AssertOK()
base.Cmd("build", "-t", imageName, "--platform=amd64,linux/arm64/v8", buildCtx).AssertOK()
testMultiPlatformRun(base, imageName)
base.Cmd("push", "--platform=amd64,arm64,linux/arm/v7", imageName).AssertOK()
base.Cmd("push", "--platform=amd64,linux/arm64/v8", imageName).AssertOK()
}

func TestMultiPlatformPullPushAllPlatforms(t *testing.T) {
Expand All @@ -123,7 +122,7 @@ func TestMultiPlatformComposeUpBuild(t *testing.T) {
testutil.DockerIncompatible(t)
testutil.RequiresBuild(t)
testutil.RegisterBuildCacheCleanup(t)
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
base := testutil.NewBase(t)

const dockerComposeYAML = `
Expand All @@ -135,14 +134,9 @@ services:
- 8080:80
svc1:
build: .
platform: arm64
platform: linux/arm64/v8
ports:
- 8081:80
svc2:
build: .
platform: linux/arm/v7
ports:
- 8082:80
`
dockerfile := fmt.Sprintf(`FROM %s
RUN uname -m > /usr/share/nginx/html/index.html
Expand All @@ -159,7 +153,6 @@ RUN uname -m > /usr/share/nginx/html/index.html
testCases := map[string]string{
"http://127.0.0.1:8080": "x86_64",
"http://127.0.0.1:8081": "aarch64",
"http://127.0.0.1:8082": "armv7l",
}

for testURL, expectedIndexHTML := range testCases {
Expand Down