fix wasm build #29
Workflow file for this run
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: emscripten | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| # Allows to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| emscripten: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - run: pip install pyodide-build | |
| - shell: bash | |
| run: | | |
| echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV | |
| echo "$EMSCRIPTEN_VERSION" | |
| echo PYTHON_VERSION=$(pyodide config get python_version | cut -d "." -f 1-2) >> $GITHUB_ENV | |
| echo "$PYTHON_VERSION" | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: ${{ env.EMSCRIPTEN_VERSION }} | |
| actions-cache-folder: emsdk-cache | |
| - shell: bash | |
| # rust version is pinned for compatibility with emscripten 3.1.58 | |
| run: | | |
| pip install maturin | |
| # rustup install nightly-2025-02-01 | |
| # rustup default nightly-2025-02-01 | |
| rustup install nightly | |
| rustup default nightly | |
| rustup target add wasm32-unknown-emscripten | |
| maturin build --target wasm32-unknown-emscripten -i 3.12 |