ci: the ISO's install test runs on Steam Machine hardware and on a plain PC (3 VMs at a time each, the plain PC after)
Sync git.upriser.nl mirror / sync (push) Skipped

This commit is contained in:
theupriser committed 2026-09-30 10:12:52 +02:00
1 parent a7f84cd5a0
commit 504f066a3f
2 files changed
+73 -5

No files matched your search

+72 -4
View File
@@ -95,8 +95,8 @@ jobs:
out/desktop/*.pkgs.txt
retention-days: 3
test:
name: Test ${{ matrix.loader }}
test-fremont:
name: Steam Machine ${{ matrix.loader }}
needs: build
runs-on: ubuntu-latest
timeout-minutes: 90
@@ -136,7 +136,7 @@ jobs:
unzip -q iso.zip -d iso && rm iso.zip
ls -la iso
- name: Boot loader test (${{ matrix.loader }})
- name: Boot loader test, Steam Machine (${{ matrix.loader }})
env:
CI: "1"
VM_TIMEZONE: UTC
@@ -161,9 +161,77 @@ jobs:
done
true
test-generic:
name: Plain PC ${{ matrix.loader }}
# After the Steam Machine tests (RAM: 3 VMs at a time), also when one of those failed.
needs: [build, test-fremont]
if: ${{ !cancelled() && needs.build.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 90
container:
image: docker.io/cachyos/cachyos:latest
options: --privileged
strategy:
fail-fast: false
# max-parallel is ignored by this runner (it starts all three), so the VMs are lean: 3 x 5 GB to install.
max-parallel: 2
matrix:
loader: [limine, systemd-boot, grub]
defaults:
run:
shell: bash
# No `uses:` in this job on purpose: the three jobs start in the same second, and the runner clones every
# action into one shared folder (they broke each other's checkout of actions/cache). Plain git and curl instead.
steps:
- name: Tools and KVM
run: |
pacman-key --init && pacman-key --populate
pacman -Syu --noconfirm --needed qemu-desktop edk2-ovmf openssh libarchive procps-ng util-linux python git sudo curl unzip
# Fail at once, with a reason, when the runner cannot run a VM with KVM.
[ -c /dev/kvm ] || { echo "::error::no /dev/kvm in this container: the runner needs KVM (and privileged containers)"; exit 1; }
nproc; free -g | sed -n 2p; df -h . | tail -n 1
# The test scripts expect their repos side by side: steamify-cachyos-dev (the scripts), steamify-cachyos at
# the Steamify version the ISO has (shared into the VM, 9p `repo`), and the ISO this run built (its artifact).
- name: Scripts, Steamify and the ISO
run: |
base="${{ github.server_url }}"
git clone -q --depth 1 "$base/theupriser/steamify-cachyos-dev" steamify-cachyos-dev
git clone -q --depth 1 --branch "v${{ needs.build.outputs.steamify }}" "$base/theupriser/steamify-cachyos" steamify-cachyos
api="$base/api/v1/repos/${{ github.repository }}/actions"
id="$(curl -fsS "$api/runs/${{ github.run_id }}/artifacts" | python3 -c "import json,sys; print(next(a['id'] for a in json.load(sys.stdin)['artifacts'] if a['name']=='iso'))")"
curl -fsSL --retry 5 --retry-all-errors -o iso.zip "$api/artifacts/$id/zip"
unzip -q iso.zip -d iso && rm iso.zip
ls -la iso
- name: Boot loader test, plain PC (${{ matrix.loader }})
env:
CI: "1"
VM_TIMEZONE: UTC
# The runner is 4 cores / 8 threads: three VMs with 2 vCPUs leave 2 threads for the host and the runner.
VM_CPUS: "2"
# RAM of the live installer VM (the ISO is read from its cdrom, only the overlay and the installer use RAM).
VM_INSTALL_MEM: 5G
VM_ISO_DIR: ${{ github.workspace }}/iso
run: |
mkdir -p ~/.ssh ~/vms/pkg-cache
ssh-keygen -q -t ed25519 -N "" -C steamify-vm -f ~/.ssh/steamify-vm_ed25519
iso="$(ls "$VM_ISO_DIR"/*.iso | head -n 1)"
cd steamify-cachyos-dev
VM_ISO="$iso" scripts/vmbootloadertest.sh "${{ matrix.loader }}" --install --quick --generic
# The logs go into this job's log (public), no artifact action needed.
- name: VM logs
if: always()
run: |
for f in ~/vms/bl-${{ matrix.loader }}-generic/install.log ~/vms/bl-${{ matrix.loader }}-generic/serial.log ~/vms/bl-${{ matrix.loader }}-generic/vm.log; do
[ -s "$f" ] && { echo "::group::$f (last 150 lines)"; tail -n 150 "$f" | sed 's/\x1b\[[0-9;]*m//g'; echo "::endgroup::"; }
done
true
release:
name: Release
needs: [build, test]
needs: [build, test-fremont, test-generic]
runs-on: ubuntu-latest
container:
image: docker.io/cachyos/cachyos:latest
+1 -1
View File
@@ -119,7 +119,7 @@ Full write-up, with every trap: `steamify-iso-release` in steamify-cachyos-dev.
GitHub's UTC time, `vX.Y.Z-[dev.]YYYY.MM.DD-HHMM`, an **annotated** tag and a release with notes and the direct
download link. `feat/steamify` makes a `dev.` pre-release, `master` a real one.
- `.github/workflows/iso-2-gitea-build.yml` (Gitea, `on: push: tags: v*`, skipped on GitHub) runs three jobs for that
tag: build the ISO, test it (steamify-cachyos-dev's `scripts/vmbootloadertest.sh --install --quick` (only that the ISO installs correctly: boot entry, OS name, loader, Steamify state and modules; steamify.sh itself is tested in steamify-cachyos), two lanes,
tag: build the ISO, test it (steamify-cachyos-dev's `scripts/vmbootloadertest.sh --install --quick` (only that the ISO installs correctly: boot entry, OS name, loader, Steamify state and modules; steamify.sh itself is tested in steamify-cachyos) per loader on a VM that reports Steam Machine hardware (`--fremont`: poweroff, cec and the 3 DKMS modules must be there), then the same with `--generic` on a plain PC (they must not),
parallel up to the runner's capacity; needs `/dev/kvm` on the runner and checks out steamify-cachyos-dev `main` and
steamify-cachyos at the ISO's version from the mirror), and only when all tests passed attach it to the mirror's release. The tag decides everything: Steamify version (`steamify-prepare.sh`
takes `STEAMIFY_VERSION`), file name (`STEAMIFY_ISO_VERSION` -> `iso_version` in `profiledef.sh`), label