Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: switch scheduled jobs to nix built kernel #1280

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

JakeHillion
Copy link
Contributor

@JakeHillion JakeHillion commented Jan 30, 2025

Create a reusable GitHub action to restore the kernel cache. This takes an
argument for git-repo and branch, like the equivalent reusable workflow for
building a Nix kernel. Enable this action for the Nix built kernels in the
scheduled runs.

This reduces the possibility for a mis-copy and significantly simplifies the
files compared to duplicating the code.

Note that this is deliberately ordered before the tar setuid bit in the
actions, as the new cache and that change don't interact well. Will drop that
setuid step in future changes but leaving it there for now to load the other
caches.

Drive by: remove lint from the for-next scheduled run. It's already checked on
PRs, in the merge queue, and on the scheduled main run.

Test plan:

  • Changed one of the cache loads to the master branch to guarantee a miss.
    Workflow fails as expected.
  • Tested scheduled workflows by enabling them temporarily on push. They pass.

@JakeHillion JakeHillion marked this pull request as draft January 30, 2025 21:14
@JakeHillion
Copy link
Contributor Author

Whoops, this doesn't work until after switching to the Nix kernels because of the currently different suffixes. Will hold off until that gets switched on.

@JakeHillion JakeHillion force-pushed the reusable-cache-kernel branch 2 times, most recently from caa1889 to cbac042 Compare February 3, 2025 16:01
@JakeHillion JakeHillion changed the title ci: create a reusable action for loading kernel cache ci: switch scheduled jobs to nix built kernel Feb 3, 2025
Create a reusable GitHub action to restore the kernel cache. This takes an
argument for `git-repo` and `branch`, like the equivalent reusable workflow for
building a Nix kernel. Enable this action for the Nix built kernels in the
scheduled runs.

This reduces the possibility for a mis-copy and significantly simplifies the
files compared to duplicating the code.

Note that this is deliberately ordered before the `tar` setuid bit in the
actions, as the new cache and that change don't interact well. Will drop that
setuid step in future changes but leaving it there for now to load the other
caches.

Drive by: remove lint from the for-next scheduled run. It's already checked on
PRs, in the merge queue, and on the scheduled main run.

Test plan:
- Changed one of the cache loads to the `master` branch to guarantee a miss.
  Workflow fails as expected.
- Tested scheduled workflows by enabling them temporarily on `push`. They pass.
@JakeHillion JakeHillion force-pushed the reusable-cache-kernel branch from cbac042 to b6fe177 Compare February 3, 2025 16:27
@JakeHillion JakeHillion marked this pull request as ready for review February 3, 2025 16:27
@JakeHillion
Copy link
Contributor Author

Still using the generic action but now applying it to the scheduled runs. They've been successful at building the kernel - I looked at the last 20 or so, and one even built when the GH actions runner failed (a timeout I think). Will switch them over to the new kernel and keep an eye, then follow with the more relevant caching-build probably tomorrow.

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 Feb 3, 2025
Merged via the queue into main with commit 80fc2bc Feb 3, 2025
48 checks passed
@JakeHillion JakeHillion deleted the reusable-cache-kernel branch February 3, 2025 17:05
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