Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/benchmark-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true
- name: Run jmh
run: ./gradlew jmhJar
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true
- name: Run jmh
run: ./gradlew jmhJar
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true

- name: Publish to Sonatype
run: ./gradlew assemble publishToSonatype
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
# Keep one writer per OS because Gradle User Home caches are platform-specific.
cache-read-only: ${{ github.ref_name != github.event.repository.default_branch || matrix.test-java-version != 25 }}
gradle-home-cache-excludes: >-
${{ secrets.DEVELOCITY_ACCESS_KEY != '' && github.ref_name == github.event.repository.default_branch && matrix.test-java-version == 25 && 'caches/build-cache-1' || '' }}
Comment thread
trask marked this conversation as resolved.
- name: Build
run: >
./gradlew build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
- name: Set up gradle
if: matrix.language == 'java'
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true

- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/javadoc-crawler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true

- name: Run crawler
run: ./gradlew :javadoc-crawler:crawl
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true

- name: Build and publish artifacts
run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
Expand Down Expand Up @@ -189,6 +191,8 @@ jobs:

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true

- name: Update apidiff baseline
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sonatype-guide-dependency-audit-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:

- name: Set up gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-read-only: true

# --no-parallel is needed to avoid OverlappingFileLockException on the shared OSS Index cache
- run: ./gradlew ossIndexAudit --no-configuration-cache --no-parallel --info
Expand Down
16 changes: 13 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ val develocityServer = "https://develocity.opentelemetry.io"
val isCI = System.getenv("CI") != null
val develocityAccessKey = System.getenv("DEVELOCITY_ACCESS_KEY") ?: ""
val disableRemoteBuildCache = System.getenv("DISABLE_REMOTE_BUILD_CACHE") != null
val isRemoteBuildCachePushEnabled =
isCI && develocityAccessKey.isNotEmpty() && !disableRemoteBuildCache
val shouldDisableLocalBuildCache =
isRemoteBuildCachePushEnabled && System.getenv("GITHUB_REF_NAME") == "main"

develocity {
if (develocityAccessKey.isNotEmpty()) {
Expand Down Expand Up @@ -111,9 +115,15 @@ develocity {
}

buildCache {
remote(HttpBuildCache::class) {
url = uri("$develocityServer/cache/")
// Tasks loaded from the local cache are not pushed to the remote cache. Disable the local cache
// on default-branch CI builds so executed tasks populate the authenticated Develocity cache.
local {
isEnabled = !shouldDisableLocalBuildCache
}

remote(develocity.buildCache) {
server = develocityServer
isEnabled = !disableRemoteBuildCache
isPush = isCI && develocityAccessKey.isNotEmpty()
isPush = isRemoteBuildCachePushEnabled
}
}
Loading