-
Notifications
You must be signed in to change notification settings - Fork 2
111 lines (109 loc) · 3.93 KB
/
nemos-images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
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: |
BUILD_DIR="$(mktemp -d)"
# 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.config }}" = "reference" ]; then
PROFILE="development"
else
PROFILE="bootstrapped"
fi
if [ "${{ matrix.arch }}" = "amd64" ]; then
sudo kiwi-ng --debug --profile "${PROFILE}" \
--config nemos-images-${{ matrix.config }}-${{ matrix.series }}/kiwi.yaml \
system build --target-dir "${BUILD_DIR}" \
--description nemos-images-${{ matrix.config }}-${{ matrix.series }}/qemu-${{ matrix.arch}}/
else
sudo kiwi-ng --debug --profile "${PROFILE}" \
system boxbuild \
--box ubuntu --aarch64 --machine=virt --no-accel --cpu cortex-a53 \
--box-memory=$(( 2 * 1024 )) --box-smp-cpus=2 -- \
--target-dir "${BUILD_DIR}" \
--description nemos-images-${{ matrix.config }}-${{ matrix.series }}/qemu-${{ matrix.arch }}/
fi
# Copy the resulting image to the spread directory
mkdir -p ~/.spread/adhoc
sudo mv -v "${BUILD_DIR}"/*.qcow2 \
~/.spread/adhoc/nemos-image-${{ matrix.config }}-${{ matrix.series }}-${{ matrix.arch }}.qcow2
sudo chmod a+rw ~/.spread/adhoc/*.qcow2
# Clean up
sudo rm -rf "${BUILD_DIR}"
- name: "Install spread"
run: |
go clean -modcache
go install github.com/snapcore/spread/cmd/spread@latest
- name: "Run the spread tests inside QEMU"
run: |
sudo ln -svr ${HOME}/.spread /root/.spread
sudo ~/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/