ci: initial build workflow set up #1
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
platform: [ios, macos, watchos, tvos] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Swift | |
uses: fwal/setup-swift@v1 | |
with: | |
swift-version: '5.9' | |
- name: Build for ${{ matrix.platform }} | |
run: | | |
case ${{ matrix.platform }} in | |
ios) | |
swift build --destination 'platform=iOS Simulator,OS=14.0,name=iPhone 11' | |
;; | |
macos) | |
swift build --destination 'platform=macOS,arch=x86_64' | |
;; | |
watchos) | |
swift build --destination 'platform=watchOS Simulator,OS=7.0,name=Apple Watch Series 5' | |
;; | |
tvos) | |
swift build --destination 'platform=tvOS Simulator,OS=14.0,name=Apple TV' | |
;; | |
esac |