Build and Test #88
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: Build and Test | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
branches: | |
- main | |
- develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
iOS: | |
name: Build and test on iOS (Xcode ${{ matrix.xcode }}) | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- xcode: 16.1 | |
destination: iPhone 16 | |
os: 18.1 | |
- xcode: 16.1 | |
destination: iPhone 15 | |
os: 17.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Select Xcode version | |
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
- name: List Available Simulators | |
run: xcrun simctl list | |
- name: Build | |
run: | | |
set -o pipefail &&\ | |
xcodebuild build-for-testing\ | |
-scheme YouTubePlayerKit\ | |
-sdk iphonesimulator\ | |
-destination "platform=iOS Simulator,name=${{ matrix.destination }},OS=${{ matrix.os }}"\ | |
| xcbeautify --renderer github-actions | |
- name: Test | |
run: | | |
set -o pipefail &&\ | |
xcodebuild test-without-building\ | |
-scheme YouTubePlayerKit\ | |
-sdk iphonesimulator\ | |
-destination "platform=iOS Simulator,name=${{ matrix.destination }},OS=${{ matrix.os }}"\ | |
| xcbeautify --renderer github-actions | |
macOS: | |
name: Build and test on macOS (Xcode ${{ matrix.xcode }}) | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- xcode: 16.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Select Xcode version | |
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
- name: Build | |
run: swift build -v | |
- name: Test | |
run: swift test -v |