Add GitHub Actions CI workflow (#168)

* Add CI workflow

* Remove .travis.yml

* Update CI badge in README
This commit is contained in:
Mattt 2020-05-12 10:55:42 -07:00 committed by GitHub
parent de80b69526
commit 868274ce26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 26 deletions

54
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run SwiftLint Against Changes
uses: norio-nomura/action-swiftlint@3.1.0
env:
DIFF_BASE: ${{ github.base_ref }}
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@v1
- 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@v1
- name: Run Benchmark Target
run: xcodebuild test -workspace Surge.xcworkspace -scheme SurgeBenchmarkTests-macOS -destination platform='macOS'

View File

@ -1,24 +0,0 @@
language: swift
osx_image: xcode10.2
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
before_cache:
- brew cleanup
install:
- brew update
- brew outdated swiftlint || brew upgrade swiftlint
- gem install xcpretty
script:
- swiftlint --strict
- xcodebuild clean build test -workspace Surge.xcworkspace -scheme Surge-iOS -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.1' | xcpretty
- xcodebuild clean build test -workspace Surge.xcworkspace -scheme Surge-macOS -destination 'platform=OS X,arch=x86_64' | xcpretty
- xcodebuild clean build test -workspace Surge.xcworkspace -scheme Surge-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K,OS=11.1' | xcpretty
- xcodebuild clean build -workspace Surge.xcworkspace -scheme Surge-watchOS -destination 'platform=watchOS Simulator,name=Apple Watch Series 3 - 42mm,OS=4.1' | xcpretty
- xcodebuild clean build -workspace Surge.xcworkspace -scheme SurgeBenchmarkTests-macOS -destination 'platform=OS X,arch=x86_64' | xcpretty

View File

@ -806,8 +806,8 @@ Fast fourier transform functions & operators
</details>
[build status]: https://travis-ci.org/Jounce/Surge
[build status badge]: https://api.travis-ci.com/Jounce/Surge.svg?branch=master
[build status]: https://github.com/Jounce/Surge/actions?query=workflow%3ACI
[build status badge]: https://github.com/Jounce/Surge/workflows/CI/badge.svg
[license]: https://opensource.org/licenses/MIT
[license badge]: https://img.shields.io/cocoapods/l/Surge.svg
[cocoapods platforms badge]: https://img.shields.io/cocoapods/p/Surge.svg