Update CI script for latest macOS and Xcode #32
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| name: iOS Simulator Tests | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Show Xcode and SDK versions | |
| run: | | |
| xcodebuild -version | |
| xcrun --show-sdk-version --sdk iphonesimulator | |
| - name: Select latest iPhone simulator | |
| id: simulator | |
| run: | | |
| DEVICE=$(xcrun simctl list devices available | \ | |
| grep -oE 'iPhone [0-9]+( Pro( Max)?)?' | \ | |
| sort -V | tail -n 1) | |
| if [ -z "$DEVICE" ]; then | |
| echo "No iPhone simulator found. Available devices:" | |
| xcrun simctl list devices available | |
| exit 1 | |
| fi | |
| echo "Selected simulator: $DEVICE" | |
| echo "device=$DEVICE" >> "$GITHUB_OUTPUT" | |
| - name: Run tests | |
| run: | | |
| set -o pipefail | |
| xcodebuild test \ | |
| -project TOFileSystemObserverExample.xcodeproj \ | |
| -scheme TOFileSystemObserverTests \ | |
| -destination "platform=iOS Simulator,name=${{ steps.simulator.outputs.device }},OS=latest" \ | |
| -resultBundlePath TestResults.xcresult \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: TestResults.xcresult |