6.11.9-302: Undo revert #69
Workflow file for this run
This file contains 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: Build Bazzite Kernel | |
on: | |
workflow_dispatch: | |
inputs: | |
arm: | |
description: 'Build arm version only' | |
type: boolean | |
default: false | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
jobs: | |
build_kernel: | |
environment: prod | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: ${{ github.event.inputs.arm == 'true' && fromJSON('["aarch64"]') || fromJSON('["aarch64", "x86_64"]') }} | |
fedora_version: [41] | |
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-24.04' }} | |
steps: | |
- name: Maximize build space | |
if: matrix.arch == 'x86_64' | |
uses: ublue-os/remove-unwanted-software@v7 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create Build Environment | |
run: | | |
FEDORA_VERSION="${{ matrix.fedora_version }}" | |
sudo podman build . --tag 'fedora_builder' \ | |
--build-arg UID=$(id -u) --build-arg GID=$(id -g) \ | |
--build-arg FEDORA_VERSION=${FEDORA_VERSION:-41} | |
- name: Write Changelog | |
run: | | |
sudo podman run --rm -v $(pwd):/workspace fedora_builder \ | |
python3 release_changelog.py | |
- name: Compile Kernel | |
run: | | |
FEDORA_VERSION="${{ matrix.fedora_version }}" | |
ARCH="${{ matrix.arch }}" | |
sudo podman run --rm -v $(pwd):/workspace fedora_builder fedpkg \ | |
--name kernel --namespace rpms --release "f${FEDORA_VERSION:-41}" \ | |
local --arch ${ARCH:-x86_64} --with baseonly \ | |
--builddir build --buildrootdir buildroot | |
- name: Separate debuginfo into different folder | |
run: | | |
mkdir -p debuginfo | |
mv ${{ matrix.arch }}/kernel-debuginfo-*.rpm debuginfo/ | |
- name: Upload Kernel to action | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kernel-f${{ matrix.fedora_version}}-${{ matrix.arch }} | |
path: | | |
.build-*.log | |
${{ matrix.arch }}/kernel-*.rpm | |
compression-level: 7 | |
- name: Upload Kernel debuginfo to action | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kernel-f${{ matrix.fedora_version}}-${{ matrix.arch }}-debuginfo | |
path: | | |
.build-*.log | |
debuginfo/*.rpm | |
compression-level: 7 | |
- name: Convert to Arch | |
if: matrix.arch == 'x86_64' && matrix.fedora_version == 41 | |
run: | | |
# Grab kernel ver from the log | |
KERNEL_VER=$(ls -a | grep .build | head -n 1 | sed 's/.build-//' | sed 's/.log//') | |
ARCH_VER=$(echo $KERNEL_VER | sed 's/-/./g') | |
# Place in PKGBUILD | |
cat PKGBUILD | \ | |
sed "s/VERSION_FEDORA/${KERNEL_VER}.x86_64/" | \ | |
sed "s/VERSION_ARCH/${ARCH_VER}/" \ | |
> x86_64/PKGBUILD | |
sudo podman build . -f Dockerfile-arch --tag 'arch_builder' --build-arg UID=$(id -u) --build-arg GID=$(id -g) | |
sudo podman run --rm -v $(pwd)/x86_64:/workspace arch_builder makepkg -s | |
- name: Upload Kernel arch package to action | |
uses: actions/upload-artifact@v4 | |
if: matrix.arch == 'x86_64' && matrix.fedora_version == 41 | |
with: | |
name: linux-f${{ matrix.fedora_version }}-arch | |
path: | | |
x86_64/linux-*.pkg.tar.zst | |
compression-level: 7 | |
- name: Upload Kernel to release | |
if: github.event_name == 'release' | |
uses: Wandalen/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
attempt_limit: 3 | |
attempt_delay: 15000 | |
action: softprops/action-gh-release@v2 | |
with: | | |
files: | | |
${{ matrix.arch }}/kernel-*.rpm | |
x86_64/linux-*.pkg.tar.zst | |
x86_64/linux-*.pkg.tar.zst.sig | |
fail_on_unmatched_files: false | |
make_latest: ${{ github.event.release.prerelease == false }} |