1
- # Copied from NumPy https://github.com/numpy/numpy/pull/24603
2
- # https://github.com/numpy/numpy/blob/328a9a488c3a146497be704d2cee2f9134e43b5b /.github/workflows/emscripten.yml
1
+ # Copied from NumPy https://github.com/numpy/numpy/pull/25894
2
+ # https://github.com/numpy/numpy/blob/d2d2c25fa81b47810f5cbd85ea6485eb3a3ffec3 /.github/workflows/emscripten.yml
3
3
#
4
- # To enable this workflow on a fork, comment out:
5
- #
6
- # if: github.repository == 'scikit-image/scikit-image'
4
+
7
5
name : Test Emscripten/Pyodide build
8
6
9
7
on :
10
8
pull_request :
11
9
branches :
12
10
- main
13
11
- maintenance/**
12
+ # TODO: remove after ready to merge
13
+ push :
14
+ # branches:
15
+ # - main
16
+ # - maintenance/**
17
+ workflow_dispatch :
14
18
15
19
concurrency :
16
20
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -21,41 +25,44 @@ permissions:
21
25
22
26
jobs :
23
27
build-wasm-emscripten :
28
+ name : Build scikit-image distribution for Pyodide
24
29
runs-on : ubuntu-22.04
25
- if : " github.repository == 'scikit-image/scikit-image'"
30
+ # To enable this workflow on a fork, comment out:
31
+ # if: github.repository == 'scikit-image/scikit-image'
26
32
env :
27
- PYODIDE_VERSION : 0.25.0a2
33
+ PYODIDE_VERSION : 0.25.0
28
34
# PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_VERSION.
29
35
# The appropriate versions can be found in the Pyodide repodata.json
30
36
# "info" field, or in Makefile.envs:
31
37
# https://github.com/pyodide/pyodide/blob/main/Makefile.envs#L2
32
38
PYTHON_VERSION : 3.11.3
33
- EMSCRIPTEN_VERSION : 3.1.45
39
+ EMSCRIPTEN_VERSION : 3.1.46
34
40
NODE_VERSION : 18
35
41
steps :
36
42
- name : Checkout scikit-image
37
- uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
43
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
38
44
39
- - name : set up python
45
+ - name : Set up Python ${{ env.PYTHON_VERSION }}
40
46
id : setup-python
41
- uses : actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7 .0
47
+ uses : actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0 .0
42
48
with :
43
49
python-version : ${{ env.PYTHON_VERSION }}
44
50
45
- - uses : mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 # v12
51
+ - name : Set up Emscripten toolchain
52
+ uses : mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
46
53
with :
47
54
version : ${{ env.EMSCRIPTEN_VERSION }}
48
55
actions-cache-folder : emsdk-cache
49
56
50
57
- name : Install pyodide-build
51
- run : pip install "pydantic<2" build pyodide-build==$PYODIDE_VERSION
58
+ run : pip install "pydantic<2" pyodide-build==${{ env. PYODIDE_VERSION }}
52
59
53
- - name : Build
60
+ - name : Build scikit-image for Pyodide
54
61
run : |
55
62
pyodide build
56
63
57
- - name : set up node
58
- uses : actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
64
+ - name : Set up Node.js
65
+ uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
59
66
with :
60
67
node-version : ${{ env.NODE_VERSION }}
61
68
64
71
pyodide venv .venv-pyodide
65
72
source .venv-pyodide/bin/activate
66
73
pip install dist/*.whl
67
- python -c "import sys; print(sys.platform)"
68
74
pip install matplotlib>=3.5 numpydoc>=1.5 pooch>=1.6.0 pytest>=7.0 pytest-cov>=2.11.0 pytest-localserver pytest-faulthandler
69
- - name : Test
75
+
76
+ - name : Test scikit-image for Pyodide
70
77
run : |
71
78
source .venv-pyodide/bin/activate
72
79
cd ..
0 commit comments