Skip to content

Commit 6e2af42

Browse files
committed
Revamp automation (using Ishaan's as the baseline)
Signed-off-by: Jonathan Dieter <[email protected]>
1 parent 3590a63 commit 6e2af42

File tree

7 files changed

+75
-136
lines changed

7 files changed

+75
-136
lines changed

.container_build_image

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rocky-9-kernel-builder

.github/workflows/build-check_aarch64-rt.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/build-check_aarch64.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/build-check_x86_64-rt.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/build-check_x86_64.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Automated kernel build and test
2+
on: [push]
3+
4+
permissions:
5+
contents: read
6+
actions: read
7+
8+
jobs:
9+
build:
10+
name: Build ${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
11+
runs-on: ${{ matrix.runner }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
runner: [kernel-build, kernel-build-arm64]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
22+
23+
# Host deps + KVM / FUSE validation
24+
- name: Install host dependencies & verify KVM/FUSE
25+
run: |
26+
set -euxo pipefail
27+
sudo apt-get update
28+
sudo apt-get install -y fuse3 cpu-checker podman
29+
sudo modprobe fuse # guarantee /dev/fuse
30+
if ! sudo kvm-ok ; then
31+
echo "::warning::KVM acceleration not available on this runner."
32+
fi
33+
if [ -e /dev/kvm ]; then
34+
sudo chmod 0666 /dev/kvm
35+
fi
36+
37+
# Kernel build inside CIQ builder
38+
- name: Build kernel inside CIQ builder container
39+
run: |
40+
set -euxo pipefail
41+
mkdir -p output
42+
df -h
43+
cat /proc/cpuinfo
44+
podman run --rm --pull=always \
45+
--privileged \
46+
--device=/dev/fuse \
47+
--device=/dev/kvm \
48+
-v "$PWD":/src \
49+
-v "$PWD/output":/output \
50+
--security-opt label=disable \
51+
pulp.prod.ciq.dev/ciq/cicd/lts-images/builder \
52+
build_kernel.sh
53+
54+
# Artifacts: qcow2 + metadata
55+
- name: Upload QCOW2 and metadata
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: kernel-build-${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
59+
path: |
60+
output/*.qcow2
61+
output/last_build_image.txt
62+
retention-days: 7
63+
if-no-files-found: warn
64+
65+
# Artifacts: logs
66+
- name: Upload build & dmesg logs
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: kernel-logs-${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
70+
path: |
71+
output/*.log
72+
retention-days: 7
73+
if-no-files-found: warn

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ modules.order
9494
#
9595
!.clang-format
9696
!.cocciconfig
97+
!.container_build_image
9798
!.get_maintainer.ignore
9899
!.gitattributes
99100
!.gitignore

0 commit comments

Comments
 (0)