-
Notifications
You must be signed in to change notification settings - Fork 3
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
Speed up builds for COOP users with a CI builder and nix cache provider #58
Comments
Hey @ross-spencer sorry for the late reply, no idea why I didn't get an email about this :/ That's a good idea to put an estimate for the build time! |
@ross-spencer the full CI run was ~30minutes. It's hard to tell exactly how much the
Our CI and my machine is configure to use a private MLabs Nix cache, so some things got reused from there. I do believe the build times should still be comparable so the first build should take 30 minutes given the availability of the public Nix caches. Please give it a go and feel free to add the information about the build time to the README. |
Thanks @bladyjoker. I spent a week away from working directly on this to get a bit more background knowledge in a few more Cardano components for this work. I've started to look at this process again tonight. I've a few small things I can add to the tutorial for as far as I got. I'm looking forward to get back to it tomorrow. I think I got unlucky tonight, the build took ~4.5 hours which is the first time on this new server which isn't too great. (I managed to get some reading done in the meantime) I'll include the full trace, the important part seems to be:
In-full:
I'm not sure how best to debug this when it happens, or when it becomes a sunken cost, if that makes sense (i.e. do I quit and try again? somehow seek alternatives for the sources?). If you have any thoughts about if and how we can document debug steps, it may be helpful. Addiitonally, I suspect I only needed a few novel components in the new environment having recently built the cardano-node:
But this I'm still getting up to speed a bit. I just want to keep you posted and in the loop. I have a |
Hey @ross-spencer that sounds awful :D Let me try and remove the MLabs Cache and try to build it from scratch! Usually such long build times are either due to Nix misconfig and this error could mean your Cache went down in the middle of it! |
Nix is...well...useful but comes at a cost of needing to know Nix well which can be difficult (it was for me) |
I suggest you really only use the components that the coop-env gives you as this guarantees compatibility between the various tools used. That's the primary reason to use Nix, to have bit-level reproducible builds that compounded with tests gives you assurances that the tools are mutually compatible. I've had situations where a 'couple of weeks' difference between cardano-cli and cardano-node was enough to warrant subtle breakages because of some uncaught incompatibilities. |
I see you built 1596 packages, that is a lot and makes sense it took so much time. I asked MLabs to provide customers with public Nix build caches, and will revisit this topic today and see where we land. |
@ross-spencer I believe the plan is to move the repo over to Plutonomicon, which has a public Nix cache, that should do the trick of making the build artifacts publicly available. @GeorgeFlerovsky is that a correct statement? |
Yes, correct. Hercules CI (what we use internally) can be set up to build and cache open-source repositories for free. |
Thanks Dražen, these responses are super helpful. I will keep them in mind as I work through this and see how i can contribute back. George, thanks for the clarification. I feel that will be a big help to the users here. |
Sorry, to clarify: Hercules CI will build open-source repositories for free and integrates with GitHub; however, to speed up the builds a binary cache of the nix dependencies for the project must be set up. Unfortunately, Cachix—the most popular nix cache provider—no longer provides free caching for open-source projects. If you wish to speed up builds for users of COOP (including Orcfax), you will need to subscribe to Cachix or an alternative nix cache provider. |
I'm working through the Tutorial for Orcfax, running
nix develop #dev-tutorial
has taken a while, do we have an anticipated build time for this section? It may be worth adding an approximation to the README as there's little feedback, though if it's not expected to be too high maybe not, it could be something my end.It has been running here, 45 mins and counting.
System:
Intel® Core™ i7-8550U CPU @ 1.80GHz × 8
32GIB Memory.
NB. Providing they're configured correctly, this is with the IOHK pre-built binary config.
The text was updated successfully, but these errors were encountered: