Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 23 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,23 @@ jobs:
fail-fast: false
matrix:
include:
- emsdk_ver: "3.1.45"
python_version: "3.11"
pybind11_version: "<2.12.0"
# - emsdk_ver: "3.1.58"
# python_version: "3.12"
# pybind11_version: ""

- emsdk_ver: "3.1.73"
python_version: "3.13"
pybind11_version: ""
steps:
- uses: actions/checkout@v2

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev_${{matrix.emsdk_ver}}.yml
environment-file: environment-dev.yml
environment-name: pyjs-wasm
condarc: |
channels:
- https://repo.mamba.pm/emscripten-forge
- https://repo.prefix.dev/emscripten-forge-dev
- conda-forge



- name: Install Playwright
run: |
playwright install
Expand All @@ -49,20 +46,17 @@ jobs:
run: |
micromamba activate pyjs-wasm

# emsdk activate ${{matrix.emsdk_ver}}
# source $(pwd)/emsdk_install/emsdk_env.sh

micromamba create -n pyjs-build-wasm \
--platform=emscripten-wasm32 \
-c https://repo.mamba.pm/emscripten-forge \
-c https://repo.prefix.dev/emscripten-forge-dev\
-c https://repo.mamba.pm/conda-forge \
--yes \
python=${{matrix.python_version}} \
"pybind11${{matrix.pybind11_version}}" \
nlohmann_json pybind11_json "numpy<2" \
"pytest==7.1.1" bzip2 sqlite zlib zstd libffi \
nlohmann_json pybind11_json numpy \
pytest bzip2 sqlite zlib zstd libffi \
exceptiongroup emscripten-abi==${{matrix.emsdk_ver}} \
openssl
openssl liblzma


mkdir build
Expand Down Expand Up @@ -91,22 +85,22 @@ jobs:
- name: setup env with numpy
run: |
micromamba activate pyjs-wasm
micromamba create -n pyjs-build-wasm \
micromamba create -n pyjs-build-wasm-with-numpy \
--platform=emscripten-wasm32 \
-c https://repo.mamba.pm/emscripten-forge \
-c https://repo.prefix.dev/emscripten-forge-dev\
-c https://repo.mamba.pm/conda-forge \
--yes \
"python=${{matrix.python_version}}" "pytest==7.1.1" "numpy<2" exceptiongroup
"python=${{matrix.python_version}}" pytest numpy exceptiongroup


- name: Test in browser-main
run: |
micromamba activate pyjs-wasm
pyjs_code_runner run script \
browser-main \
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm \
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm-with-numpy \
--mount $(pwd)/tests:/tests \
--mount $(pwd)/module/pyjs:/lib/python3.11/site-packages/pyjs \
--mount $(pwd)/module/pyjs:/lib/python${{matrix.python_version}}/site-packages/pyjs \
--script main.py \
--work-dir /tests \
--pyjs-dir $(pwd)/build \
Expand All @@ -120,9 +114,9 @@ jobs:

pyjs_code_runner run script \
browser-worker \
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm \
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm-with-numpy \
--mount $(pwd)/tests:/tests \
--mount $(pwd)/module/pyjs:/lib/python3.11/site-packages/pyjs \
--mount $(pwd)/module/pyjs:/lib/python${{matrix.python_version}}/site-packages/pyjs \
--script main.py \
--work-dir /tests \
--pyjs-dir $(pwd)/build \
Expand All @@ -132,12 +126,12 @@ jobs:
- name: setup minimal env without numpy
run: |
micromamba activate pyjs-wasm
micromamba create -n pyjs-build-wasm \
micromamba create -n pyjs-build-wasm-no-numpy \
--platform=emscripten-wasm32 \
-c https://repo.mamba.pm/emscripten-forge \
-c https://repo.prefix.dev/emscripten-forge-dev\
-c https://repo.mamba.pm/conda-forge \
--yes \
"python=${{matrix.python_version}}" "pytest==7.1.1" exceptiongroup
"python=${{matrix.python_version}}" pytest exceptiongroup

- name: Test in browser-main-no-numpy
run: |
Expand All @@ -146,9 +140,9 @@ jobs:

pyjs_code_runner run script \
browser-main \
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm \
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm-no-numpy \
--mount $(pwd)/tests:/tests \
--mount $(pwd)/module/pyjs:/lib/python3.11/site-packages/pyjs \
--mount $(pwd)/module/pyjs:/lib/python${{matrix.python_version}}/site-packages/pyjs \
--script main.py \
--work-dir /tests \
--pyjs-dir $(pwd)/build \
Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ SET(PYTHON_UTIL_LIBS
${CMAKE_INSTALL_PREFIX}/lib/libssl.a
# crypto
${CMAKE_INSTALL_PREFIX}/lib/libcrypto.a
# lzma
${CMAKE_INSTALL_PREFIX}/lib/liblzma.a
)

if(LINK_LIBLZMA)
SET(PYTHON_UTIL_LIBS ${PYTHON_UTIL_LIBS} ${CMAKE_INSTALL_PREFIX}/lib/liblzma.a)
endif()


if (LINK_LIBEXPAT)
SET(PYTHON_UTIL_LIBS ${PYTHON_UTIL_LIBS} ${CMAKE_INSTALL_PREFIX}/lib/libexpat.a)
Expand Down
4 changes: 2 additions & 2 deletions environment-dev_3.1.45.yml → environment-dev.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: pyjs-wasm
channels:
- conda-forge
- https://repo.prefix.dev/emscripten-forge-dev
dependencies:
- cmake
- pip
- python
- yarn
- click
- empack >=3.0.1
- microsoft::playwright <= 1.50
- ninja
- nodejs
Expand All @@ -27,7 +27,7 @@ dependencies:
- notebook >=7,<8 # to include the extension to switch between JupyterLab and Notebook
# pyjs_code_runner dev deps
- hatchling
- emscripten_emscripten-wasm32 == 3.1.45
- emscripten_emscripten-wasm32
- pip:
- JLDracula
- pyjs_code_runner >= 3.0
33 changes: 0 additions & 33 deletions environment-dev_3.1.58.yml

This file was deleted.

Loading