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

ci: Fix Package Cache #378

Merged
merged 12 commits into from
Jan 21, 2025
Merged

ci: Fix Package Cache #378

merged 12 commits into from
Jan 21, 2025

Conversation

Zac-Digital
Copy link
Collaborator

@Zac-Digital Zac-Digital commented Jan 20, 2025

Noticed the package cache for NuGet hasn't been working the whole time. The cache isn't thread safe, so when multiple runners (e.g., PR build & test, or building artifacts before deploying) are using it, none of them can properly write to it and quickly break, which means that most of them were just grabbing their packages from NuGet instead of the cache and not being sped up.

Unfortunately the hashFiles() function only works relative to the root of the repository so you can't hash files specific to a project easily. As such the workaround is to add the name of the project into the cache to give each project its own cache.

Since the SonarCloud runs from the SuperSolution it also has its own special cache key.

Also technically it's SpatiaLite and not Spatialite so I just corrected that too while I'm there :P

@Zac-Digital Zac-Digital changed the title ci: skip restore step on cache hit ci: Fix Package Cache Jan 20, 2025
@Zac-Digital Zac-Digital marked this pull request as ready for review January 20, 2025 16:32
@Zac-Digital Zac-Digital merged commit ad67802 into main Jan 21, 2025
19 checks passed
@Zac-Digital Zac-Digital deleted the ci/build-and-test-package-cache branch January 21, 2025 09:23
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