Skip to content

Commit

Permalink
Merge pull request #207 from crazy-max/test-optin-platform
Browse files Browse the repository at this point in the history
test: set requested platform and use canonical image
  • Loading branch information
crazy-max authored Dec 4, 2024
2 parents 51a9b67 + 19f7ef5 commit a461ca2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ jobs:
run: |
docker run --rm --privileged tonistiigi/binfmt:test --uninstall qemu-*
docker run --rm --privileged tonistiigi/binfmt:test --install all
docker run --rm arm64v8/alpine uname -a
docker run --rm arm32v7/alpine uname -a
docker run --rm ppc64le/alpine uname -a
docker run --rm s390x/alpine uname -a
docker run --rm tonistiigi/debian:riscv uname -a
docker run --rm yangzewei2023/debian:loongarch64 uname -a
docker run --rm --platform=linux/s390x s390x/ubuntu apt update
docker run --rm --platform=linux/ppc64le ppc64le/ubuntu apt update
docker run --rm --platform=linux/arm64 arm64v8/ubuntu apt update
docker run --rm --platform linux/arm64 alpine uname -a
docker run --rm --platform linux/arm/v7 alpine uname -a
docker run --rm --platform linux/ppc64le alpine uname -a
docker run --rm --platform linux/s390x alpine uname -a
docker run --rm --platform linux/riscv64 alpine uname -a
docker run --rm --platform linux/loong64 yangzewei2023/debian:loongarch64 uname -a
docker run --rm --platform linux/s390x ubuntu apt update
docker run --rm --platform linux/ppc64le ubuntu apt update
docker run --rm --platform linux/arm64 ubuntu apt update
-
name: Test Syscalls
if: matrix.target == 'mainline'
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ binfmt/9a44d27 qemu/v6.0.0 go/1.15.11
## Test current emulation support

```
docker run --rm arm64v8/alpine uname -a
docker run --rm arm32v7/alpine uname -a
docker run --rm ppc64le/alpine uname -a
docker run --rm s390x/alpine uname -a
docker run --rm tonistiigi/debian:riscv uname -a
docker run --rm --platform linux/arm64 alpine uname -a
docker run --rm --platform linux/arm/v7 alpine uname -a
docker run --rm --platform linux/ppc64le alpine uname -a
docker run --rm --platform linux/s390x alpine uname -a
docker run --rm --platform linux/riscv64 alpine uname -a
```

## `buildkit` target
Expand Down
16 changes: 8 additions & 8 deletions hack/install-and-test
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ echo $status | jq .supported | grep linux/386
echo $status | jq .emulators | grep qemu-riscv64
echo $status | jq .emulators | grep qemu-arm

docker run --rm arm64v8/alpine uname -a
docker run --rm arm32v7/alpine uname -a
docker run --rm ppc64le/alpine uname -a
docker run --rm s390x/alpine uname -a
docker run --rm i386/alpine uname -a
docker run --rm tonistiigi/debian:riscv uname -a
docker run --rm --platform linux/arm64 alpine uname -a
docker run --rm --platform linux/arm/v7 alpine uname -a
docker run --rm --platform linux/ppc64le alpine uname -a
docker run --rm --platform linux/s390x alpine uname -a
docker run --rm --platform linux/386 alpine uname -a
docker run --rm --platform linux/riscv64 alpine uname -a

if [ "$(uname -m)" != "x86_64" ]; then exit 0; fi

Expand All @@ -41,9 +41,9 @@ echo $status | jq .emulators | grep qemu-ppc64le
if echo $status | jq .emulators | grep aarch64; then exit 1; fi
if echo $status | jq .emulators | grep riscv64; then exit 1; fi

if docker run --rm arm64v8/alpine uname -a 2>/dev/null; then exit 1; fi
if docker run --rm --platform linux/arm64 alpine uname -a 2>/dev/null; then exit 1; fi

docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install arm64
docker run --rm arm64v8/alpine uname -a
docker run --rm --platform linux/arm64 alpine uname -a

docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install riscv64

0 comments on commit a461ca2

Please sign in to comment.