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

Upload a NAR of all build dependencies #2

Open
ocharles opened this issue Oct 10, 2020 · 2 comments
Open

Upload a NAR of all build dependencies #2

ocharles opened this issue Oct 10, 2020 · 2 comments

Comments

@ocharles
Copy link
Contributor

This would let us have the evaluator distribute jobs to multiple machines without needing to setup a shared binary cache.

@ocharles
Copy link
Contributor Author

Looks like we can use nix-store --dump or nix dump-path

@ocharles ocharles transferred this issue from circuithub/nix-buildkite Oct 11, 2020
@ocharles
Copy link
Contributor Author

On second thought, this might not make sense. While copying all drv closures makes sense, it still means we don't get good sharing between agents. For example, if we have two jobs that both need a custom GCC, both jobs will end up building it. Even if job two starts after job one (e.g., there is a dependency), it can't see the result of build one's store.

So we'll need to have each build upload a NAR of its result, too. As we're in charge of creating the pipeline, this shouldn't be too hard: for each step, start by downloading an artifact from each dependency. When a step completes, upload the nix-store -r resulting closure.

This won't address two things building GCC in parallel. For this, we'll need to be smarter about how we build a pipeline. That, or just tell people to use https://nixbuild.net/ which automatically deduplicates builds. This issue only affects agents on multiple machines, Nix will already deduplicate builds on the same host.

@dhess dhess mentioned this issue Dec 23, 2021
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

No branches or pull requests

1 participant