feat(ci): restore iOS build on self-hosted macOS runner
CI / Lint (pull_request) Successful in 2m50s
CI / Test (pull_request) Successful in 2m46s
CI / Build Android (pull_request) Successful in 11m42s
CI / Build iOS (pull_request) Canceled after 0s

This commit is contained in:
robot committed 2026-08-04 00:03:34 +00:00
1 parent a7273dce2b
commit d5f52ad3c4
1 file changed
+42 -7
+42 -7
View File
@@ -212,15 +212,50 @@ jobs:
name: Build iOS
runs-on: [self-hosted, macos]
needs: [lint, test]
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check iOS build feasibility
- name: Setup Java 17
run: |
OS=$(uname -s)
echo "INFO: iOS builds require macOS host with Xcode."
echo "Detected OS: $OS"
echo "Skipping iOS build - it will succeed as a no-op."
echo "To enable iOS builds, configure a native macOS runner with Xcode."
set -e
brew install openjdk@17 || true
export JAVA_HOME="/usr/local/opt/openjdk@17"
export PATH="$JAVA_HOME/bin:$PATH"
java -version
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
- name: Install dependencies
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter pub get
- name: Generate stubs (lint gate support)
run: |
export PATH="$PWD/flutter/bin:$PATH"
python3 ci_stub_gen.py
- name: Run whitelabel build script
if: hashFiles('theme.json') != ''
run: |
export PATH="$PWD/flutter/bin:$PATH"
python3 build_whitelabel.py
- name: Build iOS (release, no-codesign)
run: |
export JAVA_HOME="/usr/local/opt/openjdk@17"
export PATH="$PWD/flutter/bin:$PATH"
flutter build ios --release --no-codesign
- name: List build outputs
run: |
echo "=== iOS build output ==="
ls -lh build/ios/iphoneos/ || true