Skip to content

Commit

Permalink
ERL-270: github: workflows: nemos-images: add qemu-arm64 build action
Browse files Browse the repository at this point in the history
This makes use of the kiwi box build plugin to create an arm64 VM.

Signed-off-by: Isaac True <[email protected]>
  • Loading branch information
IsaacJT committed Aug 28, 2023
1 parent 3449c3a commit 49c2595
Showing 1 changed file with 48 additions and 5 deletions.
53 changes: 48 additions & 5 deletions .github/workflows/nemos-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,55 @@ jobs:
with:
name: "nemos-image-${{ matrix.config }}-${{ matrix.series }}-amd64"
path: "nemos-image-${{ matrix.config }}-${{ matrix.series }}-amd64.qcow2"
qemu-arm64:
runs-on: "ubuntu-latest"
strategy:
matrix:
series:
- lunar
- mantic
config:
- minimal
- reference
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Update system packages"
run: |
sudo apt update
sudo DEBIAN_FRONTEND="noninteractive" \
apt full-upgrade -y
- name: "Setup Kiwi PPA"
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:nemos-team/kiwi
- name: "Install Kiwi"
run: |
sudo DEBIAN_FRONTEND="noninteractive" \
apt install -y kiwi kiwi-systemdeps python3-kiwi-boxed-plugin \
qemu-system-arm
- name: "Run Kiwi"
run: |
sudo kiwi-ng --debug --profile bootstrapped \
system boxbuild \
--box ubuntu --aarch64 --machine=virt --no-accel --cpu cortex-a53 \
--box-memory=$(( 2 * 1024 )) --box-smp-cpus=2 -- \
--target-dir build \
--description nemos-images-${{ matrix.config }}-${{ matrix.series }}/qemu-arm64/
sudo mv build/nemos-image-${{ matrix.config }}-${{ matrix.series }}.*.qcow2 \
nemos-image-${{ matrix.config }}-${{ matrix.series }}-arm64.qcow2
sudo chmod a+r nemos-image-${{ matrix.config }}-${{ matrix.series }}-arm64.qcow2
- name: "Archive"
uses: "actions/upload-artifact@v3"
with:
name: "nemos-image-${{ matrix.config }}-${{ matrix.series }}-arm64"
path: "nemos-image-${{ matrix.config }}-${{ matrix.series }}-arm64.qcow2"

spread:
runs-on: "ubuntu-latest"
needs: "qemu-amd64"
needs:
- "qemu-amd64"
- "qemu-arm64"
steps:
- uses: "actions/checkout@v3"
- name: "Update system packages"
Expand All @@ -67,7 +113,4 @@ jobs:
mkdir -p ~/.spread/adhoc
mv -v nemos-image-*/*.qcow2 ~/.spread/adhoc/
- name: "Run the spread tests inside QEMU"
run: |
# Currently, we only support amd64. Use the spread wildcard selector
# to make sure we only run those images.
~/go/bin/spread -v "adhoc:...-amd64"
run: "~/go/bin/spread -v adhoc:"

0 comments on commit 49c2595

Please sign in to comment.