Surge/.github/workflows/ci.yml

54 lines
1.5 KiB
YAML
Raw Normal View History

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run SwiftLint
run: |
swiftlint lint --strict --reporter github-actions-logging
test:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- scheme: Surge-macOS
destination: platform=macOS
- scheme: Surge-iOS
destination: platform=iOS Simulator,name=iPhone 11
- scheme: Surge-tvOS
destination: platform=tvOS Simulator,name=Apple TV 4K
- scheme: Surge-watchOS
destination: platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: xcodebuild build -workspace Surge.xcworkspace -scheme '${{ matrix.scheme }}' -destination '${{ matrix.destination }}'
- name: Test
run: xcodebuild test -workspace Surge.xcworkspace -scheme '${{ matrix.scheme }}' -destination '${{ matrix.destination }}'
if: matrix.scheme != 'Surge-watchOS'
benchmark:
needs: test
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Benchmark Target
run: xcodebuild test -workspace Surge.xcworkspace -scheme SurgeBenchmarkTests-macOS -destination platform='macOS'