8
8
branches :
9
9
- main
10
10
- maintenance/**
11
+ # TODO: remove both of these after everything is ready
12
+ push :
13
+ workflow_dispatch :
11
14
12
15
concurrency :
13
16
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -19,50 +22,46 @@ permissions:
19
22
jobs :
20
23
build-wasm-emscripten :
21
24
runs-on : ubuntu-22.04
22
- if : false # NOTE: job disabled, it needs to be moved to Meson (see gh-24603)
23
25
# if: "github.repository == 'numpy/numpy'"
24
26
env :
25
- PYODIDE_VERSION : 0.23.1
27
+ PYODIDE_VERSION : 0.25.0
26
28
# PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_VERSION.
27
29
# The appropriate versions can be found in the Pyodide repodata.json
28
30
# "info" field, or in Makefile.envs:
29
31
# https://github.com/pyodide/pyodide/blob/main/Makefile.envs#L2
30
- PYTHON_VERSION : 3.11.2
31
- EMSCRIPTEN_VERSION : 3.1.32
32
+ PYTHON_VERSION : 3.111.3
33
+ EMSCRIPTEN_VERSION : 3.1.46
32
34
NODE_VERSION : 18
33
35
steps :
34
36
- name : Checkout numpy
35
37
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36
38
with :
37
39
submodules : true
38
- # versioneer.py requires the latest tag to be reachable. Here we
39
- # fetch the complete history to get access to the tags.
40
- # A shallow clone can work when the following issue is resolved:
41
- # https://github.com/actions/checkout/issues/338
42
- fetch-depth : 0
40
+ # The fetch-tags input shall fetch tags for versioneer.py without
41
+ # the need to fetch the entire history, see
42
+ # https://github.com/actions/checkout#usage
43
+ fetch-tags : true
43
44
44
- - name : set up python
45
+ - name : Set up Python ${{ env.PYTHON_VERSION }}
45
46
id : setup-python
46
47
uses : actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
47
48
with :
48
49
python-version : ${{ env.PYTHON_VERSION }}
49
50
50
- - uses : mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
51
+ - name : Set up Emscripten toolchain
52
+ uses : mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
51
53
with :
52
54
version : ${{ env.EMSCRIPTEN_VERSION }}
53
55
actions-cache-folder : emsdk-cache
54
56
55
57
- name : Install pyodide-build
56
58
run : pip install "pydantic<2" pyodide-build==$PYODIDE_VERSION
57
59
58
- - name : Build
60
+ - name : Build NumPy for Pyodide
59
61
run : |
60
- # Pyodide is still in the process of adding better/easier support for
61
- # non-setup.py based builds.
62
- cp pyproject.toml.setuppy pyproject.toml
63
- CFLAGS=-g2 LDFLAGS=-g2 pyodide build
62
+ pyodide build -Csetup-args="--cross-file=$PWD/tools/ci/emscripten.meson.cross"
64
63
65
- - name : set up node
64
+ - name : Set up Node.js
66
65
uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
67
66
with :
68
67
node-version : ${{ env.NODE_VERSION }}
@@ -73,11 +72,10 @@ jobs:
73
72
source .venv-pyodide/bin/activate
74
73
pip install dist/*.whl
75
74
python -c "import sys; print(sys.platform)"
76
- # TODO: when re-enabled this workflow, install test deps differently
77
- # since ninja isn't installable with pyodide
78
75
pip install -r requirements/test_requirements.txt
79
- - name : Test
76
+
77
+ - name : Test NumPy for Pyodide
80
78
run : |
81
79
source .venv-pyodide/bin/activate
82
80
cd ..
83
- python numpy/runtests.py -n -vv
81
+ pytest --pyargs numpy -m "not slow"
0 commit comments