Skip to content

ci: add PR build+test gate (JVM + iOS) — closes #22#25

Merged
mibrahimdev merged 2 commits into
mainfrom
ci/22-pr-build-test-gate
Jun 14, 2026
Merged

ci: add PR build+test gate (JVM + iOS) — closes #22#25
mibrahimdev merged 2 commits into
mainfrom
ci/22-pr-build-test-gate

Conversation

@mibrahimdev

Copy link
Copy Markdown
Owner

What

Adds .github/workflows/build.yml — the missing PR-time build/test gate. Until now PRs ran no build or tests (only api-check and the tag-triggered publish workflow), so the launch-hardening PRs had to be verified by hand locally. Closes #22.

Design

Two jobs, split by host cost/capability:

Job Runner Runs
jvm ubuntu-latest :sharingan + :sharingan-noop testDebugUnitTest — compiles Android + commonMain/commonTest and runs them on the JVM. Cheap, fast feedback.
ios macos-latest assemble (cross-target build gate — compiles every target incl. the iOS frameworks) → iosSimulatorArm64Test for both modules.
  • Why the split: Kotlin/Native iOS targets only link on macOS. assemble pulls in 179 iOS/native tasks (compileKotlinIosArm64, linkDebugFrameworkIosSimulatorArm64, …) — verified via ./gradlew assemble --dry-run — so it cannot run on ubuntu. The ubuntu job therefore runs only the JVM test task (verified iOS-free via dry-run), and the macOS job owns the full build.
  • iOS runs on every PR, not deferred — the library ships an iOS target, so an iOS-only regression must not slip through. concurrency: cancel-in-progress caps wasted macOS minutes on rapid pushes.
  • Matches existing repo conventions: JDK 17 temurin, actions/checkout@v6, actions/setup-java@v5, plus gradle/actions/setup-gradle@v4 for caching.

Acceptance criteria

  • Triggers on pull_request and push to main
  • Builds across targets (assemble on macOS compiles all)
  • Runs JVM unit tests (testDebugUnitTest)
  • Runs the iOS simulator test target (iosSimulatorArm64Test) — on every PR
  • A deliberately failing test is blocked: a broken common/JVM test fails the jvm job; an iOS-only break fails the ios job

Verification

This workflow runs on this very PR (the pull_request trigger), so its own check run is the live proof it works. Watching that run is the acceptance test.

⚠️ One risk to watch on the first run: :sharingan pins the simulator deviceId = "iPhone 17 Pro" (in sharingan/build.gradle.kts) and :sharingan-noop pins none. If the macos-latest runner's Xcode lacks that device, the iOS step fails fast (by design — no silent skip). If so, the fix is a tiny follow-up to the pinned deviceId; folding it into this PR once CI tells us.

🤖 Generated with Claude Code

…22)

After this commit every pull request (and push to main) builds all KMP
targets and runs the unit tests before it can merge. Until now PRs ran no
build or tests — only api-check and the tag-triggered publish workflow — so
regressions could merge unnoticed and the launch-hardening PRs had to be
verified by hand.

Two jobs:
- jvm (ubuntu): runs :sharingan/:sharingan-noop testDebugUnitTest, which
  compiles the Android + commonMain/commonTest sources and runs them on the
  JVM. Cheap, fast feedback. No iOS/Native tasks — those can't link on Linux.
- ios (macOS): runs `assemble` (the cross-target build gate that compiles
  every target incl. the iOS frameworks) then iosSimulatorArm64Test for both
  modules. iOS runs on every PR, not deferred.

concurrency cancels superseded runs to cap macOS minutes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The first CI run proved the structure works (jvm + api-check green) but the iOS
job failed: on the default macos-latest image (Xcode 16.4, iOS 18 SDK) the
Compose-UIKit runtime references iOS 26 symbols (UIViewLayoutRegion /
UIUtilities), so linkDebugFrameworkIosArm64 fails with "Undefined symbols for
architecture arm64". The project's CMP version requires the iOS 26 SDK, which
only ships with Xcode 26 — present on macos-26. (api-check stays on
macos-latest because it only compiles klibs and never links a framework.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mibrahimdev mibrahimdev merged commit 4b899ff into main Jun 14, 2026
3 checks passed
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.

Add PR build+test CI gate (JVM + iOS) — PRs currently run no tests

1 participant