Test with Xcode16.2 #711
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: Testing Matrix | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
TESTS: "FunctionTests SDKTests RoomTests PublishDataTests PublishBufferCapturerTests VideoViewTests TrackTests" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md | |
- os: macos-13 | |
xcode: 14.2 | |
platform: "iOS Simulator,OS=17.2,name=iPhone 14 Pro" | |
- os: macos-13 | |
xcode: 14.2 | |
platform: "macOS" | |
- os: macos-13 | |
xcode: 14.2 | |
platform: "macOS,variant=Mac Catalyst" | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md | |
- os: macos-14 | |
xcode: 15.4 | |
platform: "iOS Simulator,OS=17.5,name=iPhone 15 Pro" | |
- os: macos-14 | |
xcode: 15.4 | |
platform: "macOS" | |
- os: macos-14 | |
xcode: 15.4 | |
platform: "macOS,variant=Mac Catalyst" | |
- os: macos-14 | |
xcode: 15.4 | |
platform: "visionOS Simulator,name=Apple Vision Pro" | |
- os: macos-14 | |
xcode: 15.4 | |
platform: "tvOS Simulator,name=Apple TV" | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md | |
- os: macos-15 | |
xcode: 16.2 | |
platform: "iOS Simulator,OS=18.1,name=iPhone 16 Pro" | |
- os: macos-15 | |
xcode: 16.2 | |
platform: "macOS" | |
- os: macos-15 | |
xcode: 16.2 | |
platform: "macOS,variant=Mac Catalyst" | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
# Cache Homebrew and SPM dependencies | |
- name: Cache Homebrew | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/Library/Caches/Homebrew | |
~/Library/Caches/Homebrew/downloads | |
key: ${{ runner.os }}-${{ matrix.os }}-brew-${{ hashFiles('.github/workflows/testing-matrix.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.os }}-brew- | |
- name: Cache SPM | |
uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.xcode }}-spm-${{ hashFiles('Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.os }}-${{ matrix.xcode }}-spm- | |
- name: Install LiveKit Server | |
run: brew install livekit | |
- name: Install xcbeautify | |
run: brew install xcbeautify | |
- name: Run LiveKit Server | |
run: livekit-server --dev & | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.xcode }} | |
- name: Xcode Version | |
run: xcodebuild -version | |
- name: Swift Version | |
run: xcrun swift --version | |
- name: Build | |
run: xcodebuild build-for-testing -scheme LiveKit -destination 'platform=${{ matrix.platform }}' -parallel-testing-enabled YES | xcbeautify | |
# Run all tests in parallel instead of sequentially | |
- name: Run Tests | |
run: | | |
xcodebuild test-without-building \ | |
-scheme LiveKit \ | |
-destination 'platform=${{ matrix.platform }}' \ | |
-parallel-testing-enabled YES \ | |
-parallel-testing-worker-count 4 \ | |
$(echo "$TESTS" | xargs -n1 echo "-only-testing:LiveKitTests/") \ | |
| xcbeautify | |
shell: bash |