From 5236127a9e772a8741a701f56ef82d580ce447cd Mon Sep 17 00:00:00 2001 From: mia26MAjFm Date: Sun, 5 Jul 2026 15:15:33 +0000 Subject: [PATCH] build-kernel: kill double-build + wipe stale outputs (#28) * build-kernel: call rpm packager container directly, skip second full build * build-kernel: sudo-wipe image/ before checkout to drop stale root-owned outputs --- .github/workflows/build-kernel.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 90922c9..b8ffd2e 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -29,6 +29,11 @@ jobs: CCACHE_DIR: /home/opc/ccache steps: + - name: Clean image workspace + # Docker containers write to image/linux-bin/ as root; actions/checkout's + # git clean runs as the runner user and skips root-owned files, so stale + # .deb / .pkg.tar.zst from prior kernel versions leak into the release. + run: sudo rm -rf image - name: Checkout image builder uses: actions/checkout@v6 with: @@ -43,17 +48,15 @@ jobs: bash image/build_image.sh --kernel-only \ --distro "$FORMAT" \ --patches-ref "$PATCHES_REF" - # build_image.sh's --distro all skips the rpm packager, and each - # kernel-build call wipes image/linux-bin/. Stash the deb + pkg.tar.zst - # from the "all" run before firing the rpm-producing "fedora" run, - # then restore so the release ships all three formats. + # --distro all skips the rpm packager. Call the packager container + # directly against the already-staged kernel (image/linux-bin/staging/) + # instead of re-running build_image.sh, which wipes outputs and + # rebuilds the kernel — that doubled CI time. This step is ~1 minute. if [ "$FORMAT" = "all" ]; then - mkdir -p /tmp/kernel-stash - cp image/linux-bin/*.deb image/linux-bin/*.pkg.tar.zst /tmp/kernel-stash/ - bash image/build_image.sh --kernel-only \ - --distro fedora \ - --patches-ref "$PATCHES_REF" - cp /tmp/kernel-stash/*.deb /tmp/kernel-stash/*.pkg.tar.zst image/linux-bin/ + docker build -t ps5-kernel-packager-rpm \ + -f image/docker/kernel-builder-rpm/Dockerfile image/ + docker run --rm -v "$PWD/image/linux-bin":/out \ + ps5-kernel-packager-rpm fi - name: Read kernel and patches version