Skip to content

runners: Add option to specify Ubuntu nightly kernel #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/scripts/qemu-3-deps-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# 3) install dependencies for compiling and loading
#
# $1: OS name (like 'fedora41')
# $2: (optional) URL to install Ubuntu kernel nightly debian packages
# from. This is useful for testing out ZFS against new kernels.
# URL should point to one of Ubuntu's nightly kernel packages
# pages, like: https://kernel.ubuntu.com/mainline/v6.14-rc7/
#
######################################################################

set -eu
Expand Down Expand Up @@ -94,6 +99,27 @@ function tumbleweed() {
echo "##[endgroup]"
}

# $1: Ubuntu nightly kernel deb page to scrape and install from, like:
# https://kernel.ubuntu.com/mainline/v6.14-rc7/
function install_ubuntu_nightly_kernel {
baseurl=$1
wget $baseurl -O index.html
html=$(cat index.html)
list=$(echo "$html" | grep amd64 | grep generic | cut -d '"' -f 2 | \
grep -v top)
singleheader=$(echo "$html" | grep linux | egrep 'linux-headers' | \
cut -d '"' -f 2 | grep -v top | egrep -v '\-[a-gi-z]' | head -n 1)

# Get the 4 or so kernel packages
for i in $list $singleheader ; do
wget $baseurl/$i
done

sudo apt -y install *.deb

rm -f linux-*.deb
}

# Install dependencies
case "$1" in
almalinux8)
Expand Down Expand Up @@ -148,6 +174,10 @@ case "$1" in
echo "##[group]Delete Ubuntu OpenZFS modules"
for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done
echo "##[endgroup]"

if [ ! -z "$2" ] ; then
install_ubuntu_nightly_kernel "$2"
fi
;;
esac

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/qemu-3-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.github/workflows/scripts/qemu-wait-for-vm.sh vm0
scp .github/workflows/scripts/qemu-3-deps-vm.sh zfs@vm0:qemu-3-deps-vm.sh
PID=`pidof /usr/bin/qemu-system-x86_64`
ssh zfs@vm0 '$HOME/qemu-3-deps-vm.sh' $1
ssh zfs@vm0 '$HOME/qemu-3-deps-vm.sh' "$@"
# wait for poweroff to succeed
tail --pid=$PID -f /dev/null
sleep 5 # avoid this: "error: Domain is already active"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/zfs-qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
required: false
default: false
description: 'Test on CentOS 10 stream'
ubuntu_kernel_debs_url:
type: string
required: false
default: ""
description: "(optional) Install from Ubuntu nightly kernel debs URL (like: https://kernel.ubuntu.com/mainline/v6.14-rc7)"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -92,7 +97,7 @@ jobs:

- name: Install dependencies
timeout-minutes: 20
run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }}
run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} ${{ github.event.inputs.ubuntu_kernel_debs_url }}

- name: Build modules
timeout-minutes: 30
Expand Down
Loading