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
30 changes: 19 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: Build Images
on: [push, pull_request, workflow_dispatch]
name: build
on:
workflow_dispatch:
pull_request:
push:
branches: [ main ]

jobs:
build:
name: ${{ matrix.image.name }}
runs-on: ubuntu-24.04

strategy:
matrix:
image:
- guest-fedora-41
- guest-ubuntu-oracular
- guest-debian-bookworm
- path: guest/fedora/41
name: guest-fedora-41
- path: guest/ubuntu/oracular
name: guest-ubuntu-oracular
- path: guest/debian/bookworm
name: guest-debian-bookworm

steps:
- uses: actions/checkout@v4
Expand All @@ -21,18 +29,18 @@ jobs:
sudo apt-get update
sudo apt-get install -y mkosi qemu-utils systemd-ukify systemd-boot policycoreutils mtools

- name: Build ${{ matrix.image }}
run: sudo mkosi -C ${{ matrix.image }}/
- name: Build ${{ matrix.image.name }}
run: sudo mkosi -C ${{ matrix.image.path }}/

- name: Convert raw image to qcow2
run: |
qemu-img convert -f raw -O qcow2 ${{ matrix.image }}/image.raw ${{ matrix.image }}/image.qcow2
qemu-img convert -f raw -O qcow2 ${{ matrix.image.path }}/image.raw ${{ matrix.image.path }}/image.qcow2

- name: Upload image
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.image }}
name: ${{ matrix.image.name }}
path: |
${{ matrix.image }}/image.efi
${{ matrix.image }}/image.qcow2
${{ matrix.image.path }}/image.efi
${{ matrix.image.path }}/image.qcow2
retention-days: 7
11 changes: 7 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: Style Checks
on: [push, pull_request]
name: lint
on:
pull_request:
push:
branches: [ main ]

jobs:
commits:
name: Check Conventional Commit Syntax
name: conventional commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: webiny/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
allowed-commit-types: "feat,fix,build,chore,ci,docs,style,refactor,perf,test"
allowed-commit-types: "feat,fix,build,chore,ci,docs,style,refactor,perf,test"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Individual guest tests should be written as systemd services.
```sh
$ qemu-kvm -m 2G \
-bios /usr/share/edk2/ovmf/OVMF_CODE.fd \
-kernel guest-fedora-41/image.efi \
-hda guest-fedora-41/image.qcow2
-kernel guest/fedora/41/image.efi \
-hda guest/fedora/41/image.qcow2
```

4. <ins>**Launch SNP Guest:** </ins> Run an SNP guest with the direct boot options and kernel-hashes=on for the confidential guest measured boot:
Expand All @@ -30,12 +30,12 @@ $ qemu-system-x86_64 \
-cpu EPYC-v4 \
-smp 1 \
-device virtio-blk-pci,drive=disk0,id=scsi0 \
-drive file=guest-fedora-41/image.qcow2,if=none,id=disk0 \
-drive file=guest/fedora/41/image.qcow2,if=none,id=disk0 \
-machine memory-encryption=sev0,vmport=off \
-object memory-backend-memfd,id=ram1,size=2048M \
-machine memory-backend=ram1 \
-object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,kernel-hashes=on \
-bios /usr/share/edk2/ovmf/OVMF.amdsev.fd \
-kernel guest-fedora-41/image.efi \
-kernel guest/fedora/41/image.efi \
-nographic
```
10 changes: 0 additions & 10 deletions guest-fedora-41/mkosi.conf

This file was deleted.

5 changes: 5 additions & 0 deletions guest/debian/bookworm/mkosi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Include]
Include=../

[Distribution]
Release=bookworm
3 changes: 1 addition & 2 deletions guest-debian-bookworm/mkosi.conf → guest/debian/mkosi.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[Include]
Include=../common/
Include=../

[Distribution]
Distribution=debian
Release=bookworm

[Content]
Packages=linux-image-generic,systemd,systemd-boot,resolvconf,locales
5 changes: 5 additions & 0 deletions guest/fedora/41/mkosi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Include]
Include=../

[Distribution]
Release=41
9 changes: 9 additions & 0 deletions guest/fedora/mkosi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Include]
Include=../

[Distribution]
Distribution=fedora

[Content]
Packages=kernel,selinux-policy-targeted,systemd,systemd-boot-unsigned,systemd-networkd,systemd-resolved
SELinuxRelabel=yes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions guest-ubuntu-oracular/mkosi.conf → guest/ubuntu/mkosi.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[Include]
Include=../common/
Include=../

[Distribution]
Distribution=ubuntu
Release=oracular
Repositories=universe

[Content]
Expand Down
5 changes: 5 additions & 0 deletions guest/ubuntu/oracular/mkosi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Include]
Include=../

[Distribution]
Release=oracular