build.yml: Use nix-fast-build to build on remote #874
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Start using nix-fast-build in the build.yml workflow to execute all build operations completely on the remote end.
Removes the step 'Maximize space available on rootfs' since with
nix-fast-build
, we no longer download the full build closure on the github-hosted runner. Furthermore, with the--no-download
option, we also skip the download of the final build result (ghaf image), so we no longer need to free up the storage on the github runner.This change also removes the upload to https://ghaf-dev.cachix.org from the build workflow: it is no longer needed, since builds are already cached on the remote builders' local nix store. Jenkins builds will take care of uploading the build binaries to a separate nix binary cache, maintained with ghaf-infra.
With the above summarized changes, build times on the build.yml workflow will significantly reduce. It should also completely remove the hash mismatch issues on the build workflow as builds and also evaluation operations are executed on the remote.
This change was tested on a fork, as an example, see: https://github.com/henrirosten/ghaf/actions/runs/11587433044.
Checklist for things done
x86_64
aarch64
riscv64
make-checks
and it passesnixos-rebuild ... switch
Instructions for Testing