Dev => Staging #2491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mobile App iOS Build | |
| on: | |
| pull_request: | |
| paths: | |
| - "mobile/**" | |
| - ".github/workflows/mentraos-manager-ios-build.yml" | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "16.4" | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| cache: "pnpm" | |
| cache-dependency-path: mobile/package.json | |
| - name: Install dependencies | |
| working-directory: ./mobile | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Setup environment | |
| working-directory: ./mobile | |
| run: | | |
| # Create .env from example | |
| cp .env.example .env | |
| - name: Run Expo prebuild | |
| working-directory: ./mobile | |
| run: pnpm expo prebuild --platform ios | |
| - name: Setup Sherpa Onnx | |
| working-directory: ./mobile | |
| run: | | |
| chmod +x scripts/setup-sherpa-onnx-optional.sh | |
| ./scripts/setup-sherpa-onnx-optional.sh | |
| - name: Install CocoaPods dependencies | |
| working-directory: ./mobile/ios | |
| run: | | |
| # Remove Podfile.lock to avoid version conflicts in CI | |
| rm -f Podfile.lock | |
| pod install --repo-update | |
| - name: List available simulators | |
| run: xcrun simctl list devices available | |
| - name: Debug - List iOS directory contents | |
| working-directory: ./mobile/ios | |
| run: | | |
| echo "Contents of mobile/ios:" | |
| ls -la | |
| echo "Workspace files:" | |
| ls -la *.xcworkspace || echo "No workspace files found" | |
| - name: Build iOS app for Simulator | |
| working-directory: ./mobile/ios | |
| run: | | |
| xcodebuild \ | |
| -workspace MentraOS.xcworkspace \ | |
| -scheme MentraOS \ | |
| -configuration Debug \ | |
| -sdk iphonesimulator \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16 Pro' \ | |
| -derivedDataPath build | |
| - name: Build iOS app for Device | |
| working-directory: ./mobile/ios | |
| env: | |
| SENTRY_DISABLE_AUTO_UPLOAD: true | |
| run: | | |
| xcodebuild -workspace MentraOS.xcworkspace \ | |
| -scheme MentraOS \ | |
| -configuration Release \ | |
| -sdk iphoneos \ | |
| -derivedDataPath build-device \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Upload Simulator Build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-simulator-build | |
| path: mobile/ios/build/Build/Products/Debug-iphonesimulator/MentraOS.app | |
| - name: Upload Device Build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-device-build | |
| path: mobile/ios/build-device/Build/Products/Release-iphoneos/MentraOS.app |