-
Notifications
You must be signed in to change notification settings - Fork 140
382 lines (365 loc) · 10.3 KB
/
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
name: Build & Test
on:
pull_request:
branches:
- develop
- "feat*"
merge_group:
types: [checks_requested]
branches:
- develop
- "feat*"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
run-workflow:
name: PR Workflow
# If any dependent jobs fails, this WF skips which won't block merging PRs
# calling always() is required for this WF to run all the time
if: github.repository_owner == 'aws' && always()
runs-on: ubuntu-latest
needs:
- unit-functional
- node-integration
- node-esbuild-integration
- golang-integration
- java-maven-integration
- java-gradle-integration
- custom-make-integration
- python-integration
- ruby-integration
- dotnet-integration
- rust-cargo-lambda-integration
steps:
- name: report-failure
if: |
needs.unit-functional.result != 'success' ||
needs.node-integration.result != 'success' ||
needs.node-esbuild-integration.result != 'success' ||
needs.golang-integration.result != 'success' ||
needs.java-maven-integration.result != 'success' ||
needs.java-gradle-integration.result != 'success' ||
needs.custom-make-integration.result != 'success' ||
needs.python-integration.result != 'success' ||
needs.ruby-integration.result != 'success' ||
needs.dotnet-integration.result != 'success' ||
needs.rust-cargo-lambda-integration.result != 'success'
run: exit 1
- name: report-success
run: exit 0
unit-functional:
name: ${{ matrix.os }} / ${{ matrix.python }} / unit-functional
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Unit Testing
run: make pr
- name: Functional Testing
run: make func-test
node-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / node / npm ${{ matrix.npm }}.x
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
npm:
- 8
- 9
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v4
with:
node-version: 20
- if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- run: npm --version
- run: make init
- run: pytest -vv tests/integration/workflows/nodejs_npm
node-esbuild-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / esbuild / npm ${{ matrix.npm }}.x
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
npm:
- 8
- 9
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v4
with:
node-version: 20
- if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- run: npm --version
- run: make init
- run: pytest -vv tests/integration/workflows/nodejs_npm_esbuild
golang-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / golang
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-go@v5
with:
go-version: '^1.16'
- run: make init
- run: pytest -vv tests/integration/workflows/go_modules
java-maven-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / java maven
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
- run: make init
- run: pytest -vv tests/integration/workflows/java_maven
java-gradle-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / java gradle
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- run: make init
- run: pytest -vv tests/integration/workflows/java_gradle
custom-make-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / custom make
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: make init
- run: pytest -vv tests/integration/workflows/custom_make
python-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / python
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
if: ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.python }} == '3.12'
- run: make init
- run: pytest -vv tests/integration/workflows/python_pip
ruby-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / ruby
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- run: make init
- run: pytest -vv tests/integration/workflows/ruby_bundler
dotnet-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / dotnet
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: make init
- run: pytest -vv tests/integration/workflows/dotnet_clipackage
rust-cargo-lambda-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / rust-cargo-lambda
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
env:
CARGO_LAMBDA_VERSION: 0.15.0
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.8"
rust:
- stable
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Install and configure Rust
- name: Install rustup
run: |
: install rustup if needed
if ! command -v rustup &> /dev/null ; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
if: ${{ matrix.os }} == 'ubuntu-latest'
- name: rustup toolchain install ${{ matrix.rust }}
run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update
- run: rustup default ${{ matrix.rust }}
- run: |
: disable incremental compilation
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
- run: |
: enable colors in Cargo output
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
# Install and configure Cargo Lambda
- name: Install Cargo Lambda
run: pip install cargo-lambda==$CARGO_LAMBDA_VERSION
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- run: make init
- run: pytest -vv tests/integration/workflows/rust_cargo