Skip to content

Commit

Permalink
.github: workflows: add spread tests to the build test pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac True <isaac.true@canonical.com>
  • Loading branch information
IsaacJT committed Apr 13, 2023
1 parent 3f4084a commit 0434174
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/nemos-images-minimal-lunar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,41 @@ jobs:
system build \
--description nemos-images-minimal-lunar/qemu-amd64/ \
--target-dir build
sudo mv build/nemos-image-minimal-lunar.*.raw \
nemos-image-minimal-lunar.raw
sudo zstd nemos-image-minimal-lunar.raw
- name: "Archive"
uses: "actions/upload-artifact@v3"
with:
name: "nemos-images-minimal-lunar"
path: |
nemos-image-minimal-lunar.raw.zst
spread:
runs-on: "ubuntu-22.04"
needs: "qemu-amd64"
steps:
- uses: "actions/checkout@v2"
- 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
- name: "Install spread"
run: |
go install github.com/snapcore/spread/cmd/spread@latest
- name: "Download QEMU image"
uses: actions/download-artifact@v3
with:
name: "nemos-images-minimal-lunar"
- name: "Copy QEMU image to spread directory"
run: |
mkdir -p ~/.spread/qemu
zstd -d nemos-image-minimal-lunar.raw.zst -o \
~/.spread/qemu/nemos-image-minimal-lunar.img
- name: "Run the spread tests inside QEMU"
run: |
~/go/bin/spread -v qemu:nemos-image-minimal-lunar
40 changes: 39 additions & 1 deletion .github/workflows/nemos-images-reference-lunar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,46 @@ jobs:
apt install -y kiwi kiwi-systemdeps
- name: "Run Kiwi"
run: |
sudo kiwi-ng --debug --profile bootstrapped \
sudo kiwi-ng --debug --profile development \
--config nemos-images-reference-lunar/kiwi.yaml \
system build \
--description nemos-images-reference-lunar/qemu-amd64/ \
--target-dir build
sudo mv build/nemos-image-reference-lunar.*.raw \
nemos-image-reference-lunar.raw
sudo zstd nemos-image-reference-lunar.raw
- name: "Archive"
uses: "actions/upload-artifact@v3"
with:
name: "nemos-images-reference-lunar"
path: |
nemos-image-reference-lunar.raw.zst
spread:
runs-on: "ubuntu-22.04"
needs: "qemu-amd64"
steps:
- uses: "actions/checkout@v2"
- 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
- name: "Install spread"
run: |
go install github.com/snapcore/spread/cmd/spread@latest
- name: "Download QEMU image"
uses: actions/download-artifact@v3
with:
name: "nemos-images-reference-lunar"
- name: "Copy QEMU image to spread directory"
run: |
mkdir -p ~/.spread/qemu
zstd -d nemos-image-reference-lunar.raw.zst -o \
~/.spread/qemu/nemos-image-reference-lunar.img
- name: "Run the spread tests inside QEMU"
run: |
~/go/bin/spread -v qemu:nemos-image-reference-lunar

0 comments on commit 0434174

Please sign in to comment.