Refactor CI workflow - bring back reasonable CI runtime #6461
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.
Unifies most main + PR workflows into a single workflow.
The unified CI workflow consists of 2 "stages":
Checks are split into multiple jobs, which brings back CI workflow runtimes of < 20 minutes for small-ish changes, up to 35 minutes at worst (assuming that all jobs are not delayed by GH concurrent job limits).
Utilizes the Gradle build cache as much as possible. The updated build cache of the jobs in the checks stage are saved as artifacts (with the minimum retention period). The updated build cache is pushed back to GigHub's cache when the checks have successfully finished.
Java CI runs against Java 11. The workflow can be easily adopted to add Java 17 for some (or all) jobs, but that would effectively double the amount of concurrent jobs, and there is a hard limit imposed by GitHub.
Spark + Deltalake tests always run against 11 as configured in the build scripts.
Codecov was not added to the new workflow, it wasn't working for quite a while now or produced wrong results.
Build logs and reports are not archived. Test results and relevant logs are available via Gradle build scans.
Windows + macOS workflows are not included in the unified workflow.
There is also another Gradle cache
action, which utilizes the GitHub's cache like a remote Gradle cache. However, that puts too much load (requests) against GitHub's cache, which in turn throttles our CI and responds with HTTP/429 (Too many requests). See this issue.
Fixes #6365