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

Fix caching for macOS CI jobs #7326

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

DomClark
Copy link
Member

There are two changes in this PR:

  • Make the macOS caches (ccache and Homebrew downloads) architecture-specific. Previously, since caches are immutable, whichever job (x86_64 or arm64) finished first had its cache saved, and the other was unable to cache anything. This meant that one of the macOS jobs effectively ran without any caching. Splitting the caches by architecture should improve performance by avoiding this issue.
  • Only save the Homebrew download cache if the lock file changes. Previously, we always tried to save the download cache. This would fail if the cache already existed, but this wasn't fatal for the job, at least. Worse is that the caches are isolated for each branch, but every branch can read caches for the master branch. The result is that we would unnecessarily save a separate copy of the download cache for every PR, which used up a lot of our cache quota, increasing cache churn. It also meant that the master cache was only read once for each PR, and therefore was more likely to expire due to lack of use. All these issues are fixed or reduced in severity by only saving the cache when it changes.

@DomClark DomClark changed the title Fix CI caching for macOS jobs Fix caching for macOS CI jobs Jun 17, 2024
@tresf tresf self-requested a review June 18, 2024 17:53
@messmerd messmerd merged commit 39b7d16 into LMMS:master Jun 18, 2024
10 checks passed
@DomClark DomClark deleted the macos-cache-fix branch June 18, 2024 21:15
Rossmaxx pushed a commit to Reflexe/lmms that referenced this pull request Jul 16, 2024
* Add architecture to macOS cache keys

* Only save Homebrew cache if lock file has changed
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.

3 participants