-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (70 loc) · 2.59 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: STDevRxExt
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
MacOS:
name: macOS
runs-on: macos-10.15
env:
PROJECT: STDevRxExt.xcodeproj
SCHEME: STDevRxExt-Package
DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- name: Bundle Install
run: bundle install
- name: CocoaPods
run: |
gem install cocoapods
pod install --project-directory=Example --repo-update
- name: Restore SPM Cache
uses: actions/cache@v1
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build and test (SPM)
run: |
swift build
swift test
- name: Generate Xcodeproj
run: |
swift package generate-xcodeproj --enable-code-coverage
- name: Test iOS
run: |
xcodebuild clean build test -project $PROJECT -scheme $SCHEME -destination "$DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-ios.json" xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF ios -J 'STDevRxExt'
env:
DESTINATION: platform=iOS Simulator,name=iPhone 11
- name: Test MacOS
run: |
xcodebuild clean build test -project $PROJECT -scheme $SCHEME -destination "$DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-macos.json" xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF macos -J 'STDevRxExt'
env:
DESTINATION: platform=OS X
- name: Test TVOS
run: |
xcodebuild clean build test -project $PROJECT -scheme $SCHEME -destination "$DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-tvos.json" xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF tvos -J 'STDevRxExt'
env:
DESTINATION: platform=tvOS Simulator,name=Apple TV 4K (at 1080p)
- name: Build WatchOS
run: xcodebuild clean build -project $PROJECT -scheme $SCHEME -destination "$DESTINATION"
env:
DESTINATION: name=Apple Watch Series 5 - 40mm
CocoaPods:
name: CocoaPods
runs-on: macos-10.15
strategy:
matrix:
platform: ['ios', 'macos', 'tvos', 'watchos']
env:
DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: CocoaPods ${{ matrix.platform }}
run: pod lib lint --skip-tests --allow-warnings --verbose --platforms=${{ matrix.platform }}