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

Speed up build by tuning apt and dpkg #189

Merged
merged 4 commits into from
Feb 11, 2025
Merged

Speed up build by tuning apt and dpkg #189

merged 4 commits into from
Feb 11, 2025

Conversation

norwd
Copy link

@norwd norwd commented Feb 10, 2025

I've adapted the recommendations of @abbbi's speedup.sh script to significantly reduce the run time of the various apt-get install steps in scripts/install_requirements.sh.

Compare a run without this change to one with this setup, note that the additional changes here all run in under a second:

image
image

This is a reduction of about 3-4 minutes, which I find very helpful in my infinite (im)patience 😂

Signed-off-by: Y. Meyer-Norwood <106889957+norwd@users.noreply.github.com>
@entorb
Copy link
Collaborator

entorb commented Feb 10, 2025

Wow, that is very impressive!
Is there a reason, why you did not put it into a - name section and placed the commands in a single - run |?

PS: In the hpmor-de repo, I experimented with caching of apt package installations, that might also be interesting for you. Unfortunately, the LaTeX packages gave me headache, and I did not solve it for them. (and hence, not brought it here). Maybe you can solve these issues.

@rrthomas
Copy link
Owner

I like the speedups, but I don't like the maintenance burden, or lack of debuggability.

I would be happy with this sort of tweak if it was itself a GitHub action, so it can be improved and fixed independent of this project, and easily disabled for debugging.

@abbbi
Copy link

abbbi commented Feb 10, 2025

https://github.com/abbbi/github-actions-tune

Great, so can we use this action instead of patching our own actions?

@abbbi
Copy link

abbbi commented Feb 10, 2025

https://github.com/abbbi/github-actions-tune

Great, so can we use this action instead of patching our own actions?

yes, see:

https://github.com/abbbi/tuneme/

@norwd
Copy link
Author

norwd commented Feb 10, 2025

Wow, that is very impressive! Is there a reason, why you did not put it into a - name section and placed the commands in a single - run |?

I normally am a stickler for adding the name: section to my actions, but I'm try to keep the hpmor-eo repo Esperanto-only, so out of pure laziness I'm omitting the step names so there's less to translate 😂

PS: In the hpmor-de repo, I experimented with caching of apt package installations, that might also be interesting for you. Unfortunately, the LaTeX packages gave me headache, and I did not solve it for them. (and hence, not brought it here). Maybe you can solve these issues.

I've also elected to not go the caching route for precisely that reason... if you ever do solve them please let me know!

@rrthomas
Copy link
Owner

So just to be clear, I'd prefer a version of this PR that uses @abbbi's GitHub Action.

@norwd
Copy link
Author

norwd commented Feb 10, 2025

So just to be clear, I'd prefer a version of this PR that uses @abbbi's GitHub Action.

No worries, I'll update the PR shortly 👍

@norwd
Copy link
Author

norwd commented Feb 10, 2025

So just to be clear, I'd prefer a version of this PR that uses @abbbi's GitHub Action.

No worries, I'll update the PR shortly 👍

Done 🚀, I've tested this version, @rrthomas, and it seems to be work just fine. Thanks for making this invokable as an action @abbbi!

@rrthomas
Copy link
Owner

Thanks for this, @norwd. @entorb, please could you merge this if you're happy with it? Since you have worked on the GitHub Actions much more than me recently, I just want to ensure you are on board with this change!

@entorb
Copy link
Collaborator

entorb commented Feb 11, 2025

Thanks!

I still think that placing a name with a description of what it does to this step would make it easier to understand for others.

@norwd
Copy link
Author

norwd commented Feb 11, 2025

Thanks!

I still think that placing a name with a description of what it does to this step would make it easier to understand for others.

@entorb, 🤦 yup I should have added that earlier. Done now

@entorb entorb merged commit f67a22c into rrthomas:main Feb 11, 2025
3 checks passed
@entorb
Copy link
Collaborator

entorb commented Feb 12, 2025

Merged and tested: about 30s faster in the apt install step.

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.

4 participants