7
7
branches : [ main ]
8
8
9
9
jobs :
10
+ cancel_previous :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+
14
+ with :
15
+ workflow_id : ${{ github.event.workflow.id }}
16
+
10
17
build_and_test_spm_mac :
18
+ needs : cancel_previous
11
19
runs-on : macos-11
12
20
steps :
13
21
- uses : maxim-lobanov/setup-xcode@v1
25
33
run : swift test
26
34
27
35
build_and_test_spm_linux :
36
+ needs : cancel_previous
28
37
runs-on : ubuntu-latest
29
38
steps :
30
39
- uses : fwal/setup-swift@v1
42
51
run : swift test --enable-test-discovery
43
52
44
53
build_and_test_ios :
54
+ needs : cancel_previous
45
55
runs-on : macos-11
46
56
steps :
47
57
- uses : maxim-lobanov/setup-xcode@v1
@@ -50,12 +60,20 @@ jobs:
50
60
- uses : actions/checkout@v2
51
61
with :
52
62
ref : ${{ github.event.pull_request.head.sha }}
63
+ - uses : actions/cache@v2
64
+ with :
65
+ path : /Users/runner/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts
66
+ key : ${{ runner.os }}-spm-ios-${{ hashFiles('**/Package.resolved') }}
67
+ restore-keys : |
68
+ ${{ runner.os }}-spm-ios
53
69
-
uses :
webfactory/[email protected]
54
70
with :
55
71
ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
56
72
- run : xcodebuild -scheme Segment-Package test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11'
57
73
74
+
58
75
build_and_test_tvos :
76
+ needs : cancel_previous
59
77
runs-on : macos-11
60
78
steps :
61
79
- uses : maxim-lobanov/setup-xcode@v1
@@ -64,12 +82,19 @@ jobs:
64
82
- uses : actions/checkout@v2
65
83
with :
66
84
ref : ${{ github.event.pull_request.head.sha }}
85
+ - uses : actions/cache@v2
86
+ with :
87
+ path : /Users/runner/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts
88
+ key : ${{ runner.os }}-spm-tvos-${{ hashFiles('**/Package.resolved') }}
89
+ restore-keys : |
90
+ ${{ runner.os }}-spm-tvos
67
91
-
uses :
webfactory/[email protected]
68
92
with :
69
93
ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
70
94
- run : xcodebuild -scheme Segment-Package test -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV'
71
95
72
96
build_and_test_watchos :
97
+ needs : cancel_previous
73
98
runs-on : macos-11
74
99
steps :
75
100
- uses : maxim-lobanov/setup-xcode@v1
@@ -78,12 +103,19 @@ jobs:
78
103
- uses : actions/checkout@v2
79
104
with :
80
105
ref : ${{ github.event.pull_request.head.sha }}
106
+ - uses : actions/cache@v2
107
+ with :
108
+ path : /Users/runner/Library/Developer/Xcode/DerivedData/**/SourcePackages/checkouts
109
+ key : ${{ runner.os }}-spm-watchos-${{ hashFiles('**/Package.resolved') }}
110
+ restore-keys : |
111
+ ${{ runner.os }}-spm-watchos
81
112
-
uses :
webfactory/[email protected]
82
113
with :
83
114
ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
84
115
- run : xcodebuild -scheme Segment-Package test -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 5 - 40mm'
85
116
86
- build_examples :
117
+ build_and_test_examples :
118
+ needs : cancel_previous
87
119
runs-on : macos-11
88
120
steps :
89
121
- uses : maxim-lobanov/setup-xcode@v1
@@ -92,17 +124,19 @@ jobs:
92
124
- uses : actions/checkout@v2
93
125
with :
94
126
ref : ${{ github.event.pull_request.head.sha }}
127
+ - uses : actions/cache@v2
128
+ with :
129
+ path : /Users/runner/Library/Developer/Xcode/DerivedData
130
+ key : ${{ runner.os }}-spm-examples-${{ hashFiles('**/Package.resolved') }}
131
+ restore-keys : |
132
+ ${{ runner.os }}-spm-examples
95
133
-
uses :
webfactory/[email protected]
96
134
with :
97
135
ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
98
136
- name : build for ios simulator
99
137
run : |
100
138
cd Examples/apps/BasicExample
101
139
xcodebuild -workspace "BasicExample.xcworkspace" -scheme "BasicExample" -sdk iphonesimulator
102
- - name : build for ios simulator
103
- run : |
104
- cd Examples/apps/DestinationsExample
105
- xcodebuild -workspace "DestinationsExample.xcworkspace" -scheme "DestinationsExample" -sdk iphonesimulator
106
140
- name : build for ios simulator
107
141
run : |
108
142
cd Examples/apps/ObjCExample
@@ -115,3 +149,28 @@ jobs:
115
149
run : |
116
150
cd Examples/apps/SegmentUIKitExample
117
151
xcodebuild -workspace "SegmentUIKitExample.xcworkspace" -scheme "SegmentUIKitExample" -destination 'platform=macOS,variant=Mac Catalyst'
152
+
153
+
154
+ build_and_test_dest_examples :
155
+ needs : cancel_previous
156
+ runs-on : macos-11
157
+ steps :
158
+ - uses : maxim-lobanov/setup-xcode@v1
159
+ with :
160
+ xcode-version : ' 13.0'
161
+ - uses : actions/checkout@v2
162
+ with :
163
+ ref : ${{ github.event.pull_request.head.sha }}
164
+ - uses : actions/cache@v2
165
+ with :
166
+ path : /Users/runner/Library/Developer/Xcode/DerivedData
167
+ key : ${{ runner.os }}-spm-dest-example-${{ hashFiles('**/Package.resolved') }}
168
+ restore-keys : |
169
+ ${{ runner.os }}-spm-dest-example
170
+ -
uses :
webfactory/[email protected]
171
+ with :
172
+ ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
173
+ - name : build for ios simulator
174
+ run : |
175
+ cd Examples/apps/DestinationsExample
176
+ xcodebuild -workspace "DestinationsExample.xcworkspace" -scheme "DestinationsExample" -sdk iphonesimulator
0 commit comments