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

Start using nix-fast-build in github action CI #304

Merged
merged 7 commits into from
Nov 18, 2024

Conversation

henrirosten
Copy link
Collaborator

@henrirosten henrirosten commented Nov 15, 2024

  • Move pycodestyle, pylint, black, and format checks from task.py to ghaf-infra flake .#checks
  • Remove all redundant checks from task.py
  • Introduce nix-fast-build.sh helper to run relevant flake builds with nix-fast-build to execute all evaluation/build operations completely on the remote builder. Add relevant dependencies to nix devshell.
  • Start using nix-fast-build.sh from github action workflow test-ghaf-infra.yml: run all checks and build relevant x86 and aarch targets on remote. This adds some new checks too: the workflow now also builds all azure nixosConfigurations, as well as runs the .#checks on aarch64.

Note: after this change, cachix cache on the test-ghaf-infra.yml workflow is used only to cache the ghaf-infra devshell dependencies. This is to make the test-ghaf-infra.yml faster by not having to download the build closure to the github-hosted runner. Rationale is that local builds of all the ghaf-infra nixosConfigurations are likely rare, and when required, nix-fast-build.sh can be used locally too (in which case the remote builder's local nix store would be used as a 'shared cache').

Example run of test-ghaf-infra.yml workflow with the changes from this PR: https://github.com/henrirosten/ghaf-infra/actions/runs/11854339487

@henrirosten henrirosten changed the title GitHub action nix fast build Start using nix-fast-build in github action CI Nov 15, 2024
@henrirosten henrirosten marked this pull request as ready for review November 15, 2024 10:53
@henrirosten henrirosten requested review from joinemm and a team November 15, 2024 10:53
nix/checks.nix Outdated Show resolved Hide resolved
joinemm
joinemm previously approved these changes Nov 18, 2024
@henrirosten henrirosten merged commit 3d541c6 into main Nov 18, 2024
4 of 5 checks passed
@henrirosten henrirosten deleted the github-action-nix-fast-build branch November 19, 2024 09:47
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