mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-04-14 15:34:53 +03:00
CI: Add ARM builder
Do a ZFS build inside of an ARM runner. This only does a simple build, it does not run the test suite. The build runs on the runner itself rather than in a VM, since nesting is not supported on Github ARM runners. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18343
This commit is contained in:
parent
4627c57f27
commit
3f3cadc525
22
.github/workflows/scripts/qemu-3-deps-vm.sh
vendored
22
.github/workflows/scripts/qemu-3-deps-vm.sh
vendored
@ -3,8 +3,11 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
# 3) install dependencies for compiling and loading
|
# 3) install dependencies for compiling and loading
|
||||||
#
|
#
|
||||||
# $1: OS name (like 'fedora41')
|
# qemu-3-deps-vm.sh [--poweroff] OS_NAME [FEDORA_VERSION]
|
||||||
# $2: (optional) Experimental Fedora kernel version, like "6.14" to
|
#
|
||||||
|
# --poweroff: Power off the VM after installing dependencies
|
||||||
|
# OS_NAME: OS name (like 'fedora41')
|
||||||
|
# FEDORA_VERSION: (optional) Experimental Fedora kernel version, like "6.14" to
|
||||||
# install instead of Fedora defaults.
|
# install instead of Fedora defaults.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
@ -153,6 +156,12 @@ function install_fedora_experimental_kernel {
|
|||||||
sudo dnf -y copr disable @kernel-vanilla/mainline
|
sudo dnf -y copr disable @kernel-vanilla/mainline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
POWEROFF=""
|
||||||
|
if [ "$1" == "--poweroff" ] ; then
|
||||||
|
POWEROFF=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
case "$1" in
|
case "$1" in
|
||||||
almalinux8)
|
almalinux8)
|
||||||
@ -212,6 +221,11 @@ case "$1" in
|
|||||||
sudo apt-get install -yq linux-tools-common libtirpc-dev \
|
sudo apt-get install -yq linux-tools-common libtirpc-dev \
|
||||||
linux-modules-extra-$(uname -r)
|
linux-modules-extra-$(uname -r)
|
||||||
sudo apt-get install -yq dh-sequence-dkms
|
sudo apt-get install -yq dh-sequence-dkms
|
||||||
|
|
||||||
|
# Need 'build-essential' explicitly for ARM builder
|
||||||
|
# https://github.com/actions/runner-images/issues/9946
|
||||||
|
sudo apt-get install -yq build-essential
|
||||||
|
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
echo "##[group]Delete Ubuntu OpenZFS modules"
|
echo "##[group]Delete Ubuntu OpenZFS modules"
|
||||||
for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done
|
for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done
|
||||||
@ -306,5 +320,7 @@ esac
|
|||||||
|
|
||||||
# reset cloud-init configuration and poweroff
|
# reset cloud-init configuration and poweroff
|
||||||
sudo cloud-init clean --logs
|
sudo cloud-init clean --logs
|
||||||
sleep 2 && sudo poweroff &
|
if [ "$POWEROFF" == "1" ] ; then
|
||||||
|
sleep 2 && sudo poweroff &
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
11
.github/workflows/scripts/qemu-4-build-vm.sh
vendored
11
.github/workflows/scripts/qemu-4-build-vm.sh
vendored
@ -350,7 +350,16 @@ fi
|
|||||||
# save some sysinfo
|
# save some sysinfo
|
||||||
uname -a > /var/tmp/uname.txt
|
uname -a > /var/tmp/uname.txt
|
||||||
|
|
||||||
cd $HOME/zfs
|
# Check if we're running this script from within a VM or on the runner itself.
|
||||||
|
# Most of the time we will be running in a VM, but the ARM builder actually
|
||||||
|
# runs this script on the runner. If we happen to be running on the ARM
|
||||||
|
# runner, we will start in the ZFS source directory. If we're running on a VM
|
||||||
|
# then we'll just start in our home directory, and will need to 'cd' into our
|
||||||
|
# source directory.
|
||||||
|
if [ ! -e META ] ; then
|
||||||
|
cd $HOME/zfs
|
||||||
|
fi
|
||||||
|
|
||||||
export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
|
export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
|
||||||
|
|
||||||
extra=""
|
extra=""
|
||||||
|
|||||||
40
.github/workflows/zfs-arm.yml
vendored
Normal file
40
.github/workflows/zfs-arm.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: zfs-arm
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zfs-arm:
|
||||||
|
name: ZFS ARM build
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- name: Install dependencies
|
||||||
|
timeout-minutes: 20
|
||||||
|
run: |
|
||||||
|
sudo apt-get -y remove firefox || true
|
||||||
|
.github/workflows/scripts/qemu-3-deps-vm.sh ubuntu24
|
||||||
|
|
||||||
|
# We're running the VM scripts locally on the runner, so need to fix
|
||||||
|
# up hostnames to make it work.
|
||||||
|
for ((i=0; i<=3; i++)); do
|
||||||
|
echo "127.0.0.1 vm$i" | sudo tee -a /etc/hosts
|
||||||
|
done
|
||||||
|
- name: Build modules
|
||||||
|
timeout-minutes: 30
|
||||||
|
run: |
|
||||||
|
.github/workflows/scripts/qemu-4-build-vm.sh --enable-debug ubuntu24
|
||||||
|
|
||||||
|
# Quick sanity test since we're not running the full ZTS
|
||||||
|
sudo modprobe zfs
|
||||||
|
sudo dmesg | grep -i zfs
|
||||||
|
truncate -s 100M file
|
||||||
|
sudo zpool create tank ./file
|
||||||
|
zpool status
|
||||||
|
|
||||||
|
echo "Built ZFS successfully on ARM"
|
||||||
2
.github/workflows/zfs-qemu.yml
vendored
2
.github/workflows/zfs-qemu.yml
vendored
@ -118,7 +118,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} ${{ github.event.inputs.fedora_kernel_ver }}
|
run: .github/workflows/scripts/qemu-3-deps.sh --poweroff ${{ matrix.os }} ${{ github.event.inputs.fedora_kernel_ver }}
|
||||||
|
|
||||||
- name: Build modules
|
- name: Build modules
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user