Skip to content

Revamp automation (using Ishaan's as the baseline) #14

Revamp automation (using Ishaan's as the baseline)

Revamp automation (using Ishaan's as the baseline) #14

name: Automated kernel build and test
on: [push]
permissions:
contents: read
actions: read
jobs:
build:
name: Build ${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [kernel-build, kernel-build-arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
# Host deps + KVM / FUSE validation
- name: Install host dependencies & verify KVM/FUSE
run: |
set -euxo pipefail
sudo apt-get update
sudo apt-get install -y fuse3 cpu-checker podman
sudo modprobe fuse # guarantee /dev/fuse
if ! sudo kvm-ok ; then
echo "::warning::KVM acceleration not available on this runner."
fi
# Kernel build inside CIQ builder
- name: Build kernel inside CIQ builder container
run: |
set -euxo pipefail
mkdir -p output
df -h
cat /proc/cpuinfo
podman run --rm --pull=always \
--privileged \
--device=/dev/fuse \
--device=/dev/kvm \
-v "$PWD":/src \
-v "$PWD/output":/output \
--security-opt label=disable \
pulp.prod.ciq.dev/ciq/cicd/lts-images/builder \
build_kernel.sh
# Artifacts: qcow2 + metadata
- name: Upload QCOW2 and metadata
uses: actions/upload-artifact@v4
with:
name: kernel-build-${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
path: |
output/*.qcow2
output/last_build_image.txt
retention-days: 7
if-no-files-found: warn
# Artifacts: logs
- name: Upload build & dmesg logs
uses: actions/upload-artifact@v4
with:
name: kernel-logs-${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
path: |
output/*.log
retention-days: 7
if-no-files-found: warn