feat: Build for macOS and visionOS #86
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: '*' | |
merge_group: | |
branches: [ main ] | |
env: | |
CI_XCODE_LATEST: '/Applications/Xcode_15.4.app/Contents/Developer' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
timeout-minutes: 15 | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
destination: ['platform=iOS\ Simulator,name=iPhone\ 14\ Pro\ Max', 'platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 5\ \(40mm\)', 'platform=macOS CODE_SIGN_IDENTITY=""', 'platform=visionOS\ Simulator,OS=1.2,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY=""'] | |
action: ['test'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Swiftlint | |
run: brew install swiftlint | |
- name: Build-Test | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme CareKitEssentials -derivedDataPath DerivedData -destination ${{ matrix.destination }} ${{ matrix.action }} | xcpretty -c | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }} | |
- name: Prepare codecov | |
uses: sersoft-gmbh/swift-coverage-action@v4 | |
id: coverage-files | |
with: | |
format: lcov | |
search-paths: ./DerivedData | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}} | |
fail_ci_if_error: false | |
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }} | |