Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci: switch to nix built kernel#1900

Merged
JakeHillion merged 1 commit intomainfrom
jakehillion/nix-kernel-ci
May 16, 2025
Merged

ci: switch to nix built kernel#1900
JakeHillion merged 1 commit intomainfrom
jakehillion/nix-kernel-ci

Conversation

@JakeHillion
Copy link
Contributor

Continue addressing the reproducibility issues in the CI by switching to the Nix built kernel. This kernel has been building and working for some time, but we need a specific kernel header for process_runqlat.bt. Add a derivation for the kernel headers and build that too.

Use cachix to store the Nix built artifacts. This requires a little bit of setup and was a tad fiddly on the self-hosted runners, but it appears to be working well now. Forks will not be able to upload to our cache but will be able to restore from it, so as long as they're hitting one of our recently locked kernels they'll get hits. In the future we should employ an alternative like magic-nix-cache too if that ever gets revived. Requires adding the cache to our self-hosted runner as it doesn't have root[0].

The kernel build in CI will then be reproducible and accessible to anyone on their local machine. Anyone running the kernel nix build command with --accept-flake-config will pull the cachix cached version, or alternatively can build it themselves reproducibly.

Test plan:

  • CI, twice. Once to build the cache, once to test the restore.

[0] JakeHillion/scx-nixos-deployments#18

Continue addressing the reproducibility issues in the CI by switching to the Nix
built kernel. This kernel has been building and working for some time, but we
need a specific kernel header for `process_runqlat.bt`. Add a derivation for the
kernel headers and build that too.

Use cachix to store the Nix built artifacts. This requires a little bit of setup
and was a tad fiddly on the self-hosted runners, but it appears to be working well
now. Forks will not be able to upload to our cache but will be able to restore from
it, so as long as they're hitting one of our recently locked kernels they'll get hits.
In the future we should employ an alternative like magic-nix-cache too if that ever
gets revived. Requires adding the cache to our self-hosted runner as it doesn't have
root[0].

The kernel build in CI will then be reproducible and accessible to anyone on their
local machine. Anyone running the kernel `nix build` command with `--accept-flake-config`
will pull the cachix cached version, or alternatively can build it themselves
reproducibly.

Test plan:
- CI, twice. Once to build the cache, once to test the restore.

[0] JakeHillion/scx-nixos-deployments#18
@JakeHillion JakeHillion requested a review from hodgesds May 16, 2025 22:17
Copy link
Contributor

@hodgesds hodgesds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JakeHillion JakeHillion added this pull request to the merge queue May 16, 2025
Merged via the queue into main with commit 759f5d1 May 16, 2025
32 checks passed
@JakeHillion JakeHillion deleted the jakehillion/nix-kernel-ci branch May 16, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments