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

Only evaluate what is needed to build #84

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

joinemm
Copy link
Collaborator

@joinemm joinemm commented Nov 4, 2024

The current implementation of the parallel evaluation stage evaluates the entire #hydraJobs attribute of ghaf, even though we don't build half of the packages it contains. This is wasteful.

nix-eval-jobs can take arbitrary nix expression as input, so I'm creating a new attribute set on the fly, which is a subset of ghaf #packages, only containing the targets we need, and evaluating that instead.

From my testing, this shaves our evaluation time in main pipeline from 7-8 minutes to just under 3 minutes (with the current set of targets)

As for the move to #packages, some of the newer targets are not available in #hydraJobs, as it's being phased out and not updated anymore. Nightly pipeline for example currently could not be built in parallel for this reason. Ghaf #packages set is very large so without this optimisation it would have taken ages to evaluate.

@joinemm joinemm marked this pull request as ready for review November 4, 2024 19:15
@joinemm joinemm marked this pull request as draft November 4, 2024 19:16
@joinemm joinemm marked this pull request as ready for review November 5, 2024 07:48
@joinemm joinemm requested a review from a team November 5, 2024 07:49
@joinemm joinemm merged commit 97e20dc into tiiuae:main Nov 6, 2024
1 check passed
@joinemm joinemm deleted the pr-eval-subset branch November 6, 2024 09:13
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