Skip to content

feat: add kmp_build_mode input to ios-kmp-selfhosted-test - #114

Draft
ssestak wants to merge 1 commit into
mainfrom
feature/ios-kmp-test-build-mode
Draft

feat: add kmp_build_mode input to ios-kmp-selfhosted-test#114
ssestak wants to merge 1 commit into
mainfrom
feature/ios-kmp-test-build-mode

Conversation

@ssestak

@ssestak ssestak commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Motivation

KMP projects generated from the template default to building all XCFramework slices (iosArm64 + iosSimulatorArm64) — shared/app/build.gradle.kts falls back to "all" when -PkmpBuildMode is not passed, and this workflow never sets KMP_BUILD_MODE, so the KMP Makefile never forwards it.

The Fastlane Test step that follows only ever runs simulator tests, so the iosArm64 device slice is compiled and linked on every PR run and then never used. On tetadrogerie-kmp the Build KMP Package step takes ~3 min per PR; roughly half of that is the unused device slice (Kotlin/Native link time scales with the number of slices).

Change

New optional kmp_build_mode string input, exported as KMP_BUILD_MODE on the Build KMP Package step. Callers whose PR checks only run simulator tests can pass:

  check-ios:
    uses: futuredapp/.github/.github/workflows/ios-kmp-selfhosted-test.yml@<next-tag>
    with:
      kmp_swift_package_integration: true
      kmp_build_mode: simulator

Backwards compatibility

  • Default is '' → the env var is empty → GNU make's ifdef KMP_BUILD_MODE treats an empty variable as undefined → -PkmpBuildMode is not passed → existing behavior (all) is unchanged for every current caller.
  • Projects whose Makefile has no KMP_BUILD_MODE handling simply ignore the env var.

🤖 Generated with Claude Code

https://claude.ai/code/session_019xxj9PVQVi9z8nB6rGHbEg

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