ERL-270: github: workflows: nemos-images: build qemu-arm64 targets #77
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: nemos-images | |
on: | |
pull_request: {} | |
jobs: | |
qemu: | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
series: | |
- lunar | |
- mantic | |
config: | |
- minimal | |
- reference | |
arch: | |
- amd64 | |
- arm64 | |
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 and dependencies" | |
run: | | |
sudo DEBIAN_FRONTEND="noninteractive" \ | |
apt install -y kiwi kiwi-systemdeps python3-kiwi-boxed-plugin \ | |
golang sshpass qemu-system-x86 ovmf qemu-system-arm \ | |
qemu-efi-aarch64 | |
- name: "Run Kiwi" | |
run: | | |
# If we are building for amd64, then we can build natively. Otherwise, | |
# we need to use the Kiwi boxbuild plugin to build in a VM | |
if [ "${{ matrix.arch }}" = "amd64" ]; then | |
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-${{ matrix.arch}}/ | |
else | |
sudo kiwi-ng --debug --profile bootstrapped \ | |
system boxbuild \ | |
--box ubuntu --aarch64 --machine=virt --no-accel --cpu cortex-a53 \ | |
--box-memory=$(( 4 * 1024 )) --box-smp-cpus=2 -- \ | |
--target-dir build \ | |
--description nemos-images-${{ matrix.config }}-${{ matrix.series }}/qemu-${{ matrix.arch }}/ | |
fi | |
- name: "Install spread" | |
run: | | |
go clean -modcache | |
go install github.com/snapcore/spread/cmd/spread@latest | |
- name: "Copy QEMU image to spread directory" | |
run: | | |
mkdir -p ~/.spread/adhoc | |
sudo mv -v build/nemos-image*.qcow2 \ | |
~/.spread/adhoc/nemos-image-${{ matrix.config }}-${{ matrix.series }}-${{ matrix.arch }}.qcow2 | |
sudo chmod a+rw ~/.spread/adhoc/*.qcow2 | |
- name: "Run the spread tests inside QEMU" | |
run: | | |
~/go/bin/spread -v "adhoc:nemos-image-${{ matrix.config }}-${{ matrix.series }}-${{ matrix.arch }}" | |
s32g274ardb2: | |
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 }}/s32g274ardb2/ |