Skip to content

Commit e5b9a85

Browse files
committed
Merge branch 'main' into feature/0.18.0-nano
2 parents 9ab2c4e + f0bd568 commit e5b9a85

File tree

237 files changed

+12222
-5463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+12222
-5463
lines changed

.circleci/config.yml

+95-81
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version: 2
1+
version: 2.1
22

33
defaults: &defaults
44
working_directory: ~/repo
55
docker:
6-
- image: pyodide/pyodide-env:15
6+
- image: pyodide/pyodide-env:19
77
environment:
88
- EMSDK_NUM_CORES: 3
99
EMCC_CORES: 3
@@ -21,25 +21,18 @@ jobs:
2121
command: make lint
2222

2323
test-docs:
24-
working_directory: ~/repo
24+
<<: *defaults
2525
resource_class: small
26-
27-
docker:
28-
- image: cimg/python:3.8.2-node
29-
3026
steps:
3127
- checkout
3228

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-
4029
- run:
4130
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
4336

4437
build-core:
4538
<<: *defaults
@@ -72,7 +65,7 @@ jobs:
7265
command: |
7366
ccache -z
7467
# 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
7669
ccache -s
7770
7871
- run:
@@ -116,7 +109,7 @@ jobs:
116109
no_output_timeout: 1800
117110
command: |
118111
ccache -z
119-
make
112+
make -C packages
120113
ccache -s
121114
122115
- run:
@@ -137,65 +130,83 @@ jobs:
137130
- store_artifacts:
138131
path: /root/repo/build/
139132

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
141141
<<: *defaults
142142
steps:
143143
- attach_workspace:
144144
at: .
145145
- run:
146146
name: test
147147
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:
151157
<<: *defaults
152158
steps:
153159
- attach_workspace:
154160
at: .
155161
- run:
156-
name: test
162+
name: stack-size
157163
command: |
158-
tools/pytest_wrapper.py src packages/micropip/ -v -k chrome
164+
pytest -s benchmark/stack_usage.py | sed -n 's/## //pg' || true
159165
160-
test-packages-firefox:
166+
test-emsdk:
161167
<<: *defaults
168+
resource_class: small
162169
steps:
163170
- attach_workspace:
164171
at: .
165172
- run:
166173
name: test
167-
command: |
168-
tools/pytest_wrapper.py packages/test* packages/*/test* -v -k firefox
174+
command: make -C emsdk test
169175

170-
test-packages-chrome:
176+
test-python:
177+
# Unlike test-main this uses "resource_class small" and doesn't use "pytest_wrapper."
171178
<<: *defaults
179+
resource_class: small
172180
steps:
173-
- attach_workspace:
174-
at: .
181+
- checkout
175182
- run:
176183
name: test
177184
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:
181197
<<: *defaults
182198
resource_class: small
183199
steps:
184200
- attach_workspace:
185201
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
195202
- run:
196203
name: test
197204
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+
199210
200211
benchmark:
201212
<<: *defaults
@@ -211,6 +222,8 @@ jobs:
211222
path: /root/repo/build/benchmarks.json
212223

213224
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!
214227
resource_class: small
215228

216229
docker:
@@ -223,7 +236,7 @@ jobs:
223236
- run:
224237
name: Install requirements
225238
command: |
226-
apk add --no-cache --update python3
239+
apk add --no-cache --update python3 make
227240
python3 -m pip install awscli
228241
- run:
229242
name: Deploy Github Releases
@@ -245,25 +258,26 @@ jobs:
245258
# update 301 redirect for the /latest/* route.
246259
aws s3api put-bucket-website --cli-input-json file://.circleci/s3-website-config.json
247260
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!
249264
resource_class: small
250265

251266
docker:
252-
- image: circleci/python:3.7.7
267+
- image: cibuilds/github:0.13
253268

254269
steps:
255270
- checkout
256271
- attach_workspace:
257272
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
261273
- run:
262274
name: Install requirements
263275
command: |
264-
sudo apt-get update
265-
sudo apt-get install -y groff
276+
apk add --no-cache --update python3 make
266277
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
267281
- run:
268282
name: Deploy to pyodide-cdn2.iodide.io
269283
command: |
@@ -278,50 +292,50 @@ workflows:
278292
jobs:
279293
- lint
280294
- test-docs
281-
- build-core:
282-
filters:
283-
tags:
284-
only: /.*/
295+
- test-python
296+
- build-core
285297
- build-packages:
286298
requires:
287299
- 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
292303
requires:
293304
- 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
298308
requires:
299309
- 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*
304318
requires:
305319
- 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*
310328
requires:
311329
- build-packages
312-
filters:
313-
tags:
314-
only: /.*/
315330
- test-emsdk:
316331
requires:
317332
- 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
325339
- benchmark:
326340
requires:
327341
- build-packages
@@ -337,7 +351,7 @@ workflows:
337351
ignore: /.*/
338352
tags:
339353
only: /^\d+\.\d+\.\w+$/
340-
- deploy-s3:
354+
- deploy-dev:
341355
requires:
342356
- lint
343357
- test-python

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.a
22
*.o
33
*.pyc
4+
src/js/pyproxy.gen.js
45

56
*.egg-info/
67

@@ -18,9 +19,12 @@ build
1819
ccache
1920
cpython/downloads
2021
cpython/installs
22+
cpython/build.log
2123
docs/_build/
2224
emsdk/emsdk
2325
geckodriver.log
24-
node_modules/
26+
node_modules
2527
packages/.artifacts
2628
packages/*/build.log
29+
packages/build-logs
30+
dist/

.pre-commit-config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
exclude: '^.*patches|.*\.cgi$'
2+
default_language_version:
3+
python : "3.9"
24
repos:
35
- repo: https://github.com/pre-commit/pre-commit-hooks
46
rev: v2.3.0

0 commit comments

Comments
 (0)