Skip to content

ERL-270: github: workflows: nemos-images: build qemu-arm64 targets #54

ERL-270: github: workflows: nemos-images: build qemu-arm64 targets

ERL-270: github: workflows: nemos-images: build qemu-arm64 targets #54

Workflow file for this run

---
name: nemos-images
on:
pull_request: {}
jobs:
qemu-amd64:
runs-on: "ubuntu-latest"
strategy:
matrix:
series:
- lunar
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
- name: "Run Kiwi"
run: |
sudo kiwi-ng --debug --profile bootstrapped \
--config nemos-images-${{ matrix.config }}-${{ matrix.series }}/kiwi.yaml \
system build --target-dir build \
--description nemos-images-${{ matrix.config }}-${{ matrix.series }}/qemu-amd64/
sudo mv build/nemos-image-${{ matrix.config }}-${{ matrix.series }}.*.qcow2 \
nemos-image-${{ matrix.config }}-${{ matrix.series }}-amd64.qcow2
- name: "Archive"
uses: "actions/upload-artifact@v3"
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
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 \
--config nemos-images-${{ matrix.config }}-${{ matrix.series }}/kiwi.yaml \
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
- 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"
- "qemu-arm64"
steps:
- uses: "actions/checkout@v3"
- name: "Update system packages"
run: |
sudo apt update
sudo DEBIAN_FRONTEND="noninteractive" \
apt full-upgrade -y
- name: "Install dependencies"
run: |
sudo DEBIAN_FRONTEND="noninteractive" \
apt install -y golang ovmf qemu-system-x86 sshpass
- name: "Install spread"
run: |
go clean -modcache
go install github.com/snapcore/spread/cmd/spread@latest
- name: "Download QEMU images"
uses: actions/download-artifact@v3
- name: "Copy QEMU images to spread directory"
run: |
mkdir -p ~/.spread/adhoc
mv -v nemos-image-*/*.qcow2 ~/.spread/adhoc/
- name: "Run the spread tests inside QEMU"
run: "~/go/bin/spread -v adhoc:"