Skip to content

Commit

Permalink
Use platform flag under QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 5, 2024
1 parent d39e3de commit ec6760d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ jobs:
test-image: "ubuntu-24.04-noble-amd64"
- image: "ubuntu-22.04-jammy-arm64v8"
qemu-arch: "aarch64"
docker-args: "--platform linux/arm64"
- image: "ubuntu-24.04-noble-ppc64le"
qemu-arch: "ppc64le"
docker-args: "--platform linux/ppc64le"
- image: "ubuntu-24.04-noble-s390x"
qemu-arch: "s390x"
docker-args: "--platform linux/s390x"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -78,6 +81,7 @@ jobs:
make pull || (sudo chmod a+w . && make update && make build BRANCH=main)
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_ARGS: ${{ matrix.docker-args }}

- name: Build image
id: build
Expand All @@ -90,6 +94,7 @@ jobs:
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_ARGS: ${{ matrix.docker-args }}

- name: Test image
run: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TEST_IMAGE := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET):$(BRANCH), p
build:
cp -r ../Pillow/depends .
cp test.sh depends
docker build -t $(IMAGENAME):$(BRANCH) .
docker build -t $(IMAGENAME):$(BRANCH) $(DOCKER_ARGS) .

.PHONY: update
update:
Expand All @@ -25,7 +25,7 @@ push:

.PHONY: pull
pull:
docker pull $(TEST_IMAGE)
docker pull $(DOCKER_ARGS) $(TEST_IMAGE)

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion ubuntu-22.04-jammy-arm64v8/update.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker pull arm64v8/ubuntu:jammy
docker pull $DOCKER_ARGS arm64v8/ubuntu:jammy
2 changes: 1 addition & 1 deletion ubuntu-24.04-noble-ppc64le/update.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker pull ppc64le/ubuntu:noble
docker pull $DOCKER_ARGS ppc64le/ubuntu:noble
2 changes: 1 addition & 1 deletion ubuntu-24.04-noble-s390x/update.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker pull s390x/ubuntu:noble
docker pull $DOCKER_ARGS s390x/ubuntu:noble

0 comments on commit ec6760d

Please sign in to comment.