gowalk-cicd 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -103,6 +103,18 @@ in Play Console; every later run detects API readiness and uploads to the
103
103
  `internal` track automatically. Override the track or status with repository
104
104
  variables `GOOGLE_PLAY_TRACK` and `GOOGLE_PLAY_STATUS`.
105
105
 
106
+ ### Gradle daemon heap
107
+
108
+ A `gradle.properties` sized for a workstation does not fit a CI runner.
109
+ `-Xmx8G` with a 4 GB metaspace reserves 12 GB for the Gradle daemon alone,
110
+ before the Kotlin compile daemon spawns its own JVM — on a 16 GB runner the
111
+ build is killed mid-compile, and GitHub reports that as a **cancelled** job
112
+ rather than a failure, so it reads as a flake rather than an out-of-memory.
113
+
114
+ Before building, the Android job caps `-Xmx` at 4 GB and `MaxMetaspaceSize` at
115
+ 2 GB in the checkout, with a `::warning::` naming the original value. Projects
116
+ already at or below those numbers are left untouched. Linux only.
117
+
106
118
  ### Google Play upload retry
107
119
 
108
120
  A Play edit is a short-lived server-side object, and an AAB upload that runs
@@ -1 +1 @@
1
- 1.0.21
1
+ 1.0.22
@@ -1 +1 @@
1
- 1.0.21
1
+ 1.0.22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gowalk-cicd",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Zero-config GitHub Actions delivery for iOS TestFlight and Android Google Play.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -183,6 +183,38 @@ jobs:
183
183
  echo "::add-mask::$GIT_PRIVATE_TOKEN"
184
184
  git config --global url."https://x-access-token:${GIT_PRIVATE_TOKEN}@github.com/".insteadOf "https://github.com/"
185
185
  echo "Configured authenticated github.com remotes for pub."
186
+ # A Gradle daemon sized for a workstation does not fit a CI runner. Asking
187
+ # for -Xmx8G with a 4G metaspace reserves 12 GB before the Kotlin compile
188
+ # daemon spawns its own JVM, and the runner is killed mid-compile — which
189
+ # GitHub reports as "cancelled", not as a failure, so it reads as a flake
190
+ # rather than an out-of-memory. Clamp to a size that leaves room, in the
191
+ # checkout only.
192
+ - name: Cap the Gradle daemon heap for this runner
193
+ if: ${{ steps.mode.outputs.mode == 'local' && runner.os == 'Linux' }}
194
+ shell: bash
195
+ env:
196
+ MAX_HEAP_GB: '4'
197
+ MAX_META_GB: '2'
198
+ run: |
199
+ shopt -s nullglob
200
+ for f in android/gradle.properties gradle.properties; do
201
+ [ -f "$f" ] || continue
202
+ before=$(grep -m1 '^org.gradle.jvmargs' "$f" || true)
203
+ [ -n "$before" ] || continue
204
+ heap=$(sed -nE 's/.*-Xmx([0-9]+)[Gg].*/\1/p' <<<"$before")
205
+ meta=$(sed -nE 's/.*MaxMetaspaceSize=([0-9]+)[Gg].*/\1/p' <<<"$before")
206
+ changed=""
207
+ if [ -n "$heap" ] && [ "$heap" -gt "$MAX_HEAP_GB" ]; then
208
+ sed -i -E "s/-Xmx${heap}[Gg]/-Xmx${MAX_HEAP_GB}G/" "$f"; changed=1
209
+ fi
210
+ if [ -n "$meta" ] && [ "$meta" -gt "$MAX_META_GB" ]; then
211
+ sed -i -E "s/MaxMetaspaceSize=${meta}[Gg]/MaxMetaspaceSize=${MAX_META_GB}G/" "$f"; changed=1
212
+ fi
213
+ if [ -n "$changed" ]; then
214
+ echo "::warning::$f asked for more heap than this runner has; capped it for this build only ($before)"
215
+ grep -m1 '^org.gradle.jvmargs' "$f"
216
+ fi
217
+ done
186
218
  # Same reason as the iOS job: apps using AppLocalizations must generate it
187
219
  # before anything analyses or compiles them. No-op for apps without l10n.
188
220
  - name: Generate localizations