mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 21:44:38 +00:00
94 lines
3.1 KiB
YAML
94 lines
3.1 KiB
YAML
---
|
|
name: iOS Compile Sanity
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'app/src-tauri-mobile/**'
|
|
- 'packages/tauri-plugin-ptt/**'
|
|
- 'src/openhuman/devices/**'
|
|
- 'app/src/services/transport/**'
|
|
- 'app/src/lib/tunnel/**'
|
|
- 'app/src/pages/ios/**'
|
|
- '.github/workflows/ios-compile.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
ios-compile:
|
|
name: iOS Compile Check
|
|
runs-on: macos-latest
|
|
env:
|
|
# Pin the deployment target so swift-rs invokes the Swift compiler with
|
|
# `-target arm64-apple-ios16.0`. Matches Package.swift in
|
|
# packages/tauri-plugin-ptt/ios/, which uses iOS 14+ APIs (OSLog).
|
|
IPHONEOS_DEPLOYMENT_TARGET: '16.0'
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
# The mobile crate uses stock Tauri (no CEF), so we don't need
|
|
# `submodules: recursive` — which would try to clone the
|
|
# `app/src-tauri/vendor/tauri-cef` submodule, a step that
|
|
# intermittently fails on macOS runners for fork PRs.
|
|
submodules: false
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: '1.93.0'
|
|
targets: aarch64-apple-ios
|
|
|
|
- name: Cache Rust build artifacts
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: |
|
|
. -> target
|
|
app/src-tauri-mobile -> target
|
|
packages/tauri-plugin-ptt -> target
|
|
cache-on-failure: true
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: bash scripts/ci-cancel-aware.sh pnpm install --frozen-lockfile
|
|
|
|
# Hard gate: mobile Tauri host compiles for iOS. No more soft-gate
|
|
# `continue-on-error` — the mobile crate uses stock Tauri without CEF
|
|
# so cef-dll-sys is not in the dependency graph.
|
|
- name: cargo check -- mobile host (aarch64-apple-ios)
|
|
run: bash scripts/ci-cancel-aware.sh cargo check --manifest-path app/src-tauri-mobile/Cargo.toml --target aarch64-apple-ios
|
|
|
|
# Hard gate: PTT plugin (host-target check; Swift sources are built
|
|
# lazily by swift-rs during the iOS-target check above).
|
|
- name: cargo check -- tauri-plugin-ptt
|
|
run: bash scripts/ci-cancel-aware.sh cargo check --manifest-path packages/tauri-plugin-ptt/Cargo.toml
|
|
|
|
# Hard gate: TypeScript compile.
|
|
- name: pnpm compile
|
|
run: bash scripts/ci-cancel-aware.sh pnpm --dir app compile
|
|
|
|
# Hard gate: iOS-relevant Vitest suites.
|
|
- name: pnpm test (iOS suites)
|
|
run: >
|
|
bash scripts/ci-cancel-aware.sh pnpm --dir app test --
|
|
src/services/transport
|
|
src/lib/tunnel
|
|
src/pages/ios
|
|
src/components/settings/panels/devices
|