mirror of
https://github.com/ps5-linux/ps5-linux-patches.git
synced 2026-07-16 01:50:38 +00:00
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
This commit is contained in:
23
.github/workflows/build-kernel.yml
vendored
23
.github/workflows/build-kernel.yml
vendored
@@ -29,6 +29,11 @@ jobs:
|
|||||||
CCACHE_DIR: /home/opc/ccache
|
CCACHE_DIR: /home/opc/ccache
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout image builder
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
@@ -43,17 +48,15 @@ jobs:
|
|||||||
bash image/build_image.sh --kernel-only \
|
bash image/build_image.sh --kernel-only \
|
||||||
--distro "$FORMAT" \
|
--distro "$FORMAT" \
|
||||||
--patches-ref "$PATCHES_REF"
|
--patches-ref "$PATCHES_REF"
|
||||||
# build_image.sh's --distro all skips the rpm packager, and each
|
# --distro all skips the rpm packager. Call the packager container
|
||||||
# kernel-build call wipes image/linux-bin/. Stash the deb + pkg.tar.zst
|
# directly against the already-staged kernel (image/linux-bin/staging/)
|
||||||
# from the "all" run before firing the rpm-producing "fedora" run,
|
# instead of re-running build_image.sh, which wipes outputs and
|
||||||
# then restore so the release ships all three formats.
|
# rebuilds the kernel — that doubled CI time. This step is ~1 minute.
|
||||||
if [ "$FORMAT" = "all" ]; then
|
if [ "$FORMAT" = "all" ]; then
|
||||||
mkdir -p /tmp/kernel-stash
|
docker build -t ps5-kernel-packager-rpm \
|
||||||
cp image/linux-bin/*.deb image/linux-bin/*.pkg.tar.zst /tmp/kernel-stash/
|
-f image/docker/kernel-builder-rpm/Dockerfile image/
|
||||||
bash image/build_image.sh --kernel-only \
|
docker run --rm -v "$PWD/image/linux-bin":/out \
|
||||||
--distro fedora \
|
ps5-kernel-packager-rpm
|
||||||
--patches-ref "$PATCHES_REF"
|
|
||||||
cp /tmp/kernel-stash/*.deb /tmp/kernel-stash/*.pkg.tar.zst image/linux-bin/
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Read kernel and patches version
|
- name: Read kernel and patches version
|
||||||
|
|||||||
Reference in New Issue
Block a user