CI: dedicated cached runner for this repo (deploy script + volume caches)
- scripts/deploy-runner.sh: compose-managed BigBrainParking Forgejo runner (adapted from the Camp Scan one), with valid_volumes for bigbrainparking-gradle and bigbrainparking-npm. No android-sdk volume — the RN build image ships it. - Workflow mounts those caches (GRADLE_USER_HOME + npm cache) and enables the Gradle build cache (org.gradle.caching + --build-cache), so repeat builds skip the dep re-download and recompile that dominate a cold ~35 min build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
208cddee33
commit
ba3ae8b3e6
2 changed files with 161 additions and 1 deletions
|
|
@ -26,6 +26,15 @@ jobs:
|
|||
# and NO container swap (--memory-swap == --memory) so it OOM-fails cleanly
|
||||
# instead of thrashing the disk with swap. With the JVM caps below it uses ~5 GB.
|
||||
options: --cpus=2 --memory=8g --memory-swap=8g
|
||||
# Persistent caches (whitelisted in the runner's config.yaml valid_volumes).
|
||||
# Gradle home = downloaded Maven deps + build cache; npm = package cache.
|
||||
# Repeat builds skip the re-download/re-compile that dominate a cold build.
|
||||
volumes:
|
||||
- bigbrainparking-gradle:/opt/cache/gradle
|
||||
- bigbrainparking-npm:/opt/cache/npm
|
||||
env:
|
||||
GRADLE_USER_HOME: /opt/cache/gradle
|
||||
npm_config_cache: /opt/cache/npm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -60,6 +69,7 @@ jobs:
|
|||
org.gradle.workers.max=2
|
||||
org.gradle.parallel=false
|
||||
org.gradle.daemon=false
|
||||
org.gradle.caching=true
|
||||
kotlin.daemon.jvmargs=-Xmx1536m
|
||||
PROPS
|
||||
|
||||
|
|
@ -73,10 +83,11 @@ jobs:
|
|||
# Also cap the no-daemon launcher JVM (org.gradle.jvmargs targets the daemon).
|
||||
GRADLE_OPTS: "-Xmx1536m -Djava.net.preferIPv4Stack=true"
|
||||
# --max-workers=2 limits concurrent tasks; container --cpus=2 caps clang -j.
|
||||
# --build-cache reuses task outputs from GRADLE_USER_HOME across runs.
|
||||
run: >-
|
||||
./gradlew :app:assembleRelease
|
||||
-PreactNativeArchitectures=arm64-v8a
|
||||
--no-daemon --max-workers=2
|
||||
--no-daemon --max-workers=2 --build-cache
|
||||
|
||||
# Self-contained publish via the Forgejo API (no external action to fetch).
|
||||
- name: Publish release + upload APK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue