-
Notifications
You must be signed in to change notification settings - Fork 4.8k
195 lines (187 loc) · 5.48 KB
/
mobile-ios_build.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: Mobile/iOS build
permissions:
contents: read
on:
workflow_run:
workflows:
- Request
types:
- completed
jobs:
load:
secrets:
app-key: ${{ secrets.ENVOY_CI_APP_KEY }}
app-id: ${{ secrets.ENVOY_CI_APP_ID }}
lock-app-key: ${{ secrets.ENVOY_CI_MUTEX_APP_KEY }}
lock-app-id: ${{ secrets.ENVOY_CI_MUTEX_APP_ID }}
permissions:
actions: read
contents: read
packages: read
pull-requests: read
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/_load.yml
with:
cache-docker: false
check-name: mobile-ios
build:
permissions:
contents: read
packages: read
uses: ./.github/workflows/_run.yml
if: ${{ fromJSON(needs.load.outputs.request).run.mobile-ios }}
needs: load
name: ios-build
with:
args: ${{ matrix.args }}
command: ./bazelw
container-command:
docker-ipv6: false
request: ${{ needs.load.outputs.request }}
runs-on: macos-12-large
source: |
source ./ci/mac_ci_setup.sh
./bazelw shutdown
steps-post: ${{ matrix.steps-post }}
target: ${{ matrix.target }}
timeout-minutes: ${{ matrix.timeout-minutes }}
trusted: ${{ fromJSON(needs.load.outputs.trusted) }}
working-directory: mobile
strategy:
fail-fast: false
matrix:
include:
- name: Build Envoy.framework distributable
args: >-
build
--config=mobile-remote-ci-macos-ios
//library/swift:ios_framework
target: ios
timeout-minutes: 120
hello-world:
permissions:
contents: read
packages: read
uses: ./.github/workflows/_run.yml
if: ${{ fromJSON(needs.load.outputs.request).run.mobile-ios }}
needs:
- load
- build
name: ios-hello-world
with:
args: >-
build
${{ matrix.args || '--config=mobile-remote-ci-macos-ios' }}
${{ matrix.app }}
command: ./bazelw
container-command:
docker-ipv6: false
request: ${{ needs.load.outputs.request }}
runs-on: macos-12-large
source: |
source ./ci/mac_ci_setup.sh
./bazelw shutdown
steps-post: |
- uses: envoyproxy/toolshed/gh-actions/envoy/ios/[email protected]
with:
app: ${{ matrix.app }}
args: ${{ matrix.args || '--config=mobile-remote-ci-macos-ios' }}
expected: received headers with status ${{ matrix.expected-status }}
env:
ANDROID_NDK_HOME:
ANDROID_HOME:
target: ${{ matrix.target }}
timeout-minutes: ${{ matrix.timeout-minutes }}
trusted: ${{ fromJSON(needs.load.outputs.trusted) }}
working-directory: mobile
strategy:
fail-fast: false
matrix:
include:
- name: Build swift hello world
app: //examples/swift/hello_world:app
expected-status: 200
target: swift-hello-world
timeout-minutes: 90
apps:
permissions:
contents: read
packages: read
uses: ./.github/workflows/_run.yml
if: ${{ fromJSON(needs.load.outputs.request).run.mobile-ios-all }}
needs:
- load
- build
name: ios-apps
with:
args: >-
build
${{ matrix.args || '--config=mobile-remote-ci-macos-ios' }}
${{ matrix.app }}
command: ./bazelw
container-command:
docker-ipv6: false
request: ${{ needs.load.outputs.request }}
runs-on: macos-12-large
source: |
source ./ci/mac_ci_setup.sh
steps-post: |
- uses: envoyproxy/toolshed/gh-actions/envoy/ios/[email protected]
with:
app: ${{ matrix.app }}
args: ${{ matrix.args || '--config=mobile-remote-ci-macos-ios' }}
expected: >-
${{ matrix.expected
|| format('received headers with status {0}', matrix.expected-status) }}
timeout: ${{ matrix.timeout || '5m' }}
env:
ANDROID_NDK_HOME:
ANDROID_HOME:
target: ${{ matrix.target }}
timeout-minutes: 90
trusted: ${{ fromJSON(needs.load.outputs.trusted) }}
working-directory: mobile
strategy:
fail-fast: false
matrix:
include:
- name: Build swift baseline app
app: //test/swift/apps/baseline:app
expected-status: 301
target: swift-baseline-app
- name: Build swift experimental app
args: >-
--config=mobile-remote-ci-macos-ios
app: //test/swift/apps/experimental:app
expected-status: 200
target: swift-experimental-app
- name: Build swift async await
app: //examples/swift/async_await:app
expected: >-
Uploaded 7 MB of data
target: swift-async-await
timeout: 10m
- name: Build objc hello world
app: //examples/objective-c/hello_world:app
expected-status: 301
target: objc-hello-world
request:
secrets:
app-id: ${{ secrets.ENVOY_CI_APP_ID }}
app-key: ${{ secrets.ENVOY_CI_APP_KEY }}
permissions:
actions: read
contents: read
pull-requests: read
if: >-
${{ always()
&& github.event.workflow_run.conclusion == 'success'
&& fromJSON(needs.load.outputs.request).run.mobile-ios }}
needs:
- load
- build
- hello-world
- apps
uses: ./.github/workflows/_finish.yml
with:
needs: ${{ toJSON(needs) }}