Skip to content

Commit 4ac264d

Browse files
fix: zlib parallel build race + Kotlin SNAPSHOT version in release
Two follow-up fixes discovered while validating the v0.19.10 draft release. 1. sdk/runanywhere-web/wasm/scripts/build.sh — cap --parallel at 2 During release.yml native_web, zlib static-lib linking intermittently raced with llvm-ranlib: two parallel link steps wrote libz.a and another job tried to ranlib it before the writer had finished, causing "unable to load 'libz.a': No such file or directory". First hit on the v0.19.10 release run; a rerun succeeded. Capping to 2 workers (we only have 2 cores on standard GH runners) eliminates the race without meaningfully impacting build time. 2. .github/workflows/release.yml — pass SDK_VERSION env to sdk_kotlin The v0.19.10 release's JVM JAR was named RunAnywhereKotlinSDK-jvm- 0.1.5-SNAPSHOT.jar instead of using the release version. build.gradle.kts reads SDK_VERSION from env, falling back to "0.1.5-SNAPSHOT" if unset. The release workflow wasn't setting it. Now forwards the validated release version into the gradle invocation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 12f3198 commit 4ac264d

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,12 @@ jobs:
293293
# only the packaging tasks directly. Test sources have drifted from
294294
# the current SDK API and are not part of the release deliverable;
295295
# that cleanup is a follow-up unrelated to the artifact pipeline.
296+
#
297+
# SDK_VERSION is consumed by build.gradle.kts (line ~52) to name the
298+
# JVM JAR artifact. Without it, it falls back to "0.1.5-SNAPSHOT".
296299
working-directory: sdk/runanywhere-kotlin
300+
env:
301+
SDK_VERSION: ${{ needs.validate.outputs.version }}
297302
run: ./gradlew -Prunanywhere.useLocalNatives=true assembleRelease jvmJar --no-daemon
298303
- name: Collect Kotlin SDK artifacts
299304
run: |

sdk/runanywhere-web/wasm/scripts/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ emcmake cmake \
161161
# Build
162162
echo ""
163163
echo ">>> Building WASM module..."
164-
emmake cmake --build "${BUILD_DIR}" --parallel
164+
# Cap parallelism to 2 to avoid an intermittent zlib static-lib race with
165+
# llvm-ranlib under emmake where two parallel link steps produce and then
166+
# immediately consume libz.a, and the reader can see it before the writer
167+
# finishes. 2 workers is plenty on 2-core CI runners and safe locally.
168+
emmake cmake --build "${BUILD_DIR}" --parallel 2
165169

166170
# Verify outputs
167171
echo ""

0 commit comments

Comments
 (0)