Skip to content
Merged
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
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ concurrency:
permissions:
contents: read

env:
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}

jobs:
# Code-quality gate + the targets whose tests actually EXECUTE on a Linux host:
# JVM, JS (Node + headless-Chrome), Wasm (wasmJs/wasmWasi on Node) and the
Expand All @@ -39,6 +34,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

- name: Cache Konan (Kotlin/Native toolchain)
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down Expand Up @@ -76,6 +73,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

- name: Cache Konan (Kotlin/Native toolchain)
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

- name: Build documentation
run: ./gradlew dokkaGenerate --no-daemon
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

- name: Build, test & API check (all targets)
run: ./gradlew build --stacktrace
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![codecov](https://codecov.io/gh/meshtastic/kzstd/graph/badge.svg)](https://codecov.io/gh/meshtastic/kzstd)
[![License: GPL-3.0](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
[![Kotlin Multiplatform](https://img.shields.io/badge/Kotlin-Multiplatform-blue.svg?logo=kotlin)](https://kotlinlang.org)
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://community.develocity.cloud/scans?search.rootProjectNames=kzstd)

A pure-Kotlin, multiplatform [Zstandard](https://facebook.github.io/zstd/) (zstd)
codec with dictionary support. It produces and reads **standard zstd frames** that
Expand Down
62 changes: 0 additions & 62 deletions gradle/build-cache.settings.gradle

This file was deleted.

54 changes: 54 additions & 0 deletions gradle/develocity.settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// SPDX-License-Identifier: GPL-3.0-or-later
/*
* Develocity — Build Scans and remote Build Cache on the OSS Community instance
* (https://community.develocity.cloud), project `meshtastic`.
*
* Replaces the former self-hosted HttpBuildCache: GRADLE_CACHE_URL / _USERNAME /
* _PASSWORD are no longer read anywhere in this repo.
*/

def isCI = System.getenv("CI") != null

develocity {
server = "https://community.develocity.cloud"
projectId = "meshtastic"
buildScan {
uploadInBackground = !isCI
// Unauthenticated builds (fork PRs, developers who never provisioned a key)
// publish nothing rather than failing.
publishing.onlyIf { it.authenticated }
// Fingerprints power cache-miss comparison (CI debugging); skip the payload locally.
capture { fileFingerprints = isCI }
// Public instance: no machine identity. Constants on purpose — scans already
// record OS/CPU and CCUD adds CI metadata. Keep the `if` OUTSIDE the closures:
// capture-free closures are what the configuration cache can serialize.
obfuscation {
ipAddresses { addresses -> addresses.collect { "0.0.0.0" } }
externalProcessName { "external-process" }
if (isCI) {
username { "ci" }
hostname { "ci-runner" }
} else {
username { "local-dev" }
hostname { "local-machine" }
}
}
}
}

// Resolved outside the buildCache block: inside it the closure delegate is
// BuildCacheConfiguration, which has no `develocity` property.
def develocityBuildCache = develocity.buildCache
def accessKey = System.getenv("DEVELOCITY_ACCESS_KEY")?.trim()

buildCache {
// Off on CI: runners are ephemeral and every hit comes from the remote anyway.
local {
enabled = !isCI
}
remote(develocityBuildCache) {
enabled = true
// Only authenticated CI writes, so unmerged and fork code cannot poison the cache.
push = isCI && accessKey != null && !accessKey.isEmpty()
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
7 changes: 6 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ pluginManagement {
}
}

apply(from = "gradle/build-cache.settings.gradle")
plugins {
id("com.gradle.develocity") version "4.5.0"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.8.0"
}

apply(from = "gradle/develocity.settings.gradle")
Comment thread
coderabbitai[bot] marked this conversation as resolved.

rootProject.name = "kzstd"