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