Surge/.github/workflows/ci.yml

64 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
paths:
- .github/workflows/ci.yml
- .swiftlint.yml
- "**/*.swift"
jobs:
lint:
runs-on: macos-latest
name: "Lint"
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:
- os: macOS
destination: platform=macOS
- os: iOS
destination: platform=iOS Simulator,name=iPhone 11
- os: tvOS
destination: platform=tvOS Simulator,name=Apple TV 4K
- os: watchOS
destination: platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm
name: "Test ${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: xcodebuild build -workspace Surge.xcworkspace -scheme 'Surge-${{ matrix.os }}' -destination '${{ matrix.destination }}'
- name: Test
run: xcodebuild test -workspace Surge.xcworkspace -scheme 'Surge-${{ matrix.os }}' -destination '${{ matrix.destination }}'
if: matrix.os != 'watchOS'
benchmark:
needs: test
runs-on: macos-latest
name: "Benchmark"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Benchmark Target
run: xcodebuild test -workspace Surge.xcworkspace -scheme SurgeBenchmarkTests-macOS -destination platform='macOS'