Separate the artifacts files so it's easier to download #5
This file contains hidden or 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: Automated kernel build and test (x86_64) | |
on: [push] | |
permissions: | |
contents: read | |
actions: read | |
jobs: | |
build: | |
name: Build x86_64 | |
runs-on: kernel-build | |
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 | |
if [ -e /dev/kvm ]; then | |
sudo chmod 0666 /dev/kvm | |
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 \ | |
$([ -e /dev/kvm ] && echo "--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 -c lts-9.2-kernel-builder 2>&1 | tee output/kernel-build.log | |
sudo dmesg | |
# Upload kernel compilation logs | |
- name: Upload kernel compilation logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: kernel-compilation-logs-x86_64 | |
path: output/kernel-build.log | |
retention-days: 7 | |
# Upload kselftest logs | |
- name: Upload kselftest logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: kselftest-logs-x86_64 | |
path: | | |
output/kselftests-*.log | |
output/dmesg-*.log | |
retention-days: 7 | |
# Upload qcow2 image | |
- name: Upload qcow2 image | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: kernel-qcow2-image-x86_64 | |
path: | | |
output/*.qcow2 | |
output/last_build_image.txt | |
retention-days: 7 |