name: iOS CI/CD on: push: branches: [main, develop] pull_request: branches: [main] jobs: build-and-test: name: Build & Test runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Select Xcode run: sudo xcode-select -s /Applications/Xcode.app - name: Build Rust xcframework (arm64 sim) working-directory: ../zhixi-document-runtime run: | rustup target add aarch64-apple-ios-sim cargo build --release -p zx_document_ffi --target aarch64-apple-ios-sim - name: Build for iOS Simulator run: | xcodebuild build \ -project AIStudyApp/AIStudyApp.xcodeproj \ -scheme AIStudyApp \ -destination 'platform=iOS Simulator,name=iPhone 16' \ CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO - name: Run Tests run: | xcodebuild test \ -project AIStudyApp/AIStudyApp.xcodeproj \ -scheme AIStudyApp \ -destination 'platform=iOS Simulator,name=iPhone 16' \ CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \ 2>&1 | tee xcode-test.log - name: Upload test log if: always() uses: actions/upload-artifact@v4 with: name: xcode-test-log path: xcode-test.log