Skip to content

Release: build and ship the Android default library, collector and runtime - #519

Merged
ASDAlexander77 merged 1 commit into
mainfrom
ci-android-defaultlib
Oct 5, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
ci-android-defaultlib

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

What

The release workflow's Windows job (create-release.yml, build_on_windows) now also builds everything Android needs, after the desktop default library, with the runner's preinstalled Android NDK (ANDROID_NDK_LATEST_HOME, falling back to ANDROID_NDK_HOME):

  1. Install Ninja (choco): the Android scripts use the NDK's CMake toolchain with Ninja.

  2. Build Android Collector and Async Runtime: scripts\build_gc_release_android.bat and scripts\build_tslang_runtime_release_android.bat, for API 29, arm64-v8a and x86_64. It also exports ANDROID_NDK_HOME for the later steps.

  3. Build Android Default Library: TypeScriptCompilerDefaultLib's scripts\build_android.bat with the tslang just built: both ABIs × release/debug × gc/rc/none.

  4. Test Compiler for Android: test-compile-android-codegen and test-compile-android-link (an exe and a .so linked for x86_64 with the libraries just built). The step fails if the link test reports itself skipped, so missing libraries can't pass silently.

  5. Packaging: the Windows zip gets, per ABI:

    • android/<abi>/defaultlib/... → --default-lib-path=android/<abi>
    • android/<abi>/lib/libgc.a, android/<abi>/lib/libTypeScriptAsyncRuntime.a → --gc-lib-path / --tslang-lib-path

    The Android trees are moved out of the default library's __build, which is packaged whole, so they aren't shipped twice.

Verification

This workflow runs only on a v* tag, so it can't run in this PR. I verified the new steps locally with the same commands:

  • The Android scripts build both ABIs.
  • ctest -R test-compile-android-: both pass, and neither is skipped.
  • The staging script against copies of the trees gives the layout above, and nothing is left in the default library's __build.
  • tslang --emit=exe and --emit=dll link for arm64-v8a and x86_64 using only the staged package paths.

What I couldn't check locally:

  • the runner's NDK version (whichever is preinstalled; the scripts need r27+ for API 29 and were tested with r30);
  • whether choco install ninja succeeds on windows-2025-vs2026.

Both show up early in the job log; the NDK revision is printed.

Related: #518 turns parallel marking off for the Android collector (bdwgc/bdwgc#980). Whichever version of that script is on main at release time is what this builds.

🤖 Generated with Claude Code

…ntime

The Windows release job now also builds, with the runner's Android NDK
(ANDROID_NDK_LATEST_HOME) and the same scripts a developer runs:
- the collector and the async runtime for Android API 29, arm64-v8a and
  x86_64 (build_gc_release_android.bat, build_tslang_runtime_release_android.bat);
- the default library for both ABIs, release and debug, gc/rc/none
  (TypeScriptCompilerDefaultLib's scripts/build_android.bat);
then runs test-compile-android-codegen and -link against them (failing,
not skipping, if the libraries are missing), and packages them in the
zip as android/<abi>/defaultlib/... (--default-lib-path=android/<abi>) and
android/<abi>/lib/{libgc.a,libTypeScriptAsyncRuntime.a} (--gc-lib-path,
--tslang-lib-path).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit afde374 into main Oct 5, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the ci-android-defaultlib branch October 5, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant