Skip to content

Commit 12d3544

Browse files
committed
Remove arm/v7 from testing
Signed-off-by: apostasie <[email protected]>
1 parent 5c06c7d commit 12d3544

File tree

3 files changed

+13
-45
lines changed

3 files changed

+13
-45
lines changed

.github/workflows/test-canary.yml

-5
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,8 @@ jobs:
3434
sudo losetup -lv
3535
- name: "Register QEMU (tonistiigi/binfmt)"
3636
run: |
37-
# `--install all` will only install emulation for architectures that cannot be natively executed
38-
# Since some arm64 platforms do provide native fallback execution for 32 bits,
39-
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
40-
# To avoid that, we explicitly list the architectures we do want emulation for.
4137
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
4238
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
43-
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
4439
- name: "Run unit tests"
4540
run: go test -v ./pkg/...
4641
- name: "Run integration tests"

.github/workflows/test.yml

-20
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,8 @@ jobs:
132132
sudo losetup -lv
133133
- name: "Register QEMU (tonistiigi/binfmt)"
134134
run: |
135-
# `--install all` will only install emulation for architectures that cannot be natively executed
136-
# Since some arm64 platforms do provide native fallback execution for 32 bits,
137-
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
138-
# To avoid that, we explicitly list the architectures we do want emulation for.
139135
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
140136
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
141-
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
142137
- name: "Run integration tests"
143138
run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=false
144139
- name: "Run integration tests (flaky)"
@@ -190,13 +185,8 @@ jobs:
190185
sudo losetup -lv
191186
- name: "Register QEMU (tonistiigi/binfmt)"
192187
run: |
193-
# `--install all` will only install emulation for architectures that cannot be natively executed
194-
# Since some arm64 platforms do provide native fallback execution for 32 bits,
195-
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
196-
# To avoid that, we explicitly list the architectures we do want emulation for.
197188
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
198189
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
199-
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
200190
- name: "Run integration tests"
201191
# The nested IPv6 network inside docker and qemu is complex and needs a bunch of sysctl config.
202192
# Therefore, it's hard to debug why the IPv6 tests fail in such an isolation layer.
@@ -265,13 +255,8 @@ jobs:
265255
fetch-depth: 1
266256
- name: "Register QEMU (tonistiigi/binfmt)"
267257
run: |
268-
# `--install all` will only install emulation for architectures that cannot be natively executed
269-
# Since some arm64 platforms do provide native fallback execution for 32 bits,
270-
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
271-
# To avoid that, we explicitly list the architectures we do want emulation for.
272258
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
273259
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
274-
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
275260
- name: "Expose GitHub Runtime variables for gha"
276261
uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3.1.0
277262
- name: "Prepare (network driver=slirp4netns, port driver=builtin)"
@@ -327,13 +312,8 @@ jobs:
327312
check-latest: true
328313
- name: "Register QEMU (tonistiigi/binfmt)"
329314
run: |
330-
# `--install all` will only install emulation for architectures that cannot be natively executed
331-
# Since some arm64 platforms do provide native fallback execution for 32 bits,
332-
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
333-
# To avoid that, we explicitly list the architectures we do want emulation for.
334315
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
335316
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
336-
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
337317
- name: "Prepare integration test environment"
338318
run: |
339319
# FIXME: remove expect when we are done removing unbuffer from tests

cmd/nerdctl/container/multi_platform_linux_test.go

+13-20
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ import (
3232

3333
func testMultiPlatformRun(base *testutil.Base, alpineImage string) {
3434
t := base.T
35-
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
35+
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
3636
testCases := map[string]string{
37-
"amd64": "x86_64",
38-
"arm64": "aarch64",
39-
"arm": "armv7l",
40-
"linux/arm": "armv7l",
41-
"linux/arm/v7": "armv7l",
37+
"amd64": "x86_64",
38+
"arm64": "aarch64",
39+
"linux/arm64": "aarch64",
40+
"linux/arm64/v8": "aarch64",
4241
}
4342
for plat, expectedUnameM := range testCases {
4443
t.Logf("Testing %q (%q)", plat, expectedUnameM)
@@ -56,7 +55,7 @@ func TestMultiPlatformBuildPush(t *testing.T) {
5655
testutil.DockerIncompatible(t) // non-buildx version of `docker build` lacks multi-platform. Also, `docker push` lacks --platform.
5756
testutil.RequiresBuild(t)
5857
testutil.RegisterBuildCacheCleanup(t)
59-
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
58+
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
6059
base := testutil.NewBase(t)
6160
tID := testutil.Identifier(t)
6261
reg := testregistry.NewWithNoAuth(base, 0, false)
@@ -71,9 +70,9 @@ RUN echo dummy
7170

7271
buildCtx := helpers.CreateBuildContext(t, dockerfile)
7372

74-
base.Cmd("build", "-t", imageName, "--platform=amd64,arm64,linux/arm/v7", buildCtx).AssertOK()
73+
base.Cmd("build", "-t", imageName, "--platform=amd64,linux/arm64/v8", buildCtx).AssertOK()
7574
testMultiPlatformRun(base, imageName)
76-
base.Cmd("push", "--platform=amd64,arm64,linux/arm/v7", imageName).AssertOK()
75+
base.Cmd("push", "--platform=amd64,linux/arm64/v8", imageName).AssertOK()
7776
}
7877

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

9998
buildCtx := helpers.CreateBuildContext(t, dockerfile)
10099

101-
base.Cmd("build", "-t", imageName, "--platform=amd64,arm64,linux/arm/v7", buildCtx).AssertOK()
100+
base.Cmd("build", "-t", imageName, "--platform=amd64,linux/arm64/v8", buildCtx).AssertOK()
102101
testMultiPlatformRun(base, imageName)
103-
base.Cmd("push", "--platform=amd64,arm64,linux/arm/v7", imageName).AssertOK()
102+
base.Cmd("push", "--platform=amd64,linux/arm64/v8", imageName).AssertOK()
104103
}
105104

106105
func TestMultiPlatformPullPushAllPlatforms(t *testing.T) {
@@ -123,7 +122,7 @@ func TestMultiPlatformComposeUpBuild(t *testing.T) {
123122
testutil.DockerIncompatible(t)
124123
testutil.RequiresBuild(t)
125124
testutil.RegisterBuildCacheCleanup(t)
126-
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64", "linux/arm/v7")
125+
testutil.RequireExecPlatform(t, "linux/amd64", "linux/arm64")
127126
base := testutil.NewBase(t)
128127

129128
const dockerComposeYAML = `
@@ -135,14 +134,9 @@ services:
135134
- 8080:80
136135
svc1:
137136
build: .
138-
platform: arm64
137+
platform: linux/arm64/v8
139138
ports:
140139
- 8081:80
141-
svc2:
142-
build: .
143-
platform: linux/arm/v7
144-
ports:
145-
- 8082:80
146140
`
147141
dockerfile := fmt.Sprintf(`FROM %s
148142
RUN uname -m > /usr/share/nginx/html/index.html
@@ -159,7 +153,6 @@ RUN uname -m > /usr/share/nginx/html/index.html
159153
testCases := map[string]string{
160154
"http://127.0.0.1:8080": "x86_64",
161155
"http://127.0.0.1:8081": "aarch64",
162-
"http://127.0.0.1:8082": "armv7l",
163156
}
164157

165158
for testURL, expectedIndexHTML := range testCases {

0 commit comments

Comments
 (0)