Skip to content

Add support for visionOS #512

Add support for visionOS

Add support for visionOS #512

Workflow file for this run

name: Unit Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8
jobs:
swiftpm:
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^15.3
- uses: actions/checkout@v4
- name: Run SwiftPM Tests
run: swift test --enable-code-coverage --parallel
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
xcode:
runs-on: macos-14
strategy:
matrix:
scheme: [ Swift Tests ]
platform:
- macOS
- iOS
- iPadOS
- tvOS
- visionOS
skip-testing: ['']
include:
- scheme: iOS Tests
platform: iOS
skip-testing: 'iOS Tests/DDFileLoggerPerformanceTests'
- scheme: OS X Tests
platform: macOS
skip-testing: 'OS X Tests/DDFileLoggerPerformanceTests'
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^15.3
- name: Determine Xcode destination
id: xcode-destination
env:
PLATFORM: ${{ matrix.platform }}
run: |
DESTINATION=''
case "${PLATFORM}" in
'macOS') DESTINATION='platform=macOS';;
'iOS') DESTINATION='platform=iOS Simulator,OS=latest,name=iPhone 15 Pro';;
'iPadOS') DESTINATION='platform=iOS Simulator,OS=latest,name=iPad Pro (11-inch) (4th generation)';;
'tvOS') DESTINATION='platform=tvOS Simulator,OS=latest,name=Apple TV 4K (3rd generation)';;
'watchOS') DESTINATION='platform=watchOS Simulator,OS=latest,name=Apple Watch Series 9 (45mm)';;
'visionOS') DESTINATION='platform=visionOS Simulator,OS=latest,name=Apple Vision Pro';;
*) echo "::error title=Unknown platform!::Unknown platform: ${PLATFORM}" && exit 1;;
esac
echo "destination=${DESTINATION}" >> "${GITHUB_OUTPUT}"
- uses: actions/checkout@v4
- uses: sersoft-gmbh/xcodebuild-action@v3
with:
project: Tests/Tests.xcodeproj
scheme: ${{ matrix.scheme }}
destination: ${{ steps.xcode-destination.outputs.destination }}
skip-testing: ${{ matrix.skip-testing }}
enable-code-coverage: true
parallel-testing-enabled: true
build-settings: GCC_GENERATE_TEST_COVERAGE_FILES=YES
action: test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}