-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
- Loading branch information
Showing
13 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: WASM | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-wasm-emscripten: | ||
name: Pyodide wheel | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install pyodide-build | ||
run: pip install pyodide-build==0.23.4 | ||
|
||
- name: Compute emsdk version | ||
id: compute-emsdk-version | ||
run: | | ||
# Prepare xbuild environment (side-effect) | ||
pyodide config list | ||
# Save EMSDK version | ||
EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) | ||
echo "emsdk-version=$EMSCRIPTEN_VERSION" >> $GITHUB_OUTPUT | ||
- uses: mymindstorm/setup-emsdk@v12 | ||
with: | ||
version: ${{ steps.compute-emsdk-version.outputs.emsdk-version }} | ||
actions-cache-folder: emsdk-cache | ||
|
||
- name: Build | ||
run: PYODIDE_BUILD_EXPORTS=whole_archive CFLAGS=-fexceptions LDFLAGS=-fexceptions pyodide build | ||
working-directory: tests | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Set up Pyodide virtual environment | ||
run: | | ||
pyodide venv .venv-pyodide | ||
.venv-pyodide/bin/pip install $(echo -n tests/dist/*.whl) | ||
- name: Test | ||
run: .venv-pyodide/bin/pytest -o timeout=0 tests/test_*.py |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Warning: this is currently used for pyodide, and is not a general out-of-tree | ||
# builder for the tests (yet). Specifically, wheels can't be built from SDists. | ||
|
||
[build-system] | ||
requires = ["scikit-build-core[pyproject]"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[project] | ||
name = "pybind11_tests" | ||
version = "0.0.1" | ||
dependencies = ["pytest", "pytest-timeout", "numpy", "scipy"] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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