Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,36 @@ jobs:
tags: ghcr.io/${{ github.repository_owner }}/composefs-os:ubuntu-26.04-uki-sb
cache-from: type=gha,scope=ubuntu
cache-to: type=gha,mode=max,scope=ubuntu

- name: Build and push composefs-os:arch-latest (GRUB)
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile.arch
target: grub
push: true
tags: ghcr.io/${{ github.repository_owner }}/composefs-os:arch-latest
cache-from: type=gha,scope=arch
cache-to: type=gha,mode=max,scope=arch

- name: Build and push composefs-os:arch-latest-uki (systemd-boot + UKI)
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile.arch
target: uki
push: true
tags: ghcr.io/${{ github.repository_owner }}/composefs-os:arch-latest-uki
cache-from: type=gha,scope=arch
cache-to: type=gha,mode=max,scope=arch

- name: Build and push composefs-os:arch-latest-uki-sb (systemd-boot + UKI + Secure Boot)
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile.arch
target: uki-secureboot
push: true
tags: ghcr.io/${{ github.repository_owner }}/composefs-os:arch-latest-uki-sb
cache-from: type=gha,scope=arch
cache-to: type=gha,mode=max,scope=arch
137 changes: 137 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,143 @@ jobs:
disk-uki-sb.raw
retention-days: 1

e2e-arch:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Install dependencies
run: |
# noble's buildah 1.33 does not support COPY <<heredoc inline-file
# syntax; plucky has buildah 1.38+ and podman 5.x which do.
# crun is also pulled from plucky because podman 5.x requires a
# newer crun than noble provides.
echo 'deb http://archive.ubuntu.com/ubuntu plucky main universe' \
| sudo tee /etc/apt/sources.list.d/plucky.list
sudo apt-get update -q
sudo apt-get install -y -q \
just qemu-system-x86 ovmf python3-pexpect python3-virt-firmware
sudo apt-get install -y -q -t plucky podman buildah skopeo crun

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Arch base image (GRUB)
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile.arch
target: grub
push: false
load: true
tags: composefs-os:arch-latest
cache-from: type=gha,scope=arch
cache-to: type=gha,mode=max,scope=arch

- name: Load Arch base image into podman
run: |
sudo skopeo copy \
docker-daemon:composefs-os:arch-latest \
containers-storage:localhost/composefs-os:arch-latest

- name: Build Arch test image
run: sudo just build-example-arch localhost/composefs-os:arch-latest

- name: Install to disk image (Arch GRUB)
run: just install-disk composefs-os-arch-test:latest disk-arch.raw 5G

- name: Run e2e tests (Arch GRUB)
run: just e2e disk-arch.raw

- name: Build Arch UKI base image
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile.arch
target: uki
push: false
load: true
tags: composefs-os:arch-latest-uki
cache-from: type=gha,scope=arch
cache-to: type=gha,mode=max,scope=arch

- name: Load Arch UKI base image into podman
run: |
sudo skopeo copy \
docker-daemon:composefs-os:arch-latest-uki \
containers-storage:localhost/composefs-os:arch-latest-uki

- name: Build Arch UKI test image
run: sudo just build-example-arch-uki localhost/composefs-os:arch-latest-uki

- name: Install to disk image (Arch UKI)
run: just install-disk-uki composefs-os-arch-uki-test:latest disk-arch-uki.raw 5G

- name: Run e2e tests (Arch UKI)
run: |
OVMF_VARS=$(find /usr/share -name 'OVMF_VARS.fd' ! -name '*.secboot*' ! -name '*.ms.*' | head -1)
just e2e-uki disk-arch-uki.raw "$OVMF_VARS"

- name: Build Arch UKI+SB base image
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile.arch
target: uki-secureboot
push: false
load: true
tags: composefs-os:arch-latest-uki-sb
cache-from: type=gha,scope=arch
cache-to: type=gha,mode=max,scope=arch

- name: Load Arch UKI+SB base image into podman
run: |
sudo skopeo copy \
docker-daemon:composefs-os:arch-latest-uki-sb \
containers-storage:localhost/composefs-os:arch-latest-uki-sb

- name: Build Arch UKI+SB test image
run: sudo just build-example-arch-uki-secureboot localhost/composefs-os:arch-latest-uki-sb

- name: Install to disk image (Arch UKI+SB)
run: just install-disk-uki-secureboot composefs-os-arch-uki-sb-test:latest disk-arch-uki-sb.raw 5G

- name: Run e2e tests (Arch UKI+SB)
run: just e2e-uki-secureboot disk-arch-uki-sb.raw

- name: Pull registry image for upgrade tests
run: sudo podman pull docker.io/library/registry:2

- name: Run upgrade/switch/rollback tests (Arch GRUB)
run: just e2e-upgrade-arch composefs-os-arch-test:latest disk-arch.raw

- name: Run upgrade/switch/rollback tests (Arch UKI)
run: |
OVMF_VARS=$(find /usr/share -name 'OVMF_VARS.fd' ! -name '*.secboot*' ! -name '*.ms.*' | head -1)
just e2e-uki-upgrade-arch composefs-os-arch-uki-test:latest disk-arch-uki.raw "$OVMF_VARS"

- name: Run upgrade/switch/rollback tests (Arch UKI + Secure Boot)
run: just e2e-uki-upgrade-secureboot-arch composefs-os-arch-uki-sb-test:latest disk-arch-uki-sb.raw

- name: Upload Arch disk images on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: disk-arch-raw
path: |
disk-arch.raw
disk-arch-uki.raw
disk-arch-uki-sb.raw
retention-days: 1

e2e-ubuntu:
runs-on: ubuntu-latest

Expand Down
Loading
Loading