Skip to content

Commit 89c2095

Browse files
Update Emscripten build workflow and actions
Based on numpy/numpy#25894. This comment updates versions for Pyodide, Emscripten, and improves some names for job steps. Multiple reusable actions have also been updated in accordance with the latest versions available. Co-Authored-By: Lars Grüter <[email protected]>
1 parent d6ca44c commit 89c2095

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/emscripten.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
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
33
#
4-
# To enable this workflow on a fork, comment out:
5-
#
6-
# if: github.repository == 'scikit-image/scikit-image'
4+
75
name: Test Emscripten/Pyodide build
86

97
on:
@@ -22,40 +20,42 @@ permissions:
2220
jobs:
2321
build-wasm-emscripten:
2422
runs-on: ubuntu-22.04
25-
if: "github.repository == 'scikit-image/scikit-image'"
23+
# To enable this workflow on a fork, comment out:
24+
if: github.repository == 'scikit-image/scikit-image'
2625
env:
27-
PYODIDE_VERSION: 0.25.0a2
26+
PYODIDE_VERSION: 0.25.0
2827
# PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_VERSION.
2928
# The appropriate versions can be found in the Pyodide repodata.json
3029
# "info" field, or in Makefile.envs:
3130
# https://github.com/pyodide/pyodide/blob/main/Makefile.envs#L2
3231
PYTHON_VERSION: 3.11.3
33-
EMSCRIPTEN_VERSION: 3.1.45
32+
EMSCRIPTEN_VERSION: 3.1.46
3433
NODE_VERSION: 18
3534
steps:
3635
- name: Checkout scikit-image
37-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
36+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3837

39-
- name: set up python
38+
- name: Set up Python ${{ env.PYTHON_VERSION }}
4039
id: setup-python
41-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
40+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
4241
with:
4342
python-version: ${{ env.PYTHON_VERSION }}
4443

45-
- uses: mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 # v12
44+
- name: Set up Emscripten toolchain
45+
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
4646
with:
4747
version: ${{ env.EMSCRIPTEN_VERSION }}
4848
actions-cache-folder: emsdk-cache
4949

5050
- name: Install pyodide-build
51-
run: pip install "pydantic<2" build pyodide-build==$PYODIDE_VERSION
51+
run: pip install "pydantic<2" pyodide-build==${{ env.PYODIDE_VERSION }}
5252

53-
- name: Build
53+
- name: Build scikit-image for Pyodide
5454
run: |
5555
pyodide build
5656
57-
- name: set up node
58-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
57+
- name: Set up Node.js
58+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
5959
with:
6060
node-version: ${{ env.NODE_VERSION }}
6161

@@ -64,9 +64,9 @@ jobs:
6464
pyodide venv .venv-pyodide
6565
source .venv-pyodide/bin/activate
6666
pip install dist/*.whl
67-
python -c "import sys; print(sys.platform)"
6867
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
68+
69+
- name: Test scikit-image for Pyodide
7070
run: |
7171
source .venv-pyodide/bin/activate
7272
cd ..

0 commit comments

Comments
 (0)