Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Sep 11, 2023
1 parent 095d545 commit e20c902
Showing 1 changed file with 62 additions and 11 deletions.
73 changes: 62 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
- push

jobs:
test-x86_64:
test-ubuntu:
name: Test on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Install qemu-utils
Expand Down Expand Up @@ -52,30 +53,80 @@ jobs:
--script-chroot \
alpine-uefi-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
test-aarch64:
- name: Install qemu-aarch64 and register in binfmt
uses: jirutka/setup-alpine@v1
with:
arch: aarch64

- name: Build image for aarch64
run: |
sudo ./alpine-make-vm-image \
--arch aarch64 \
--image-format qcow2 \
--image-size 2G \
--repositories-file example/repositories \
--packages "$(cat example/packages)" \
--fs-skel-dir example/rootfs \
--fs-skel-chown root:root \
--script-chroot \
alpine-aarch64-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
test-alpine:
name: Test on Alpine x86_64
runs-on: ubuntu-latest
steps:
- name: Install qemu-utils
- uses: actions/checkout@v3

# We must run this outside the chroot.
- run: sudo modprobe nbd max_part=16

- name: Set up latest Alpine Linux
uses: jirutka/setup-alpine@v1

- name: Build image with BIOS boot mode and without partition
run: |
sudo apt-get update
sudo apt-get install qemu-utils
./alpine-make-vm-image \
--image-format qcow2 \
--image-size 2G \
--repositories-file example/repositories \
--packages "$(cat example/packages)" \
--fs-skel-dir example/rootfs \
--fs-skel-chown root:root \
--script-chroot \
alpine-bios-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
shell: alpine.sh --root {0}

- uses: actions/checkout@v3
- name: Build image with UEFI boot mode
run: |
./alpine-make-vm-image \
--image-format qcow2 \
--image-size 2G \
--boot-mode UEFI \
--repositories-file example/repositories \
--packages "$(cat example/packages)" \
--fs-skel-dir example/rootfs \
--fs-skel-chown root:root \
--script-chroot \
alpine-uefi-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
shell: alpine.sh --root {0}

# This installs qemu userspace emulator and registers in binfmt.
- uses: jirutka/setup-alpine@v1
- name: Install qemu-aarch64 and register in binfmt
uses: jirutka/setup-alpine@v1
with:
arch: aarch64
shell-name: alpine-aarch64.sh

- name: Build image for aarch64 on x86_64 host
# Note: We cannot run alpine-make-vm-image inside emulated chroot due to nbd.
- name: Build image for aarch64
run: |
sudo ./alpine-make-vm-image \
./alpine-make-vm-image \
--arch aarch64 \
--image-format qcow2 \
--image-size 2G \
--arch aarch64 \
--repositories-file example/repositories \
--packages "$(cat example/packages)" \
--fs-skel-dir example/rootfs \
--fs-skel-chown root:root \
--script-chroot \
alpine-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh
shell: alpine.sh --root {0}

0 comments on commit e20c902

Please sign in to comment.