Migrate SwiftGit2 project to Swift Package Manager #11
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build-macos: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
xcode: [ Xcode_16 ] | |
os: [ macos-14, macos-15 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set Xcode Version | |
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
- name: Build and test on macOS | |
run: | | |
xcodebuild -scheme SwiftGit2 -destination "platform=macOS" build test | |
build-ios: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
xcode: [ Xcode_16 ] | |
os: [ macos-15-xlarge ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set Xcode Version | |
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
- name: Build and test on iOS | |
run: | | |
PLATFORM="iOS Simulator" | |
# 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 -scheme SwiftGit2 -destination "platform=$PLATFORM,name=$DEVICE" build test |