44 push :
55 branches : [main]
66 pull_request :
7+ branches : [main]
78
89jobs :
9- e2e :
10+ e2e-fedora :
1011 runs-on : ubuntu-latest
1112
1213 steps :
@@ -21,22 +22,28 @@ jobs:
2122
2223 - name : Install dependencies
2324 run : |
25+ # noble's buildah 1.33 does not support COPY <<heredoc inline-file
26+ # syntax; plucky has buildah 1.38+ and podman 5.x which do.
27+ # crun is also pulled from plucky because podman 5.x requires a
28+ # newer crun than noble provides.
29+ echo 'deb http://archive.ubuntu.com/ubuntu plucky main universe' \
30+ | sudo tee /etc/apt/sources.list.d/plucky.list
2431 sudo apt-get update -q
2532 sudo apt-get install -y -q \
26- just qemu-system-x86 ovmf podman skopeo python3-pexpect \
27- python3-virt-firmware
33+ just qemu-system-x86 ovmf python3-pexpect python3-virt-firmware
34+ sudo apt-get install -y -q -t plucky podman buildah skopeo crun
2835
2936 - name : Set up Docker Buildx
3037 uses : docker/setup-buildx-action@v3
3138
32- # Build the base image from source (covers PRs that change Containerfile.base
39+ # Build the base image from source (covers PRs that change Containerfile.fedora
3340 # or the Rust code compiled inside it). Layer cache keeps this fast after
3441 # the first run.
3542 - name : Build base image
3643 uses : docker/build-push-action@v6
3744 with :
3845 context : .
39- file : Containerfile.base
46+ file : Containerfile.fedora
4047 target : grub
4148 push : false
4249 load : true
7178 uses : docker/build-push-action@v6
7279 with :
7380 context : .
74- file : Containerfile.base
81+ file : Containerfile.fedora
7582 target : uki
7683 push : false
7784 load : true
@@ -100,7 +107,7 @@ jobs:
100107 uses : docker/build-push-action@v6
101108 with :
102109 context : .
103- file : Containerfile.base
110+ file : Containerfile.fedora
104111 target : uki-secureboot
105112 push : false
106113 load : true
@@ -134,3 +141,133 @@ jobs:
134141 disk-uki.raw
135142 disk-uki-sb.raw
136143 retention-days : 1
144+
145+ e2e-ubuntu :
146+ runs-on : ubuntu-latest
147+
148+ steps :
149+ - uses : actions/checkout@v4
150+
151+ - name : Enable KVM
152+ run : |
153+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
154+ | sudo tee /etc/udev/rules.d/99-kvm4all.rules
155+ sudo udevadm control --reload-rules
156+ sudo udevadm trigger --name-match=kvm
157+
158+ - name : Install dependencies
159+ run : |
160+ # noble's buildah 1.33 does not support COPY <<heredoc inline-file
161+ # syntax; plucky has buildah 1.38+ and podman 5.x which do.
162+ # crun is also pulled from plucky because podman 5.x requires a
163+ # newer crun than noble provides.
164+ echo 'deb http://archive.ubuntu.com/ubuntu plucky main universe' \
165+ | sudo tee /etc/apt/sources.list.d/plucky.list
166+ sudo apt-get update -q
167+ sudo apt-get install -y -q \
168+ just qemu-system-x86 ovmf python3-pexpect python3-virt-firmware
169+ sudo apt-get install -y -q -t plucky podman buildah skopeo crun
170+
171+ - name : Set up Docker Buildx
172+ uses : docker/setup-buildx-action@v3
173+
174+ - name : Build Ubuntu base image (GRUB)
175+ uses : docker/build-push-action@v6
176+ with :
177+ context : .
178+ file : Containerfile.ubuntu
179+ target : grub
180+ push : false
181+ load : true
182+ tags : composefs-os:ubuntu-26.04
183+ cache-from : type=gha,scope=ubuntu
184+ cache-to : type=gha,mode=max,scope=ubuntu
185+
186+ - name : Load Ubuntu base image into podman
187+ run : |
188+ sudo skopeo copy \
189+ docker-daemon:composefs-os:ubuntu-26.04 \
190+ containers-storage:localhost/composefs-os:ubuntu-26.04
191+
192+ - name : Build Ubuntu test image
193+ run : sudo just build-example-ubuntu localhost/composefs-os:ubuntu-26.04
194+
195+ - name : Install to disk image (Ubuntu GRUB)
196+ run : just install-disk composefs-os-ubuntu-test:latest disk-ubuntu.raw 5G
197+
198+ - name : Run e2e tests (Ubuntu GRUB)
199+ run : just e2e disk-ubuntu.raw
200+
201+ - name : Install to disk image (Ubuntu GRUB + Secure Boot)
202+ run : just install-disk-secureboot composefs-os-ubuntu-test:latest disk-ubuntu-sb.raw 5G
203+
204+ - name : Run e2e tests (Ubuntu GRUB + Secure Boot)
205+ run : just e2e-secureboot disk-ubuntu-sb.raw
206+
207+ - name : Build Ubuntu UKI base image
208+ uses : docker/build-push-action@v6
209+ with :
210+ context : .
211+ file : Containerfile.ubuntu
212+ target : uki
213+ push : false
214+ load : true
215+ tags : composefs-os:ubuntu-26.04-uki
216+ cache-from : type=gha,scope=ubuntu
217+ cache-to : type=gha,mode=max,scope=ubuntu
218+
219+ - name : Load Ubuntu UKI base image into podman
220+ run : |
221+ sudo skopeo copy \
222+ docker-daemon:composefs-os:ubuntu-26.04-uki \
223+ containers-storage:localhost/composefs-os:ubuntu-26.04-uki
224+
225+ - name : Build Ubuntu UKI test image
226+ run : sudo just build-example-ubuntu-uki localhost/composefs-os:ubuntu-26.04-uki
227+
228+ - name : Install to disk image (Ubuntu UKI)
229+ run : just install-disk-uki composefs-os-ubuntu-uki-test:latest disk-ubuntu-uki.raw 5G
230+
231+ - name : Run e2e tests (Ubuntu UKI)
232+ run : |
233+ OVMF_VARS=$(find /usr/share -name 'OVMF_VARS.fd' ! -name '*.secboot*' ! -name '*.ms.*' | head -1)
234+ just e2e-uki disk-ubuntu-uki.raw "$OVMF_VARS"
235+
236+ - name : Build Ubuntu UKI+SB base image
237+ uses : docker/build-push-action@v6
238+ with :
239+ context : .
240+ file : Containerfile.ubuntu
241+ target : uki-secureboot
242+ push : false
243+ load : true
244+ tags : composefs-os:ubuntu-26.04-uki-sb
245+ cache-from : type=gha,scope=ubuntu
246+ cache-to : type=gha,mode=max,scope=ubuntu
247+
248+ - name : Load Ubuntu UKI+SB base image into podman
249+ run : |
250+ sudo skopeo copy \
251+ docker-daemon:composefs-os:ubuntu-26.04-uki-sb \
252+ containers-storage:localhost/composefs-os:ubuntu-26.04-uki-sb
253+
254+ - name : Build Ubuntu UKI+SB test image
255+ run : sudo just build-example-ubuntu-uki-secureboot localhost/composefs-os:ubuntu-26.04-uki-sb
256+
257+ - name : Install to disk image (Ubuntu UKI+SB)
258+ run : just install-disk-uki-secureboot composefs-os-ubuntu-uki-sb-test:latest disk-ubuntu-uki-sb.raw 5G
259+
260+ - name : Run e2e tests (Ubuntu UKI+SB)
261+ run : just e2e-uki-secureboot disk-ubuntu-uki-sb.raw
262+
263+ - name : Upload Ubuntu disk images on failure
264+ if : failure()
265+ uses : actions/upload-artifact@v4
266+ with :
267+ name : disk-ubuntu-raw
268+ path : |
269+ disk-ubuntu.raw
270+ disk-ubuntu-sb.raw
271+ disk-ubuntu-uki.raw
272+ disk-ubuntu-uki-sb.raw
273+ retention-days : 1
0 commit comments