Merge pull request #59 from tdeleon/26-add-support-for-visionos #290
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 & Test | |
on: [push] | |
jobs: | |
build-xcode: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-14] | |
destination: ["iOS Simulator", "macOS", "tvOS Simulator", "watchOS Simulator", "visionOS Simulator"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Select Xcode | |
run: sudo xcode-select -s /Applications/Xcode_15.2.app | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test | |
run: xcodebuild -scheme Relax-Package -destination 'platform= ${{ matrix.destination }}' test | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, ubuntu-latest, windows-latest] | |
swift: ["5.7", "5.8", "5.9"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- if: ${{ (runner.os != 'Windows') || (runner.os == 'Windows' && matrix.swift != '5.7') }} | |
name: Setup Swift Version | |
uses: SwiftyLab/setup-swift@latest | |
with: | |
swift-version: ${{ matrix.swift }} | |
- if: ${{ (runner.os == 'Windows') && (matrix.swift == '5.7') }} | |
name: Setup Swift Version (5.7 on Windows) | |
uses: compnerd/gha-setup-swift@main | |
with: | |
branch: swift-5.7-release | |
tag: 5.7-RELEASE | |
- name: Get Swift Version | |
run: swift --version | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: swift build | |
- name: Test | |
run: swift test | |