Slackbot
01/17/2023, 3:45 PMChris Lee
01/17/2023, 3:52 PMVampire
01/17/2023, 3:52 PMChris Lee
01/17/2023, 3:53 PMVampire
01/17/2023, 3:54 PMgradle.properties
, even when using that action, right?Chris Lee
01/17/2023, 3:55 PMPhilip W
01/17/2023, 4:01 PMVladimir Sitnikov
01/17/2023, 4:09 PMVampire
01/17/2023, 4:11 PMVladimir Sitnikov
01/17/2023, 4:13 PMbuildCache
configuration by defaultVampire
01/17/2023, 4:14 PMVladimir Sitnikov
01/17/2023, 4:24 PMBy default, the action enables theSo if you merely apply the action, then it would enable build cache.build cache, and it adds a remote build cache that stores the data in GitHub Actions cachelocal
Chris Lee
01/17/2023, 4:26 PMThis is how you can enable local build cache (donāt forget to addoption or--build-cache
property):org.gradle.caching=true
```// settings.gradle.kts
val isCiServer = System.getenv().containsKey("CI")
// Cache build artifacts, so expensive operations do not need to be re-computed
buildCache {
local {
isEnabled = !isCiServer
}
}```
Chris Lee
01/17/2023, 4:28 PMBy default, the action enables theAlso, wondering why it shows an example of enabling the build cache for CI (the only place where the GitHub action runs) that has the build cache disabled for CI:build cachelocal
```// settings.gradle.kts
val isCiServer = System.getenv().containsKey("CI")
// Cache build artifacts, so expensive operations do not need to be re-computed
buildCache {
local {
isEnabled = !isCiServer
}
}```
Vladimir Sitnikov
01/17/2023, 4:29 PMThe README indicates one needs to enable the build cacheIt is in case you want to enable caching when building the project locally
Chris Lee
01/17/2023, 4:30 PMVladimir Sitnikov
01/17/2023, 4:35 PMChris Lee
01/17/2023, 4:36 PMEli Graber
01/17/2023, 4:40 PMgradle-build-action
the cache is only written to from your repo's default branch by defaultVampire
01/17/2023, 5:19 PMEli Graber
01/17/2023, 5:26 PMVampire
01/17/2023, 5:28 PMVampire
01/17/2023, 5:30 PMVladimir Sitnikov
01/18/2023, 10:24 AMYou could switch it off to save cache space and then disable the local cacheThe behavior should be sane: it should not do dumb things by default, so disabling things at random is not the best option. If it does dumb things by default, then it is better to file a bug. The switches are there to fine-tune in case of weird requirements/issues.
Vampire
01/18/2023, 10:26 AMVladimir Sitnikov
01/18/2023, 10:30 AMVampire
01/18/2023, 10:40 AMgradle-build-action
?
In the readme there is only a comparison to gradle-command-action
.
For example as far as I know your action does not support caching the configuration cache yet while the official does. šVladimir Sitnikov
01/18/2023, 11:19 AMburrunan/gradle-cache-action
is not endorsed by Gradle, so I am afraid it will not get traction.
Just like JCenter died, because āMaven Centralā was always āthe officialā repository, so JCenter had doomed to be the second level citizen.
I believe gradle/gradle-build-action
misses:
⢠remote build cache, including multi-cache when you fetch from GitHub Actions cache, and the remote build cache configured in the project
⢠Incremental file-based cache storage. burrunan/gradle-cache-action
implements incremental storage for file-based caches (e.g. in case build cache
is disabled)
⢠Maven repository caching. For instance, if your build uses Maven-based builds as prerequisite, then you might want to cache .m2/
as well. Of course, it is incremental, and subsequent PR-based builds can reuse āmain cache + previous PR cacheā
⢠Build error propagation from the log to file diff UI: https://github.com/pgjdbc/pgjdbc/pull/2720/files#file-pgjdbc-src-main-java-org-postgresql-package-info-java-L6
⢠Build scan is not surfaced. For instance, with burrunan/gradle-cache-action
, the links are easier to use: https://github.com/pgjdbc/pgjdbc/actions/runs/3929085356
⢠Kotlin. gradle/gradle-build-action
is TypeScript-based while burrunan/gradle-cache-action
is Kotlin-based
There might be other minor differencesVampire
01/18/2023, 11:25 AMVampire
01/23/2023, 2:01 PM