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

Build: Use actions/cache #2277

Closed
6 tasks done
hoffie opened this issue Jan 25, 2022 · 4 comments · Fixed by #2284
Closed
6 tasks done

Build: Use actions/cache #2277

hoffie opened this issue Jan 25, 2022 · 4 comments · Fixed by #2284
Assignees
Milestone

Comments

@hoffie
Copy link
Member

hoffie commented Jan 25, 2022

Describe the bug

We should use actions/cache to improve build speeds and resiliency against temporary flakiness on external dependencies.

The following things to check come to mind:

Depends on #2276 to avoid caching a bad state.

To Reproduce

Random flakiness such as Qt download failures.

Expected behavior

Dependencies should be cached. Temporary download failures should not break the build.

Screenshots

https://github.com/jamulussoftware/jamulus/runs/4936344409?check_suite_focus=true

Caught ArchiveConnectionError, terminating installer workers
Failure to connect to https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5152/qt.qt5.5152.win64_msvc2019_64/5.15.2-0-202011130602qtremoteobjects-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z.sha1: ReadTimeout

Additional context

https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows
https://github.com/actions/cache

@hoffie hoffie added the bug Something isn't working label Jan 25, 2022
@hoffie hoffie self-assigned this Jan 25, 2022
@hoffie
Copy link
Member Author

hoffie commented Jan 25, 2022

My current PoC is at hoffie@cache-autobuild-deps. Will submit a PR after some more testing and history cleanups.

Relevant runs:
Initial run: https://github.com/hoffie/jamulus/runs/4948136692?check_suite_focus=true
Cached run: https://github.com/hoffie/jamulus/actions/runs/1749769513

@hoffie
Copy link
Member Author

hoffie commented Jan 26, 2022

As expected, some rather small performance improvements kick in:

Job Prepare (uncached) Prepare (cached) Restore cache Save cache Cache size Total (master) Total (1st) Total (2nd)
Android 7m 38s 1m 16s 0m 53s 1m 32s 1.886 MB 35m 51s 49m 0s 31m 52s
MacOS (Artifacts) 0m 28s 0m 0s 0m 11s 0m 5s 111 MB 8m 28s 6m 8s 5m 51s
Linux 1m 34s 1m 21s - - - 11m 57s 13m 55s 10m 57s
Windows 2m 25s 0m 27s 1m 49s 1m 10s 294 MB 25m 27s 32m 53s 27m 21s

Note: I have included the Linux job despite there being no changes. This shows that there is some variance in runtime duration.

I had tried to calculate absolute/relative improvements, but the improvements by caching would have been much larger (17 minutes for Android) than what could be explained by the shorter Prepare step duration. Therefore, I assume that run time is highly influenced by external factors on Github Actions Runners. So, take those numbers with a grain of salt, they're only from two runs.

@ann0see ann0see added improvement and removed bug Something isn't working labels Jan 26, 2022
@pljones
Copy link
Collaborator

pljones commented Feb 20, 2022

Is this closed by #2284? I wasn't sure from the comments.

@hoffie
Copy link
Member Author

hoffie commented Feb 20, 2022

Is this closed by #2284? I wasn't sure from the comments.

Yes, it was correctly auto-closed by #2284. The remaining to do is covered by #2412. I'll add it to the PR description to clarify. Everything else should be covered.

Umm: I missed that the version pinning for brew/create-dmg happens in a different file. So, in theory, this should have been part of this PR. #2412 will have it anyway.

@pljones pljones added this to the Release 3.9.0 milestone Feb 21, 2022
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 a pull request may close this issue.

3 participants