Skip to content

Publish snapshots from Linux instead of a macOS runner - #140

Merged
jamesarich merged 1 commit into
mainfrom
ci/publish-snapshot-from-linux
Aug 28, 2026
Merged

jamesarich merged 1 commit into
mainfrom
ci/publish-snapshot-from-linux

Conversation

@jamesarich

@jamesarich jamesarich commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

publish-snapshot runs on macos-latest but only publishes Kotlin artifacts, and Kotlin/Native cross-compiles the Apple klibs from any host.

Verified, not assumed

Linux, Kotlin 2.4.10, no opt-in flag:

Check Result
publishToMavenLocal 14 artifacts — exactly what Maven Central holds for 0.9.1
iOS klibs 504K each (iosarm64, iosx64, iossimulatorarm64)

Nothing is lost

The Apple tests this job depends on already run on macOS in kotlin-native and swift, and the existing needs: [kotlin, kotlin-native, swift, python, typescript, csharp] makes them a hard precondition. So unlike the sibling PRs in kzstd and meshtastic-sdk, no CI guard is needed — needs: already is one.

This job fires on every push to main, so it is a far more frequent macOS consumer than the release workflow.

Also caches ~/.konan

This job never did. On a cold Linux runner the Kotlin/Native toolchain download would otherwise sit on the critical path.

Why release.yml is untouched

It is a single macOS job that also runs the Swift, Python, TypeScript and C# suites, and swift test needs macOS. Moving its Maven publish would mean either a second runner (no queue-time win, more complexity) or migrating the Swift gate to a CI check-run guard — a bigger change than this one, and better judged separately.

Part of a set: meshtastic/kzstd#68, meshtastic/meshtastic-sdk#114, meshtastic/MQTTastic-Client-KMP#135.

Summary by CodeRabbit

  • Chores
    • Improved snapshot publishing reliability by running it on a Linux environment.
    • Added caching for the Kotlin/Native toolchain to speed up repeated builds.
    • Apple-specific tests continue to run on macOS in the appropriate CI jobs.

publish-snapshot only publishes Kotlin artifacts, and Kotlin/Native
cross-compiles the Apple klibs from any host. Verified on 2.4.10: a Linux
publishToMavenLocal emits the same 14 artifacts Maven Central holds for 0.9.1,
with the iOS/tvOS/macOS klibs at their expected 504K.

Nothing is lost by the move. The Apple tests this job depends on already run on
macOS in kotlin-native and swift, and the existing `needs:` makes both a hard
precondition. This job runs on every push to main, so it is a far more frequent
macOS consumer than the release workflow.

Also cache ~/.konan here, which it never did — on a cold Linux runner the
Kotlin/Native toolchain download is now on the critical path.

release.yml keeps its macOS runner: it is a single job that also runs the Swift,
Python, TypeScript and C# suites, and swift test needs macOS.

Signed-off-by: James Rich <james.a.rich@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d0b50a9-84c6-4d82-b47a-06fa8bf0484d

📥 Commits

Reviewing files that changed from the base of the PR and between d9baa9c and 81bde31.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The publish-snapshot CI job now runs on Ubuntu instead of macOS. It also caches the Kotlin/Native ~/.konan directory using Kotlin and Gradle files as cache inputs.

Changes

Snapshot publishing CI

Layer / File(s) Summary
Update snapshot publishing job
.github/workflows/ci.yml
The job runs on ubuntu-latest. A Konan cache step caches ~/.konan using Kotlin version catalog and Gradle wrapper files.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 81bde

This localized CI change moves snapshot publishing to Linux and caches the Kotlin/Native toolchain without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Poem

A rabbit checks the workflow line
Ubuntu hops into the build
Konan rests in cached leaves
Apple klibs cross the sky
Snapshots spring forth, neat and quick

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving snapshot publishing from macOS runners to Linux runners.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jamesarich
jamesarich added this pull request to the merge queue Aug 28, 2026
Merged via the queue into main with commit 3e85d93 Aug 28, 2026
12 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.

1 participant