Repository navigation
feat(ci): serve the Gradle build cache from RunsOn - #44
Merged
Merged
Conversation
RunsOn v3.6.0 serves Gradle's HTTP build cache from the stack's S3 bucket through runs-on/action. Gradle only uses it with the build cache on, so the Gradle steps pass --build-cache. On an older stack the action warns and the build runs without the remote cache.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Serves Gradle's HTTP build cache from RunsOn's S3 bucket (RunsOn v3.6.0,
remote_cache: gradleonruns-on/action@v2) ingradle-ci,gradle-publishand the test step ofnative-gradle-build-push. Gradle only uses a remote cache with the build cache on, so these steps now pass--build-cache.docker-gradle-build-pushandplatform-test-previeware unchanged: Gradle runs inside the Docker build there, which cannot reach the runner's agent, and they keep the sticky BuildKit cache.Type of Change
Testing
python -m unittest discover -s tests, 20 tests)All Gradle repos use 9.2.1 or newer; the cache needs 7.6.
Risk
This changes CI for every Gradle repo as soon as it is on
main, because callers use@main.--build-cacheis new for repos withoutorg.gradle.caching=true: unchanged inputs now restore a task's output, includingtest. A test with undeclared inputs (an external service, an environment value) would be skipped instead of re-run.--build-cacheuses the local cache.Branch scoping: a pull request reads its own entries, its base and the default branch, and writes only its own. Entries expire after 10 days.
How to revert
git revertis enough. Entries left in the bucket expire on their own.