ci: the test jobs use no actions (the runner's shared action clone broke parallel jobs); logs go into the job log
Sync git.upriser.nl mirror / sync (push) Skipped

This commit is contained in:
theupriser committed 2026-09-30 10:03:17 +02:00
1 parent 21e52ec81c
commit a7f84cd5a0
1 file changed
+24 -53
+24 -53
View File
@@ -112,53 +112,29 @@ jobs:
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:
# First only what the cache action needs (node, git), then the caches, then the rest from the restored cache.
- name: Node and git
id: node
run: |
pacman-key --init && pacman-key --populate
pacman -Syu --noconfirm --needed nodejs git
# The caches' keys: one entry per ISO week (an exact hit saves nothing, a new week restores the old one and saves once).
echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT"
- name: Cache - pacman packages
uses: actions/cache@v4
with:
path: /var/cache/pacman/pkg
key: pacman-test-${{ steps.node.outputs.week }}
restore-keys: pacman-test-
# The guests' packages (VM_CACHE, shared into the VMs): downloaded once for every run.
- name: Cache - the VMs' packages
uses: actions/cache@v4
with:
path: /root/vms/pkg-cache
key: vmpkg-${{ needs.build.outputs.steamify }}-${{ steps.node.outputs.week }}
restore-keys: |
vmpkg-${{ needs.build.outputs.steamify }}-
vmpkg-
- name: Tools and KVM
run: |
pacman -S --noconfirm --needed qemu-desktop edk2-ovmf openssh libarchive procps-ng util-linux python git sudo
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`).
- uses: actions/checkout@v4
with:
repository: theupriser/steamify-cachyos-dev
path: steamify-cachyos-dev
- uses: actions/checkout@v4
with:
repository: theupriser/steamify-cachyos
ref: v${{ needs.build.outputs.steamify }}
path: steamify-cachyos
- uses: christopherhx/gitea-download-artifact@v4
with:
name: iso
path: iso
# 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 (${{ matrix.loader }})
env:
@@ -166,7 +142,7 @@ jobs:
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); 8 GB is the local default, lean with headroom: lower it only after a run shows the install stays well under
# 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: |
@@ -176,19 +152,14 @@ jobs:
cd steamify-cachyos-dev
VM_ISO="$iso" scripts/vmbootloadertest.sh "${{ matrix.loader }}" --install --quick
- name: Logs
# The logs go into this job's log (public), no artifact action needed.
- name: VM logs
if: always()
uses: christopherhx/gitea-upload-artifact@v4
with:
name: test-${{ matrix.loader }}
path: |
/root/vms/bl-${{ matrix.loader }}.test.log
/root/vms/bl-${{ matrix.loader }}/vm.log
/root/vms/bl-${{ matrix.loader }}/vm-install.log
/root/vms/bl-${{ matrix.loader }}/serial.log
/root/vms/bl-${{ matrix.loader }}/install.log
retention-days: 7
if-no-files-found: ignore
run: |
for f in ~/vms/bl-${{ matrix.loader }}/install.log ~/vms/bl-${{ matrix.loader }}/serial.log ~/vms/bl-${{ matrix.loader }}/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