Merge pull request #631 from padelsbach/freebsd-version-tolerance

Address nightly failure in BSD kernel workflow
master
Aidan Garske 2026-09-17 15:11:52 -07:00 committed by GitHub
commit 7d9ed2c72e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 7 deletions

View File

@ -47,12 +47,13 @@ jobs:
steps:
- uses: actions/checkout@v5
# FreeBSD kernel code: BSD make, and kldload needs a real kernel. README.md
# says 14.2, but FreeBSD no longer serves it (only 14.3+), so run 14.3.
# FreeBSD kernel code: BSD make, and kldload needs a real kernel.
# kernel/bsdkm/README.md says 14.2, but the mirror only carries releases
# that are still supported, so run the current 14.x instead.
- name: Build the module and load it in a FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
release: '14.3'
release: '14.5'
usesh: true
prepare: |
pkg install -y git autoconf automake libtool
@ -64,11 +65,19 @@ jobs:
if [ ! -f /usr/src/sys/conf/kmod.mk ]; then
# keyed off the running kernel, so this cannot drift from the VM
rel=$(uname -r | sed 's/-p[0-9]*$//')
f=1; while :; do
fetch -o /tmp/src.txz "https://download.freebsd.org/releases/amd64/${rel}/src.txz" && break
[ "$f" -ge 5 ] && { echo "FAIL: src.txz fetch failed"; exit 1; }
f=$((f + 1)); sleep 10
# BSD moves old releases to the archive, so try both hosts
ok=0
for base in "https://download.freebsd.org/releases/amd64" \
"https://archive.freebsd.org/old-releases/amd64"; do
f=1; while [ "$f" -le 3 ]; do
if fetch -o /tmp/src.txz "$base/${rel}/src.txz"; then
ok=1; break
fi
f=$((f + 1)); sleep 10
done
[ "$ok" -eq 1 ] && break
done
[ "$ok" -eq 1 ] || { echo "FAIL: src.txz fetch failed"; exit 1; }
tar -C / -xf /tmp/src.txz
fi
test -f /usr/src/sys/conf/kmod.mk