Skip to content

Commit 8a9a593

Browse files
committed
Reduce size for testing
Signed-off-by: Jonathan Dieter <[email protected]>
1 parent 0018c47 commit 8a9a593

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
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/kernel-build-and-test.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ permissions:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-24.04
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]
1116

1217
steps:
1318
- name: Checkout code
@@ -23,8 +28,10 @@ jobs:
2328
sudo apt-get install -y fuse3 cpu-checker podman
2429
sudo modprobe fuse # guarantee /dev/fuse
2530
if ! sudo kvm-ok ; then
26-
echo "::error::KVM acceleration not available on this runner."
27-
exit 1
31+
echo "::warning::KVM acceleration not available on this runner."
32+
fi
33+
if [ -e /dev/kvm ]; then
34+
sudo chmod 0666 /dev/kvm
2835
fi
2936
3037
# Kernel build inside CIQ builder
@@ -33,22 +40,24 @@ jobs:
3340
set -euxo pipefail
3441
mkdir -p output
3542
df -h
36-
ls -l .cont* -d
43+
cat /proc/cpuinfo
3744
podman run --rm --pull=always \
3845
--privileged \
3946
--device=/dev/fuse \
4047
--device=/dev/kvm \
4148
-v "$PWD":/src \
4249
-v "$PWD/output":/output \
50+
-v "$PWD/test_stuff.sh":/usr/local/bin/build_kernel.sh \
4351
--security-opt label=disable \
4452
pulp.prod.ciq.dev/ciq/cicd/lts-images/builder \
4553
build_kernel.sh
54+
sudo dmesg
4655
4756
# Artifacts: qcow2 + metadata
4857
- name: Upload QCOW2 and metadata
4958
uses: actions/upload-artifact@v4
5059
with:
51-
name: kernel-build
60+
name: kernel-build-${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
5261
path: |
5362
output/*.qcow2
5463
output/last_build_image.txt
@@ -59,7 +68,7 @@ jobs:
5968
- name: Upload build & dmesg logs
6069
uses: actions/upload-artifact@v4
6170
with:
62-
name: kernel-logs
71+
name: kernel-logs-${{ matrix.runner == 'kernel-build' && 'x86_64' || 'aarch64' }}
6372
path: |
6473
output/*.log
6574
retention-days: 7

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ modules.order
9494
#
9595
!.clang-format
9696
!.cocciconfig
97-
!.container-build-image
97+
!.container_build_image
9898
!.get_maintainer.ignore
9999
!.gitattributes
100100
!.gitignore

test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test

test_stuff.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
ls -l /dev/kvm
3+
dnf -y install libvirt-daemon-common
4+
virt-host-validate || /bin/true
5+
podman run --name "rocky-9" -v /src:/src -v /usr/libexec/kernel_build.sh:/usr/local/bin/kernel_build.sh -it "pulp.prod.ciq.dev/ciq/cicd/lts-images/rocky-9-kernel-builder" /bin/true
6+
image_from_container.sh 10G "rocky-9"

0 commit comments

Comments
 (0)