Skip to content
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

CI: Fix Docker multi-platform builds #357

Merged
merged 1 commit into from
Oct 19, 2024
Merged
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: 4 additions & 1 deletion .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ jobs:
matrix:
include:
- image: arm64v8/ubuntu:jammy
platform: linux/arm64
packages: libelf-dev linux-headers-generic
- image: arm32v7/alt:latest
platform: linux/arm/v7
packages: elfutils kernel-headers-modules-std-def
- image: i386/ubuntu:bionic
platform: linux/386
packages: libelf-dev linux-headers-generic
steps:
- uses: docker/setup-qemu-action@v2
Expand All @@ -44,6 +47,6 @@ jobs:
RUN make -j\$(nproc) KERNELRELEASE=\$(cd /lib/modules; ls)
RUN file lkrg.ko
EOF
- run: docker build .
- run: docker build --platform=${{ matrix.platform }} .

# vim: sw=4
3 changes: 2 additions & 1 deletion .github/workflows/docker-boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
PATH=$PATH:/sbin

image=ubuntu:jammy
platform=linux/amd64
qemu=qemu-system-x86_64
opts="-bios bios.bin"
console=ttyS0
Expand All @@ -23,7 +24,7 @@ td=$(mktemp -d)
# Generate system and build in the Docker.
docker build --tag test -f - . <<EOF
# bionic is the latest Ubuntu with i386 support.
FROM $image
FROM --platform=$platform $image
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update -y && \
apt-get install -y \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
# install: qemu-system-x86

- args: image=arm64v8/ubuntu:jammy
platform=linux/arm64
opts="-M virt,gic-version=3 -cpu cortex-a57"
console=ttyAMA0
root=/dev/vda
Expand All @@ -22,6 +23,7 @@ jobs:
# It's possible to use: opts="-M raspi2b" dtb=bcm2709-rpi-2-b.dtb root=/dev/mmcblk0
# but since power-off is unreliable anyway (until QEMU 6.2) use simpler virt machine.
- args: image=arm32v7/ubuntu:jammy
platform=linux/arm/v7
opts="-M virt"
console=ttyAMA0
root=/dev/vda
Expand Down
Loading