Files
shoes/.github/workflows/mobile.yml
cfal abf24533a9 remove unused mobile SDK wrappers (#207)
* build: remove distributable mobile SDK wrappers

Remove the Android Kotlin/Gradle wrapper, AAR and XCFramework packaging, and mobile SDK release publishing.

Preserve Rust JNI/C embedding and native cross-compilation CI, with checks for library outputs and the generated C header. Document app-owned integration and retain desktop release-notice verification.

* ci: verify mobile header after locked native builds

cbindgen resolves Cargo metadata without --locked and can update Cargo.lock. Run it after the native builds so it cannot hide a stale lockfile from their checks.

* docs: remove obsolete mobile wrapper examples

Remove examples referencing nonexistent JNI wrapper methods and clarify the app-owned callback contract. Keep native mobile support unchanged.

* docs: clarify native mobile CI coverage
2026-10-22 03:08:57 -04:00

89 lines
2.4 KiB
YAML

name: Check Mobile Builds
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
ios:
name: Build iOS native libraries
runs-on: macos-latest
env:
IPHONEOS_DEPLOYMENT_TARGET: '16.0'
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-ios,aarch64-apple-ios-sim
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
key: ios
- name: Build native libraries
run: |
cargo build --release --lib --locked --target aarch64-apple-ios
cargo build --release --lib --locked --target aarch64-apple-ios-sim
test -s target/aarch64-apple-ios/release/libshoes.a
test -s target/aarch64-apple-ios-sim/release/libshoes.a
android:
name: Build Android native libraries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi
- name: Install cbindgen
uses: taiki-e/install-action@v2
with:
tool: cbindgen@0.29.4
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
key: android
- name: Cache cargo-ndk binary
uses: actions/cache@v6
with:
path: ~/.cargo/bin/cargo-ndk
key: cargo-ndk-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-ndk-${{ runner.os }}-
- name: Install cargo-ndk
run: command -v cargo-ndk || cargo install cargo-ndk
- name: Set NDK path
run: echo "ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME" >> "$GITHUB_ENV"
- name: Build JNI native libraries
run: |
cargo ndk \
-t arm64-v8a \
-t armeabi-v7a \
-P 21 \
-- build --release --lib --locked
test -s target/aarch64-linux-android/release/libshoes.so
test -s target/armv7-linux-androideabi/release/libshoes.so
# cbindgen can update Cargo.lock, so the locked builds must run first.
- name: Verify C header
run: cbindgen --verify --config cbindgen.toml --output include/shoes.h