Skip to content

Instantly share code, notes, and snippets.

View przemek-jablonski's full-sized avatar
🏠
Working from home

Przemek Jabłoński przemek-jablonski

🏠
Working from home
View GitHub Profile
strategy:
fail-fast: false
matrix:
xcode: ['13.0', '12.5.1', '12.0.1']
macos: ['macos-11', 'macos-10.15']
exclude:
# excluding xcodes not present on given macOS versions
- macos: 'macos-11'
xcode: '12.0.1'
- macos: 'macos-10.15'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: #this will enable manual triggering
- name: Double-check macOS version (${{ matrix.macos }})
run: sw_vers
- name: Double-check Xcode.app selected
run: xcode-select --print-path
- name: Check xcodebuild version
run: xcodebuild -version
- name: Check xcode embedded SDKs
run: xcodebuild -showsdks
- name: Show buildable schemes
run: xcodebuild -list
- uses: maxim-lobanov/[email protected]
with:
xcode-version: ${{ matrix.xcode }} # 'xcode-latest', '13.0', '12.0.1' etc.
- uses: mxcl/[email protected]
with:
platform: ${{ matrix.platform }}
action: 'test'
jobs:
build-and-test:
name: ${{ matrix.command }} on  ${{ matrix.platform }} (xcode ${{ matrix.xcode }}, ${{ matrix.macos }})
runs-on: ${{ matrix.macos }} #os switching
strategy:
fail-fast: false #if 'true' then one failed job cancels all jobs remaining
matrix:
xcode: ['13.0', '12.5.1', '12.0.1']
macos: ['macos-11', 'macos-10.15']
scheme: ['Earendil']
jobs:
build-and-test:
strategy:
matrix:
xcodebuild-scheme: ['Core', 'UI', 'PushNotifications']
xcodebuild-command: ['build', 'test']
steps:
- name: Using the xcodebuild to ${{ matrix.xcodebuild-command }} the ${{ matrix.xcodebuild-scheme }} scheme.
run: xcodebuild ${{ matrix.xcodebuild-command }} -scheme ${{ matrix.xcodebuild-scheme }}
let package = Package(
...
platforms: [
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
.macOS(.v10_15),
],
...
)
name: Multiplatform test x2
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 0 0 * * *
name: Multiplatform build and test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 0 0 * * *