From c92bba76db5e53c7e3b7728061abb8024e0b382b Mon Sep 17 00:00:00 2001 From: Q00 Date: Sat, 14 Nov 2026 17:04:53 +0900 Subject: [PATCH 1/5] ci: iOS builds on hosted macOS, Android builds on home-cluster runners - ios.yml: MeshKit package build+test and the three sample apps (unsigned, iOS Simulator) on GitHub-hosted macOS; iOS needs Xcode and MeshKit imports CryptoKit, so it cannot build on Linux - android.yml: meshkit-core on the Omarchy runner, the Android library on the Windows/WSL runner with the Android SDK; never on pull_request (public repo, self-hosted runners) Co-Authored-By: Claude Opus 5.5 --- .github/workflows/android.yml | 43 ++++++++++++++++++++++++++++++ .github/workflows/ios.yml | 49 +++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/android.yml create mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..2de03b5 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,43 @@ +# Android: built on JQ's home cluster (EDITH) self-hosted runners. +# +# jvm-core the pure-JVM trust layer (meshkit-core) on the Omarchy machine +# android the Android library (meshkit-transport-intent, compileSdk 36) on the Windows +# machine's WSL, which has the Android SDK (edith deploy/ci/setup-android-sdk.sh) +# +# Self-hosted runners run whatever a workflow says, and this repository is public, so these +# jobs never run for pull requests (a fork could change the workflow). Pushes need write +# access to this repository, so any branch pushed here may use them. +name: android +on: + push: + paths: ["meshkit-android/**", ".github/workflows/android.yml"] + workflow_dispatch: +permissions: + contents: read +concurrency: + group: android-${{ github.ref }} + cancel-in-progress: true +jobs: + jvm-core: + name: meshkit-core (JVM) + runs-on: [self-hosted, linux, omarchy] + timeout-minutes: 30 + defaults: + run: + working-directory: meshkit-android + steps: + - uses: actions/checkout@v4 + - run: java -version && gradle --version + - run: gradle --no-daemon :meshkit-core:test + + android: + name: meshkit-transport-intent (Android SDK) + runs-on: [self-hosted, linux, android] + timeout-minutes: 60 + defaults: + run: + working-directory: meshkit-android + steps: + - uses: actions/checkout@v4 + - run: test -n "$ANDROID_HOME" && gradle --version + - run: gradle --no-daemon build diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 0000000..39d5f60 --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,49 @@ +# iOS: the MeshKit Swift package and the three sample apps. +# +# iOS needs Xcode, which runs only on macOS (MeshKit also imports CryptoKit, which has no +# Linux build), so these jobs use GitHub-hosted macOS runners. They are free for public +# repositories and safe for pull requests. The Linux side of the cluster (omarchy runner) +# covers the pure-JVM trust layer in android.yml. +name: ios +on: + push: + branches: [main] + paths: ["meshkit-ios/**", ".github/workflows/ios.yml"] + pull_request: + paths: ["meshkit-ios/**", ".github/workflows/ios.yml"] + workflow_dispatch: +permissions: + contents: read +concurrency: + group: ios-${{ github.ref }} + cancel-in-progress: true +jobs: + package: + name: MeshKit package (build + test) + runs-on: macos-15 + timeout-minutes: 30 + defaults: + run: + working-directory: meshkit-ios + steps: + - uses: actions/checkout@v4 + - run: swift --version + - run: swift build + - run: swift test + + apps: + name: Sample apps (iOS Simulator, unsigned) + runs-on: macos-15 + timeout-minutes: 45 + strategy: + fail-fast: false + matrix: + scheme: [HermesChat, MintNotes, DailyMart] + steps: + - uses: actions/checkout@v4 + - name: Build ${{ matrix.scheme }} + working-directory: meshkit-ios/Samples/iOSDemo + run: | + xcodebuild -project MeshKitiOSDemo.xcodeproj -scheme "${{ matrix.scheme }}" \ + -destination 'generic/platform=iOS Simulator' -derivedDataPath "$RUNNER_TEMP/dd" \ + CODE_SIGNING_ALLOWED=NO build | tail -n 40 # bash -eo pipefail: a failed build fails the step From 2a9950aafb08bd09fd52ade7d63ca380144deb88 Mon Sep 17 00:00:00 2001 From: Q00 Date: Sat, 14 Nov 2026 17:06:17 +0900 Subject: [PATCH 2/5] ci: retrigger android on the fixed omarchy runner From 1d1773057ca33f32fc6d48a13321aee4296dc554 Mon Sep 17 00:00:00 2001 From: Q00 Date: Sat, 14 Nov 2026 17:06:46 +0900 Subject: [PATCH 3/5] ci(android): stack traces in gradle failures --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 2de03b5..4ce41f1 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: java -version && gradle --version - - run: gradle --no-daemon :meshkit-core:test + - run: gradle --no-daemon --stacktrace :meshkit-core:test android: name: meshkit-transport-intent (Android SDK) @@ -40,4 +40,4 @@ jobs: steps: - uses: actions/checkout@v4 - run: test -n "$ANDROID_HOME" && gradle --version - - run: gradle --no-daemon build + - run: gradle --no-daemon --stacktrace build From ada92b3021da3068cda14897f08a0b06b231e4f4 Mon Sep 17 00:00:00 2001 From: Q00 Date: Sat, 14 Nov 2026 22:17:06 +0900 Subject: [PATCH 4/5] build(android): declare AGP and kotlin-android at the root kotlin("jvm") is loaded by the root build, so kotlin("android") in meshkit-transport-intent resolved against a classloader without the Android Gradle Plugin and failed with BaseVariant missing. Declaring both plugins at the root with apply false puts them in one classloader. Only visible when an Android SDK is present (settings.gradle.kts includes the module only then). Co-Authored-By: Claude Opus 5.5 --- meshkit-android/build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshkit-android/build.gradle.kts b/meshkit-android/build.gradle.kts index b6ff246..3e18c2a 100644 --- a/meshkit-android/build.gradle.kts +++ b/meshkit-android/build.gradle.kts @@ -1,4 +1,10 @@ plugins { kotlin("jvm") version "2.2.20" apply false kotlin("plugin.serialization") version "2.2.20" apply false + // Declared here (not applied) so the Android Gradle Plugin and the Kotlin Android plugin + // load in the same classloader as the Kotlin plugin above; otherwise kotlin("android") + // in a subproject cannot see AGP's classes (NoClassDefFoundError: BaseVariant). + // Versions come from settings.gradle.kts pluginManagement. + id("com.android.library") apply false + kotlin("android") apply false } From 892623f4fc5ad3fd5eb2b50d826b866a451624f5 Mon Sep 17 00:00:00 2001 From: Q00 Date: Sat, 14 Nov 2026 22:18:40 +0900 Subject: [PATCH 5/5] build(android): enable AndroidX meshkit-transport-intent depends on androidx.activity; AGP refuses the release build without android.useAndroidX=true. Co-Authored-By: Claude Opus 5.5 --- meshkit-android/gradle.properties | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 meshkit-android/gradle.properties diff --git a/meshkit-android/gradle.properties b/meshkit-android/gradle.properties new file mode 100644 index 0000000..494c47a --- /dev/null +++ b/meshkit-android/gradle.properties @@ -0,0 +1,4 @@ +# The Android module (meshkit-transport-intent) depends on AndroidX (androidx.activity). +android.useAndroidX=true +org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 +kotlin.code.style=official