1
- version : 2
1
+ version : 2.1
2
2
3
3
defaults : &defaults
4
4
working_directory : ~/repo
5
5
docker :
6
- - image : pyodide/pyodide-env:15
6
+ - image : pyodide/pyodide-env:19
7
7
environment :
8
8
- EMSDK_NUM_CORES : 3
9
9
EMCC_CORES : 3
@@ -21,25 +21,18 @@ jobs:
21
21
command : make lint
22
22
23
23
test-docs :
24
- working_directory : ~/repo
24
+ << : *defaults
25
25
resource_class : small
26
-
27
- docker :
28
- - image : cimg/python:3.8.2-node
29
-
30
26
steps :
31
27
- checkout
32
28
33
- - run :
34
- name : Install prerequisites
35
- command : |
36
- pip install -r docs/requirements-doc.txt
37
- pip install pytest
38
- sudo npm install -g jsdoc
39
-
40
29
- run :
41
30
name : Test docs
42
- command : pytest docs/sphinx_pyodide/tests
31
+ command : |
32
+ mkdir test-results
33
+ pytest docs/sphinx_pyodide/tests --junitxml=test-results/junit.xml
34
+ - store_test_results :
35
+ path : test-results
43
36
44
37
build-core :
45
38
<< : *defaults
72
65
command : |
73
66
ccache -z
74
67
# The following packages are currently used in the main pyodide test suite
75
- PYODIDE_PACKAGES="micropip,pyparsing,pytz,packaging,kiwisolver " make
68
+ PYODIDE_PACKAGES="micropip,pyparsing,pytz,packaging,Jinja2 " make
76
69
ccache -s
77
70
78
71
- run :
@@ -116,7 +109,7 @@ jobs:
116
109
no_output_timeout : 1800
117
110
command : |
118
111
ccache -z
119
- make
112
+ make -C packages
120
113
ccache -s
121
114
122
115
- run :
@@ -137,65 +130,83 @@ jobs:
137
130
- store_artifacts :
138
131
path : /root/repo/build/
139
132
140
- test-core-firefox :
133
+ - store_artifacts :
134
+ path : /root/repo/packages/build-logs
135
+
136
+ test-main :
137
+ parameters :
138
+ test-params :
139
+ description : The tests to run.
140
+ type : string
141
141
<< : *defaults
142
142
steps :
143
143
- attach_workspace :
144
144
at : .
145
145
- run :
146
146
name : test
147
147
command : |
148
- tools/pytest_wrapper.py src packages/micropip/ -v -k firefox -n 3
149
-
150
- test-core-chrome :
148
+ mkdir test-results
149
+ tools/pytest_wrapper.py \
150
+ --junitxml=test-results/junit.xml \
151
+ --verbose \
152
+ << parameters.test-params >>
153
+ - store_test_results :
154
+ path : test-results
155
+
156
+ benchmark-stack-size :
151
157
<< : *defaults
152
158
steps :
153
159
- attach_workspace :
154
160
at : .
155
161
- run :
156
- name : test
162
+ name : stack-size
157
163
command : |
158
- tools/pytest_wrapper .py src packages/micropip/ -v -k chrome
164
+ pytest -s benchmark/stack_usage .py | sed -n 's/## //pg' || true
159
165
160
- test-packages-firefox :
166
+ test-emsdk :
161
167
<< : *defaults
168
+ resource_class : small
162
169
steps :
163
170
- attach_workspace :
164
171
at : .
165
172
- run :
166
173
name : test
167
- command : |
168
- tools/pytest_wrapper.py packages/test* packages/*/test* -v -k firefox
174
+ command : make -C emsdk test
169
175
170
- test-packages-chrome :
176
+ test-python :
177
+ # Unlike test-main this uses "resource_class small" and doesn't use "pytest_wrapper."
171
178
<< : *defaults
179
+ resource_class : small
172
180
steps :
173
- - attach_workspace :
174
- at : .
181
+ - checkout
175
182
- run :
176
183
name : test
177
184
command : |
178
- tools/pytest_wrapper.py packages/test* packages/*/test* -v -k chrome -n 2
179
-
180
- test-emsdk :
185
+ mkdir test-results
186
+ pytest \
187
+ --junitxml=test-results/junit.xml \
188
+ --verbose \
189
+ -k 'not (chrome or firefox or node)' \
190
+ --cov=pyodide_build --cov=pyodide \
191
+ src pyodide-build packages/micropip/
192
+
193
+ - store_test_results :
194
+ path : test-results
195
+
196
+ test-js :
181
197
<< : *defaults
182
198
resource_class : small
183
199
steps :
184
200
- attach_workspace :
185
201
at : .
186
- - run :
187
- name : test
188
- command : make -C emsdk test
189
-
190
- test-python :
191
- << : *defaults
192
- resource_class : small
193
- steps :
194
- - checkout
195
202
- run :
196
203
name : test
197
204
command : |
198
- pytest src pyodide_build packages/micropip/ -v -k 'not (chrome or firefox)' --cov=pyodide_build --cov=pyodide
205
+ cd src/js
206
+ npx tsd
207
+ npm install
208
+ npm test
209
+
199
210
200
211
benchmark :
201
212
<< : *defaults
@@ -211,6 +222,8 @@ jobs:
211
222
path : /root/repo/build/benchmarks.json
212
223
213
224
deploy-release :
225
+ # To reduce chance of deployment issues, try to keep the steps here as
226
+ # similar as possible to the steps in deploy-dev!
214
227
resource_class : small
215
228
216
229
docker :
@@ -223,7 +236,7 @@ jobs:
223
236
- run :
224
237
name : Install requirements
225
238
command : |
226
- apk add --no-cache --update python3
239
+ apk add --no-cache --update python3 make
227
240
python3 -m pip install awscli
228
241
- run :
229
242
name : Deploy Github Releases
@@ -245,25 +258,26 @@ jobs:
245
258
# update 301 redirect for the /latest/* route.
246
259
aws s3api put-bucket-website --cli-input-json file://.circleci/s3-website-config.json
247
260
248
- deploy-s3 :
261
+ deploy-dev :
262
+ # To reduce chance of deployment issues, try to keep the steps here as
263
+ # similar as possible to the steps in deploy-release!
249
264
resource_class : small
250
265
251
266
docker :
252
- - image : circleci/python:3.7.7
267
+ - image : cibuilds/github:0.13
253
268
254
269
steps :
255
270
- checkout
256
271
- attach_workspace :
257
272
at : .
258
- - run :
259
- name : Set PYODIDE_BASE_URL
260
- command : PYODIDE_BASE_URL="https://cdn.jsdelivr.net/pyodide/dev/full/" make update_base_url
261
273
- run :
262
274
name : Install requirements
263
275
command : |
264
- sudo apt-get update
265
- sudo apt-get install -y groff
276
+ apk add --no-cache --update python3 make
266
277
python3 -m pip install awscli
278
+ - run :
279
+ name : Set PYODIDE_BASE_URL
280
+ command : PYODIDE_BASE_URL="https://cdn.jsdelivr.net/pyodide/dev/full/" make update_base_url
267
281
- run :
268
282
name : Deploy to pyodide-cdn2.iodide.io
269
283
command : |
@@ -278,50 +292,50 @@ workflows:
278
292
jobs :
279
293
- lint
280
294
- test-docs
281
- - build-core :
282
- filters :
283
- tags :
284
- only : /.*/
295
+ - test-python
296
+ - build-core
285
297
- build-packages :
286
298
requires :
287
299
- build-core
288
- filters :
289
- tags :
290
- only : /.*/
291
- - test-core-chrome :
300
+ - test-main :
301
+ name : test-core-chrome
302
+ test-params : -k chrome src packages/micropip
292
303
requires :
293
304
- build-core
294
- filters :
295
- tags :
296
- only : /.*/
297
- - test-core-firefox :
305
+ - test-main :
306
+ name : test-core-firefox
307
+ test-params : -k firefox src packages/micropip
298
308
requires :
299
309
- build-core
300
- filters :
301
- tags :
302
- only : /.*/
303
- - test-packages-chrome :
310
+ - test-main :
311
+ name : test-core-node
312
+ test-params : -k node src packages/micropip
313
+ requires :
314
+ - build-core
315
+ - test-main :
316
+ name : test-packages-chrome
317
+ test-params : -k chrome packages/test* packages/*/test*
304
318
requires :
305
319
- build-packages
306
- filters :
307
- tags :
308
- only : /.*/
309
- - test-packages-firefox :
320
+ - test-main :
321
+ name : test-packages-firefox
322
+ test-params : -k firefox packages/test* packages/*/test*
323
+ requires :
324
+ - build-packages
325
+ - test-main :
326
+ name : test-packages-node
327
+ test-params : -k "node and not numpy" packages/test* packages/*/test*
310
328
requires :
311
329
- build-packages
312
- filters :
313
- tags :
314
- only : /.*/
315
330
- test-emsdk :
316
331
requires :
317
332
- build-core
318
- filters :
319
- tags :
320
- only : /.*/
321
- - test-python :
322
- filters :
323
- tags :
324
- only : /.*/
333
+ - test-js :
334
+ requires :
335
+ - build-core
336
+ - benchmark-stack-size :
337
+ requires :
338
+ - build-core
325
339
- benchmark :
326
340
requires :
327
341
- build-packages
@@ -337,7 +351,7 @@ workflows:
337
351
ignore : /.*/
338
352
tags :
339
353
only : /^\d+\.\d+\.\w+$/
340
- - deploy-s3 :
354
+ - deploy-dev :
341
355
requires :
342
356
- lint
343
357
- test-python
0 commit comments