ci: add PR build+test gate (JVM + iOS) — closes #22#25
Merged
Conversation
…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>
4 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
.github/workflows/build.yml— the missing PR-time build/test gate. Until now PRs ran no build or tests (onlyapi-checkand 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:
jvmubuntu-latest:sharingan+:sharingan-nooptestDebugUnitTest— compiles Android +commonMain/commonTestand runs them on the JVM. Cheap, fast feedback.iosmacos-latestassemble(cross-target build gate — compiles every target incl. the iOS frameworks) →iosSimulatorArm64Testfor both modules.assemblepulls 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.concurrency: cancel-in-progresscaps wasted macOS minutes on rapid pushes.actions/checkout@v6,actions/setup-java@v5, plusgradle/actions/setup-gradle@v4for caching.Acceptance criteria
pull_requestandpushtomainassembleon macOS compiles all)testDebugUnitTest)iosSimulatorArm64Test) — on every PRjvmjob; an iOS-only break fails theiosjobVerification
This workflow runs on this very PR (the
pull_requesttrigger), so its own check run is the live proof it works. Watching that run is the acceptance test.:sharinganpins the simulatordeviceId = "iPhone 17 Pro"(insharingan/build.gradle.kts) and:sharingan-nooppins none. If themacos-latestrunner'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 pinneddeviceId; folding it into this PR once CI tells us.🤖 Generated with Claude Code