build #1267
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 | |
on: | |
push: | |
branches: [main, dev] | |
paths-ignore: | |
- 'Docs/**' # Docs folder in root of repo | |
- '**/*.md' # .md files anywhere in the repo | |
- '**/LICENSE' # LICENSE files anywhere in the repo | |
- '**/.gitignore' # .gitignore files anywhere in the repo | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- 'Docs/**' # Docs folder in root of repo | |
- '**/*.md' # .md files anywhere in the repo | |
- '**/LICENSE' # LICENSE files anywhere in the repo | |
- '**/.gitignore' # .gitignore files anywhere in the repo | |
workflow_dispatch: | |
schedule: | |
- cron: '40 11 * * *' # once a day @ 11:40am UTC (4:40am PST) | |
jobs: | |
macOS: | |
name: macOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@main | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default | |
- name: Build | |
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "generic/platform=macOS,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Unit Tests | |
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]} | |
macCatalyst: | |
name: macCatalyst | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@main | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default | |
- name: Build | |
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Unit Tests | |
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "platform=macOS,variant=Mac Catalyst" | xcpretty && exit ${PIPESTATUS[0]} | |
iOS: | |
name: iOS | |
runs-on: macos-latest # this must be macos, GitHub does not offer iOS directly but we can use xcodebuild | |
steps: | |
- uses: actions/checkout@main | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default | |
- name: Build | |
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device" | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Unit Tests | |
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "platform=iOS Simulator,name=iPhone 15" | xcpretty && exit ${PIPESTATUS[0]} | |
tvOS: | |
name: tvOS | |
runs-on: macos-latest # this must be macos, GitHub does not offer tvOS directly but we can use xcodebuild | |
steps: | |
- uses: actions/checkout@main | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default | |
- name: Build | |
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Unit Tests | |
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" | xcpretty && exit ${PIPESTATUS[0]} | |
watchOS: | |
name: watchOS | |
runs-on: macos-latest # this must be macos, GitHub does not offer watchOS directly but we can use xcodebuild | |
steps: | |
- uses: actions/checkout@main | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default | |
- name: Build | |
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "generic/platform=watchOS Simulator,name=Any watchOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Unit Tests | |
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "DAWFileKit-CI" -destination "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)" | xcpretty && exit ${PIPESTATUS[0]} | |
# xcodebuild test reference: | |
# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html |