-
Notifications
You must be signed in to change notification settings - Fork 17
79 lines (68 loc) · 2.11 KB
/
main.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
name: Main
on:
push:
branches: [ main, release/*]
pull_request:
jobs:
Build:
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
workspace: "Hyperspace.xcworkspace"
strategy:
fail-fast: false
matrix:
name: ["iOS", "tvOS", "watchOS", "macOS"]
include:
- name: "iOS"
scheme: "Hyperspace iOS"
destination: "platform=iOS Simulator,OS=16.0,name=iPhone 12 Pro"
test: true
- name: "tvOS"
scheme: "Hyperspace tvOS"
destination: "platform=tvOS Simulator,OS=16.0,name=Apple TV"
test: true
- name: "watchOS"
scheme: "Hyperspace watchOS"
destination: "platform=watchOS Simulator,OS=9.0,name=Apple Watch Series 6 (44mm)"
test: true
- name: "macOS"
scheme: "Hyperspace macOS"
destination: "arch=x86_64"
test: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: >
if [[ ${{ matrix.test }} == true ]]; then
xcodebuild test \
-workspace ${{ env.workspace }} \
-scheme "${{ matrix.scheme }}" \
-destination "${{ matrix.destination }}" \
ONLY_ACTIVE_ARCH=NO -enableCodeCoverage YES || exit 1
else
xcodebuild \
-workspace ${{ env.workspace }} \
-scheme "${{ matrix.scheme }}" \
-destination "${{ matrix.destination }}" \
ONLY_ACTIVE_ARCH=NO || exit 1
fi
Lint:
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
cocoapods: true
spm: true
steps:
- name: Checkout
uses: actions/checkout@v2
# Temporarily disabled watchOS linting using --platforms option
- name: Lint
run: >
if [[ ${{ env.spm }} == true ]]; then
swift package describe
fi
if [[ ${{ env.cocoapods }} == true ]]; then
pod lib lint --platforms=ios,macos,tvos
fi