bump version #550
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test-browser: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- 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.yml | |
environment-name: pyjs-wasm | |
condarc: | | |
channels: | |
- https://repo.prefix.dev/emscripten-forge-dev | |
- conda-forge | |
- name: Install Playwright | |
run: | | |
playwright install | |
- name: Build pyjs | |
run: | | |
micromamba activate pyjs-wasm | |
micromamba create -n pyjs-build-wasm \ | |
--platform=emscripten-wasm32 \ | |
-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 \ | |
pytest bzip2 sqlite zlib zstd libffi \ | |
exceptiongroup emscripten-abi==${{matrix.emsdk_ver}} \ | |
openssl liblzma | |
mkdir build | |
pushd build | |
export PREFIX=$MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm | |
export CMAKE_PREFIX_PATH=$PREFIX | |
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX | |
# build pyjs | |
emcmake cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \ | |
-DBUILD_RUNTIME_BROWSER=ON \ | |
-DBUILD_RUNTIME_NODE=OFF \ | |
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | |
.. | |
make -j2 | |
make install | |
popd | |
- name: setup env with numpy | |
run: | | |
micromamba activate pyjs-wasm | |
micromamba create -n pyjs-build-wasm-with-numpy \ | |
--platform=emscripten-wasm32 \ | |
-c https://repo.prefix.dev/emscripten-forge-dev\ | |
-c https://repo.mamba.pm/conda-forge \ | |
--yes \ | |
"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-with-numpy \ | |
--mount $(pwd)/tests:/tests \ | |
--mount $(pwd)/module/pyjs:/lib/python${{matrix.python_version}}/site-packages/pyjs \ | |
--script main.py \ | |
--work-dir /tests \ | |
--pyjs-dir $(pwd)/build \ | |
--headless \ | |
--async-main | |
- name: Test in browser-worker | |
run: | | |
micromamba activate pyjs-wasm | |
pyjs_code_runner run script \ | |
browser-worker \ | |
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm-with-numpy \ | |
--mount $(pwd)/tests:/tests \ | |
--mount $(pwd)/module/pyjs:/lib/python${{matrix.python_version}}/site-packages/pyjs \ | |
--script main.py \ | |
--work-dir /tests \ | |
--pyjs-dir $(pwd)/build \ | |
--headless \ | |
--async-main | |
- name: setup minimal env without numpy | |
run: | | |
micromamba activate pyjs-wasm | |
micromamba create -n pyjs-build-wasm-no-numpy \ | |
--platform=emscripten-wasm32 \ | |
-c https://repo.prefix.dev/emscripten-forge-dev\ | |
-c https://repo.mamba.pm/conda-forge \ | |
--yes \ | |
"python=${{matrix.python_version}}" pytest exceptiongroup | |
- name: Test in browser-main-no-numpy | |
run: | | |
micromamba activate pyjs-wasm | |
pyjs_code_runner run script \ | |
browser-main \ | |
--conda-env $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm-no-numpy \ | |
--mount $(pwd)/tests:/tests \ | |
--mount $(pwd)/module/pyjs:/lib/python${{matrix.python_version}}/site-packages/pyjs \ | |
--script main.py \ | |
--work-dir /tests \ | |
--pyjs-dir $(pwd)/build \ | |
--headless \ | |
--async-main \ | |
--no-cache |