ci: persist Gradle/Android caches across CI runs, give sccache headroom
Build Debug APK / build (push) Successful in 16m27s
Build Debug APK / build (push) Successful in 16m27s
GRADLE_USER_HOME and ANDROID_USER_HOME were scoped to the ephemeral git checkout instead of the persistent cache dir, so every CI run re-downloaded the Gradle distribution and the entire Maven/AGP/Kotlin/Compose dependency cache from scratch. Move them alongside CARGO_TARGET_DIR/SCCACHE_DIR under the persistent cache directory. Also bump SCCACHE_CACHE_SIZE past its default 10GiB, which was sitting exactly at the ceiling and causing LRU eviction on the Rust side. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYfqVnUhRV9fPEP9gZpMqL
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
6302f306c8
commit
8006be212f
@@ -14,12 +14,13 @@ APK_PATH="$REPO_ROOT/$APK_NAME"
|
||||
CACHE_DIR="${STATE_DIRECTORY:-/var/lib/gitea-runner}/cache"
|
||||
mkdir -p "$CACHE_DIR"
|
||||
|
||||
export GRADLE_USER_HOME="$REPO_ROOT/.gradle-home"
|
||||
export ANDROID_USER_HOME="$REPO_ROOT/.android-home"
|
||||
export GRADLE_USER_HOME="$CACHE_DIR/gradle-home"
|
||||
export ANDROID_USER_HOME="$CACHE_DIR/android-home"
|
||||
export CARGO_BUILD_JOBS=2
|
||||
export CARGO_TARGET_DIR="$CACHE_DIR/cargo-target"
|
||||
export RUSTC_WRAPPER="$SCCACHE_BIN"
|
||||
export SCCACHE_DIR="$CACHE_DIR/sccache"
|
||||
export SCCACHE_CACHE_SIZE="20G"
|
||||
|
||||
cat > "$REPO_ROOT/android/local.properties" <<PROPS
|
||||
sdk.dir=$ANDROID_SDK_DIR
|
||||
|
||||
Reference in New Issue
Block a user