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

Faster builds #56

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Faster builds #56

merged 6 commits into from
Jan 24, 2024

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Jan 24, 2024

Makes builds 2x faster thanks to parallelization (except for the original single core Zero W)

  • Parallelize build on device. This takes a full build on a Pi5 from 90sec to 50sec. At 3.5min for Zero W2, down from 8min.
  • Cache parallelized build. This takes it down to 15sec on a Pi5. Under 50sec for Zero W2, down from 90 sec

We could probably save even more with cross compilation, but with under minute compilation and deployment times, it doesn't really matter anymore, at least at a small scale.

The nimc.Makefile is ready to be compiled inside dockcross, but getting that working inside a Dockerfile and/or or on all platforms sounds like a chore. I'd either have to make the image much larger and include build tools for all targets, or put docker inside docker. Then, to link to system libraries like lgpio or evdev, I also need to either know their exact versions, or scp the .a files from the client device onto the build server.

This complexity adds up, and since the alternative is to "wait a minute" (instead of waiting half a minute), I'll come back to it later. Perhaps with a stand alone build server.

@mariusandra mariusandra merged commit 6c6d1e6 into main Jan 24, 2024
1 check passed
@mariusandra mariusandra deleted the faster-builds branch January 24, 2024 22:54
@mariusandra mariusandra mentioned this pull request Jan 24, 2024
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.

1 participant