test #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '30 1 * * *' #every day at 1:30am | |
permissions: {} | |
jobs: | |
Ubuntu-2404-dkms: | |
runs-on: ubuntu-latest | |
container: ubuntu:24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare environment | |
shell: bash | |
run: | | |
sed -i 's/noble-updates/noble-updates noble-proposed/' /etc/apt/sources.list.d/ubuntu.sources | |
apt-get update --quiet; | |
apt-get install --yes --no-install-recommends dkms gpg-agent kmod software-properties-common sudo | |
- name: Download header files | |
shell: bash | |
run: | | |
# latest generic kernel headers | |
apt-get install --yes linux-headers-generic linux-headers-generic-hwe-24.04-edge | |
# latest oem kernel | |
apt-get install --yes linux-headers-oem-24.04a linux-headers-oem-24.04b | |
- name: Register with dkms | |
shell: bash | |
run: | | |
dkms add . | |
- name: Compile driver | |
shell: bash | |
run: | | |
# run dkms build and all available kernel headers | |
failed="" | |
succeeded="" | |
for kver in /lib/modules/*/build; do | |
# skip the kernel headers from the azure kernel. These kernel headers | |
# are preinstalled and of no interest | |
if [[ "$kver" == *"azure"* ]]; then | |
echo "Skipping $kver - This is the kernel of the github runner."; | |
continue; | |
fi; | |
test -d $kver || continue | |
kver=${kver%/build} | |
kver=${kver##*/} | |
echo "=== Testing ${kver} ==="; | |
echo "running: dkms build -m ipu7-drivers/0.0.0 -k ${kver}"; | |
ret=$(sudo dkms build -m ipu7-drivers/0.0.0 -k ${kver} >&2; echo $?); | |
if [ ${ret} -eq 0 ]; then | |
succeeded="${succeeded} ${kver}" | |
else | |
echo "#### Skipped unexpected failure ${kver}"; | |
failed="${failed} ${kver}"; | |
fi; | |
done | |
if [ "x${failed}" != "x" ]; then | |
echo "#### Failed kernels: ${failed}"; | |
exit 1 | |
fi | |
echo "#### Successful builds for kernels: ${succeeded}"; |