mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
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
Sync git.upriser.nl mirror / sync (push) Skipped
This commit is contained in:
1 parent
21e52ec81c
commit
a7f84cd5a0
1 file changed
+24
-53
@@ -112,53 +112,29 @@ jobs:
|
|||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
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:
|
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
|
- name: Tools and KVM
|
||||||
run: |
|
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.
|
# 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; }
|
[ -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
|
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),
|
# The test scripts expect their repos side by side: steamify-cachyos-dev (the scripts), steamify-cachyos at
|
||||||
# steamify-cachyos at the Steamify version the ISO has (shared into the VM, 9p `repo`).
|
# the Steamify version the ISO has (shared into the VM, 9p `repo`), and the ISO this run built (its artifact).
|
||||||
- uses: actions/checkout@v4
|
- name: Scripts, Steamify and the ISO
|
||||||
with:
|
run: |
|
||||||
repository: theupriser/steamify-cachyos-dev
|
base="${{ github.server_url }}"
|
||||||
path: steamify-cachyos-dev
|
git clone -q --depth 1 "$base/theupriser/steamify-cachyos-dev" steamify-cachyos-dev
|
||||||
- uses: actions/checkout@v4
|
git clone -q --depth 1 --branch "v${{ needs.build.outputs.steamify }}" "$base/theupriser/steamify-cachyos" steamify-cachyos
|
||||||
with:
|
api="$base/api/v1/repos/${{ github.repository }}/actions"
|
||||||
repository: theupriser/steamify-cachyos
|
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'))")"
|
||||||
ref: v${{ needs.build.outputs.steamify }}
|
curl -fsSL --retry 5 --retry-all-errors -o iso.zip "$api/artifacts/$id/zip"
|
||||||
path: steamify-cachyos
|
unzip -q iso.zip -d iso && rm iso.zip
|
||||||
|
ls -la iso
|
||||||
- uses: christopherhx/gitea-download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: iso
|
|
||||||
path: iso
|
|
||||||
|
|
||||||
- name: Boot loader test (${{ matrix.loader }})
|
- name: Boot loader test (${{ matrix.loader }})
|
||||||
env:
|
env:
|
||||||
@@ -166,7 +142,7 @@ jobs:
|
|||||||
VM_TIMEZONE: UTC
|
VM_TIMEZONE: UTC
|
||||||
# The runner is 4 cores / 8 threads: three VMs with 2 vCPUs leave 2 threads for the host and the runner.
|
# The runner is 4 cores / 8 threads: three VMs with 2 vCPUs leave 2 threads for the host and the runner.
|
||||||
VM_CPUS: "2"
|
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_INSTALL_MEM: 5G
|
||||||
VM_ISO_DIR: ${{ github.workspace }}/iso
|
VM_ISO_DIR: ${{ github.workspace }}/iso
|
||||||
run: |
|
run: |
|
||||||
@@ -176,19 +152,14 @@ jobs:
|
|||||||
cd steamify-cachyos-dev
|
cd steamify-cachyos-dev
|
||||||
VM_ISO="$iso" scripts/vmbootloadertest.sh "${{ matrix.loader }}" --install --quick
|
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()
|
if: always()
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
run: |
|
||||||
with:
|
for f in ~/vms/bl-${{ matrix.loader }}/install.log ~/vms/bl-${{ matrix.loader }}/serial.log ~/vms/bl-${{ matrix.loader }}/vm.log; do
|
||||||
name: test-${{ matrix.loader }}
|
[ -s "$f" ] && { echo "::group::$f (last 150 lines)"; tail -n 150 "$f" | sed 's/\x1b\[[0-9;]*m//g'; echo "::endgroup::"; }
|
||||||
path: |
|
done
|
||||||
/root/vms/bl-${{ matrix.loader }}.test.log
|
true
|
||||||
/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
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
|
|||||||
Reference in new issue
Block a user