Fix package build on Xcode 26.4.1 (#310) #100
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: Build and run tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build & test SDKHostApp | |
| runs-on: macos-15 | |
| env: | |
| SCHEME: SDKHostApp | |
| PROJECT: IFTTT SDK.xcodeproj | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Toolchain versions | |
| run: | | |
| xcodebuild -version | |
| swift --version | |
| - name: Pick iPhone simulator | |
| id: sim | |
| run: | | |
| udid=$(xcrun simctl list devices available --json | python3 -c ' | |
| import json, sys | |
| data = json.load(sys.stdin) | |
| for runtime, devices in data["devices"].items(): | |
| if "iOS" not in runtime: | |
| continue | |
| for dev in devices: | |
| if dev["name"].startswith("iPhone") and dev.get("isAvailable", False): | |
| print(dev["udid"]) | |
| sys.exit(0) | |
| sys.exit("No available iPhone simulator found") | |
| ') | |
| echo "destination=platform=iOS Simulator,id=$udid" >> "$GITHUB_OUTPUT" | |
| echo "Using simulator $udid" | |
| - name: Build & test | |
| run: | | |
| set -o pipefail | |
| xcodebuild test \ | |
| -project "$PROJECT" \ | |
| -scheme "$SCHEME" \ | |
| -destination "${{ steps.sim.outputs.destination }}" \ | |
| | xcbeautify --renderer github-actions |