Screen-Based features #2619
Workflow file for this run
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: iOS CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "*" ] | |
| concurrency: | |
| group: ios-build-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DERIVED_DATA_PATH: .build/DerivedData | |
| PLATFORM: "iOS Simulator" | |
| jobs: | |
| test-and-build: | |
| name: SwiftPM & App Build | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| job: [ "swiftpm", "ios-app" ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/[email protected] | |
| with: | |
| xcode-version: 26.0.1 | |
| - name: Clean DerivedData, ModuleCache and SwiftLint caches | |
| run: | | |
| rm -rf ${{ github.workspace }}/${{ env.DERIVED_DATA_PATH }} | |
| rm -rf ${{ github.workspace }}/${{ env.DERIVED_DATA_PATH }}/ModuleCache.noindex | |
| rm -rf ${{ github.workspace }}/.build/DerivedData/SourcePackages/artifacts/swiftlintplugins/ | |
| mkdir -p ${{ github.workspace }}/${{ env.DERIVED_DATA_PATH }} | |
| - name: Cache Derived Data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.DERIVED_DATA_PATH }} | |
| key: derived-${{ matrix.job }}-${{ github.ref }} | |
| restore-keys: | | |
| derived-${{ matrix.job }}- | |
| - name: Select iPhone Simulator | |
| if: matrix.job == 'ios-app' | |
| id: sim | |
| run: | | |
| # Get the list of simulators, filter for iPhone devices, and sort by iOS version numerically | |
| device=$(xcrun simctl list devices | grep -i "iPhone" | sed -E 's/([A-Za-z0-9 ]+) \([A-F0-9-]+\) \((.*)\)/\1|\2/' | sort -t '|' -k2,2V | tail -n 1 | cut -d '|' -f 1 | xargs) | |
| echo "device=$device" >> $GITHUB_OUTPUT | |
| echo "Using simulator: $device" | |
| - name: Build and Test (SwiftPM) | |
| if: matrix.job == 'swiftpm' | |
| run: | | |
| WORKSPACE="Modules/" | |
| SCHEME="WildWestOnline-Package" | |
| echo "Running tests for scheme: $SCHEME" | |
| xcodebuild \ | |
| -workspace "$WORKSPACE" \ | |
| -scheme "$SCHEME" \ | |
| -destination "platform=macOS" \ | |
| -derivedDataPath "${{ env.DERIVED_DATA_PATH }}" \ | |
| -skipPackagePluginValidation \ | |
| -enableCodeCoverage YES \ | |
| build-for-testing test-without-building | |
| - name: Build App (Xcode) | |
| if: matrix.job == 'ios-app' | |
| env: | |
| DEVICE: ${{ steps.sim.outputs.device }} | |
| run: | | |
| PROJECT="App/WildWestOnline.xcodeproj" | |
| SCHEME="WildWestOnline" | |
| echo "Building app scheme: $SCHEME" | |
| xcodebuild \ | |
| -project "$PROJECT" \ | |
| -scheme "$SCHEME" \ | |
| -destination "platform=${{ env.PLATFORM }},name=$DEVICE" \ | |
| -derivedDataPath "${{ env.DERIVED_DATA_PATH }}" \ | |
| -skipPackagePluginValidation \ | |
| build |