Update ios.yml #12
This file contains 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 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
name: Build and Test default scheme using any available iPhone simulator | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Select Xcode Version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.0' | |
- name: Get Xcode Version | |
run: sudo xcode-select -p | |
- name: Get Swift Version | |
run: swift --version | |
- name: Disable SPM Plugin Validation | |
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES | |
- name: Build | |
env: | |
platform: ${{ 'iOS Simulator' }} | |
run: | | |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` | |
xcodebuild build -scheme "Example" -project Example/Example.xcodeproj -destination "platform=$platform,name=$device" |