This repository contains a GitHub Actions workflow for building the latest CachyOS Linux kernel as installable Debian packages.
The workflow is intended for Debian-based desktop systems where you want to test or run a CachyOS-flavored kernel without manually maintaining the full build toolchain on your machine.
The workflow fetches the newest kernel metadata from the official CachyOS/linux-cachyos packaging repository, downloads the matching CachyOS kernel source tarball, applies a Debian-oriented desktop configuration pass, compiles the kernel, and packages the result with the kernel's upstream Debian packaging target.
Expected output includes standard .deb packages such as:
linux-image-*.deblinux-headers-*.deb- related generated kernel packages produced by
make bindeb-pkg BUILD-MANIFEST.txtwith source/version details and SHA256 checksums
The workflow runs in two ways:
- Automatic: a scheduled
check-cachyos-updatesworkflow polls the official CachyOS/linux-cachyos packaging repository every 3 hours. When a variant'spkgver/pkgrelchanges, it automatically dispatches the build workflow for that variant and publishes a GitHub Release with the resulting.debpackages. - Manual: a repository maintainer can still start the build explicitly from
the GitHub Actions tab with the
workflow_dispatchtrigger.
See Automatic Update Tracking below for details.
A companion workflow (.github/workflows/check-cachyos-updates.yml) keeps the
built kernel in sync with upstream:
- Runs every 3 hours (
0 */3 * * *UTC) and on demand viaworkflow_dispatch. - Fetches the
PKGBUILDfor each variant (linux-cachyos,linux-cachyos-bore,linux-cachyos-eevdf,linux-cachyos-lts) fromCachyOS/linux-cachyos@masterand extractspkgver/pkgrel. - Compares against the last known versions stored in
cachyos-kernel-state.jsonin this repository. - When a variant has a new version, it dispatches the build workflow with:
- runner:
blacksmith-16vcpu-ubuntu-2404 - matching
cpu_schedulerfor the variant (cachyos,bore,eevdf) - QEMU smoke test enabled
publish_release: true, so a GitHub Release is created/updated automatically for every new kernel
- runner:
- After dispatching, it commits the new versions to
cachyos-kernel-state.json.
Notes:
- On the very first run there is no stored state, so the check only records the
current upstream versions and does not dispatch a build. Re-run the check
with
force_build: true(or run the build manually) to establish a baseline. force_build: truedispatches a build for every variant, even if upstream is unchanged. This is also the way to retry after a failed build, since a version is only recorded as built once it has been dispatched.- Release tags are auto-generated as
cachyos-debian-<variant>-<pkgver>-<run>, and each new release is marked as the latest. - The scheduled workflow only runs on the default branch (
main).
- Open the repository on GitHub.
- Go to Actions.
- Select Build CachyOS Kernel Debian Packages.
- Click Run workflow.
- Choose the desired inputs:
runner: GitHub-hosted or Blacksmith runner size.kernel_variant: CachyOS package variant to build.cpu_scheduler: scheduler/config flavor.run_qemu_smoke_test: whether to boot-test the built kernel in QEMU.publish_release: whether to upload the final packages to a GitHub Release.release_tag: optional tag to create/update when publishing a Release.mark_latest: whether the Release should be marked as the latest.
- Wait for the build to finish.
- Download the generated artifacts from the workflow run.
Kernel builds are large and slow. A full run can take several hours and uses a significant amount of GitHub-hosted runner disk space.
Supported values:
blacksmith-8vcpu-ubuntu-2404blacksmith-16vcpu-ubuntu-2404blacksmith-32vcpu-ubuntu-2404ubuntu-24.04
The default is blacksmith-16vcpu-ubuntu-2404, which is a good fit for kernel
compilation because it provides substantially more CPU, memory, and disk space
than the default GitHub-hosted Ubuntu runner.
Blacksmith runners require the Blacksmith GitHub integration to be installed and
enabled for the repository's organization. If Blacksmith is not configured, use
the ubuntu-24.04 fallback runner.
Supported values:
linux-cachyoslinux-cachyos-borelinux-cachyos-eevdflinux-cachyos-lts
The default is linux-cachyos.
Supported values:
cachyosboreeevdf
The default is cachyos.
When enabled, the workflow extracts the generated kernel image package, creates a
minimal BusyBox initramfs, and boots the kernel with QEMU. The test passes only
if the guest reaches the init process and prints a success marker on the serial
console. The workflow enables the 8250 serial console path in the kernel config
so this direct QEMU boot test can report reliably. The QEMU run uses TCG with
-cpu max, an uncompressed initramfs, and rdinit=/init to avoid CI-specific
CPU-model and initramfs decompression failures.
The default is enabled for manual runs.
When enabled, the workflow creates or updates a GitHub Release and uploads the
generated .deb packages plus BUILD-MANIFEST.txt.
The default is disabled, so normal manual runs only upload workflow artifacts.
Optional release tag to create or update when publish_release is enabled.
If left blank, the workflow generates a tag like:
cachyos-debian-linux-cachyos-7.0.12-5
If the workflow is manually run from an existing tag ref, that tag is used unless
release_tag is set.
Controls whether the created or updated GitHub Release is marked as the latest release. The default is enabled.
The workflow starts from the CachyOS kernel configuration and then ensures common Debian desktop requirements are available. The configuration pass includes support for:
- initramfs booting
- loadable kernel modules
- EFI systems
- dynamic preemption and high-resolution timers
- schedutil CPU frequency governor
- common cgroups, BPF, and pressure-stall interfaces
- Intel, AMD, Nouveau, and VirtIO graphics modules
- common USB, HID, audio, webcam, Bluetooth, and Wi-Fi modules
- common filesystems such as ext4, Btrfs, XFS, F2FS, exFAT, NTFS3, NFS, CIFS, OverlayFS, and SquashFS
- KVM, VirtIO, and VFIO modules
- WireGuard and common networking features
The build uses a generic x86-64 target so the resulting packages are more portable across Debian-based machines and can boot under QEMU's emulated CPU.
The workflow performs package validation before uploading artifacts:
- verifies that
.debfiles were produced - verifies that image and header packages exist
- inspects packages with
dpkg-deb - runs
lintian --fail-on errorwith a narrow allowlist for expected kernel-header helper binaries - checks for a packaged
vmlinuz-* - checks for packaged kernel modules
- checks for installed header files
- optionally performs a minimal QEMU boot smoke test
Artifacts are always uploaded to the workflow run.
With automatic tracking enabled, every new upstream kernel version is built and published to a GitHub Release automatically (see Automatic Update Tracking).
To publish the generated .deb packages to GitHub Releases, run the workflow
manually with publish_release enabled. You can either provide a release_tag
or leave it blank and let the workflow generate one from the kernel variant,
kernel version, and workflow run number.
The release publisher uses the workflow GITHUB_TOKEN, so the repository must
allow GitHub Actions to write repository contents. This workflow already declares
contents: write.
Download the generated .deb files from the workflow artifacts, then install the
image and headers on a Debian-based system:
sudo apt install ./linux-image-*.deb ./linux-headers-*.deb
sudo update-grub
sudo rebootAfter rebooting, confirm the running kernel:
uname -aKeep a known-good distribution kernel installed so you can select it from the bootloader if the custom kernel does not work on your hardware.
- This project repackages CachyOS kernel sources for Debian-based systems; it is not an official CachyOS project.
- CachyOS kernel sources and packaging metadata come from upstream CachyOS repositories at build time.
- Kernel compatibility depends on your hardware, firmware, bootloader, Secure Boot configuration, DKMS modules, and distribution release.
- Secure Boot users may need to sign the generated kernel or disable Secure Boot, depending on local policy.
- Proprietary or out-of-tree modules, such as NVIDIA DKMS modules, are not built by this workflow.
.github/workflows/build-cachyos-kernel.yml
.github/workflows/check-cachyos-updates.yml
cachyos-kernel-state.json
README.md
The workflow is self-contained and fetches the CachyOS kernel sources during the GitHub Actions run.
