@@ -45,10 +45,10 @@ jobs:
45
45
with :
46
46
cache : yarn
47
47
node-version : ' 12'
48
- - name : Set up Python 3.6
48
+ - name : Set up Python 3.7
49
49
uses : actions/setup-python@v3
50
50
with :
51
- python-version : ' 3.6 '
51
+ python-version : ' 3.7 '
52
52
- name : Install python3-venv
53
53
run : sudo apt install -y python3-venv
54
54
- name : Locate Caches
69
69
!~/.m2/repository/software/amazon/jsii/
70
70
~/.nuget/packages
71
71
!~/.nuget/packages/amazon.jsii.*
72
- key : ${{ runner.os }}-node@12-python@3.6 -${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
72
+ key : ${{ runner.os }}-node@12-python@3.7 -${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
73
73
restore-keys : |-
74
- ${{ runner.os }}-node@12-python@3.6 -
74
+ ${{ runner.os }}-node@12-python@3.7 -
75
75
${{ runner.os }}-node@12-
76
76
${{ runner.os }}-
77
77
# Prepare dependencies and build
@@ -139,10 +139,10 @@ jobs:
139
139
with :
140
140
cache : yarn
141
141
node-version : ' 12'
142
- - name : Set up Python 3.6
142
+ - name : Set up Python 3.7
143
143
uses : actions/setup-python@v3
144
144
with :
145
- python-version : ' 3.6 '
145
+ python-version : ' 3.7 '
146
146
- name : Install python3-venv
147
147
run : sudo apt install -y python3-venv
148
148
- name : Locate Caches
@@ -163,9 +163,9 @@ jobs:
163
163
!~/.m2/repository/software/amazon/jsii/
164
164
~/.nuget/packages
165
165
!~/.nuget/packages/amazon.jsii.*
166
- key : ${{ runner.os }}-node@12-python@3.6 -${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
166
+ key : ${{ runner.os }}-node@12-python@3.7 -${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }}
167
167
restore-keys : |-
168
- ${{ runner.os }}-node@12-python@3.6 -
168
+ ${{ runner.os }}-node@12-python@3.7 -
169
169
${{ runner.os }}-node@12-
170
170
${{ runner.os }}-
171
171
# Prepare dependencies and build
@@ -204,6 +204,8 @@ jobs:
204
204
path : ${{ github.workspace }}/dist/
205
205
206
206
test :
207
+ permissions :
208
+ contents : none
207
209
name : Test (${{ matrix.os }} / dotnet ${{ matrix.dotnet }} / java ${{ matrix.java }} / node ${{ matrix.node }} / python ${{ matrix.python }})
208
210
needs : build
209
211
strategy :
@@ -213,9 +215,14 @@ jobs:
213
215
dotnet : ['3.1.x']
214
216
go : ['1.16']
215
217
java : ['8']
216
- node : ['12', '14', '16', '17']
218
+ node :
219
+ - ' 12' # EOL 2022-04-30
220
+ - ' 14' # EOL 2023-04-30
221
+ - ' 16' # EOL 2024-04-30
222
+ - ' 17' # EOL 2022-06-01
223
+ - ' 18' # EOL 2025-04-30
217
224
os : [ubuntu-latest]
218
- python : ['3.6 ']
225
+ python : ['3.7 ']
219
226
# Add specific combinations to be tested against "node 12" (to restrict cardinality)
220
227
include :
221
228
# Test using Windows
@@ -224,48 +231,48 @@ jobs:
224
231
go : ' 1.16'
225
232
java : ' 8'
226
233
node : ' 12'
227
- python : ' 3.6 '
234
+ python : ' 3.7 '
228
235
# Test using macOS
229
236
- os : macos-latest
230
237
dotnet : ' 3.1.x'
231
238
go : ' 1.16'
232
239
java : ' 8'
233
240
node : ' 12'
234
- python : ' 3.6 '
241
+ python : ' 3.7 '
235
242
# Test alternate .NETs
236
243
- java : ' 8'
237
244
dotnet : ' 5.0.x'
238
245
go : ' 1.16'
239
246
node : ' 12'
240
247
os : ubuntu-latest
241
- python : ' 3.6 '
248
+ python : ' 3.7 '
242
249
- java : ' 8'
243
250
dotnet : ' 6.0.x'
244
251
go : ' 1.16'
245
252
node : ' 12'
246
253
os : ubuntu-latest
247
- python : ' 3.6 '
254
+ python : ' 3.7 '
248
255
# Test alternate Javas
249
256
- java : ' 11'
250
257
dotnet : ' 3.1.x'
251
258
go : ' 1.16'
252
259
node : ' 12'
253
260
os : ubuntu-latest
254
- python : ' 3.6 '
261
+ python : ' 3.7 '
255
262
# Test alternate Pythons
256
- - python : ' 3.7 '
263
+ - python : ' 3.8 '
257
264
dotnet : ' 3.1.x'
258
265
go : ' 1.16'
259
266
java : ' 8'
260
267
node : ' 12'
261
268
os : ubuntu-latest
262
- - python : ' 3.8 '
269
+ - python : ' 3.9 '
263
270
dotnet : ' 3.1.x'
264
271
go : ' 1.16'
265
272
java : ' 8'
266
273
node : ' 12'
267
274
os : ubuntu-latest
268
- - python : ' 3.9 '
275
+ - python : ' 3.10 '
269
276
dotnet : ' 3.1.x'
270
277
go : ' 1.16'
271
278
java : ' 8'
@@ -358,3 +365,51 @@ jobs:
358
365
&& echo "Untracked files: ${untracked:-<none>}" \
359
366
&& test -z "${untracked}"
360
367
shell : bash
368
+ benchmark :
369
+ name : Run benchmark suite
370
+ runs-on : ubuntu-latest
371
+ permissions :
372
+ contents : write
373
+ needs : build
374
+ steps :
375
+ # Check out the code
376
+ - name : Download Artifact
377
+ uses : actions/download-artifact@v3
378
+ with :
379
+ name : built-tree
380
+ - name : Extract Artifact
381
+ run : |-
382
+ echo "::group::Untar Archive"
383
+ tar zxvf built-tree.tgz
384
+ echo "::endgroup"
385
+
386
+ rm built-tree.tgz
387
+ - name : Set up Node
388
+ uses : actions/setup-node@v3
389
+ with :
390
+ cache : yarn
391
+ node-version : ' 14'
392
+ - name : Install Dependencies
393
+ run : yarn install --frozen-lockfile
394
+ - name : Run Benchmark
395
+ working-directory : packages/@jsii/benchmarks
396
+ run : yarn bench --output ${{ runner.temp }}/bench-output.json
397
+ - name : Compare Benchmark Results
398
+ if : github.event_name == 'pull_request'
399
+ uses : benchmark-action/github-action-benchmark@v1
400
+ with :
401
+ name : jsii Benchmark Regression
402
+ tool : ' customSmallerIsBetter'
403
+ output-file-path : ${{ runner.temp }}/bench-output.json
404
+ comment-always : true
405
+ github-token : ${{ secrets.PROJEN_GITHUB_TOKEN }}
406
+ fail-on-alert : true
407
+ - name : Upload Benchmark Results
408
+ if : github.event_name == 'push'
409
+ uses : benchmark-action/github-action-benchmark@v1
410
+ with :
411
+ name : jsii Benchmark
412
+ tool : ' customSmallerIsBetter'
413
+ output-file-path : ${{ runner.temp }}/bench-output.json
414
+ github-token : ${{ secrets.PROJEN_GITHUB_TOKEN }}
415
+ auto-push : true
0 commit comments