Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: This PR attempts to solve two problems: - Our CI runs don't necessarily reflect a typical developer's workflow because it is run with specific flags (i.e. `flakyTests`, `noLint`, etc..). For this reason, the populated build caches does not necessarily coincide with that of a developer workflow. - Our CI does not upload build-cache to our remote node yet. In this PR, I propose that we launch a separate build task to populate the build cache for each PR. Additionally, I propose that we retry tests in this task so that flaky tests don't affect build cache upload. Note that I would like to do some more experiments before actually enabling caching for everyone. (It can be done manually by setting the `--build-cache` flag on the CLI) For this reason, in this PR I don't enable the `org.gradle.caching=true` option yet. This will be done after experiments are complete. See the following links for a preview: - jrhee17#27 - https://github.com/jrhee17/armeria/actions/runs/5960198011/job/16167108190 Modifications: - Set up credentials for cache upload. These credentials can be registered at: - https://ge.armeria.dev/cache-admin/node/built-in - Cache access control - Set up remote build cache upload configurations. Note that credentials are only required for writing, as reading can be done anonymously. The cache will be pushed only at the CI if the proper write credentials are supplied (i.e. writing to the `main` branch) - Note that the `gradle-enterprise-postjob.yml` task must be merged to the `main` branch to take effect. - Introduced a `failOnPassedAfterRetry` to prevent build cache uploads tasks from failing due to flaky tests. - Renamed the github task to `gradle-enterprise-postjob.yml` to better reflect the new role. Result: - Build cache is uploaded from CI for each PR/push to `main` branch <!-- Visit this URL to learn more about how to write a pull request description: https://armeria.dev/community/developer-guide#how-to-write-pull-request-description -->
- Loading branch information