Skip to content

Commit

Permalink
ci: initial build workflow set up
Browse files Browse the repository at this point in the history
  • Loading branch information
drewalth committed Sep 28, 2024
1 parent 246ed10 commit 7cc74a6
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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

0 comments on commit 7cc74a6

Please sign in to comment.