-
Notifications
You must be signed in to change notification settings - Fork 33
39 lines (39 loc) · 1.13 KB
/
emscripten.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install pyodide-build
- shell: bash
run: |
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
echo PYTHON_VERSION=$(pyodide config get python_version | cut -d "." -f 1-2) >> $GITHUB_ENV
- uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
actions-cache-folder: emsdk-cache
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: wasm32-unknown-emscripten
args: --release --out dist -i ${{ env.PYTHON_VERSION }}
sccache: 'true'
rust-toolchain: nightly
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wasm-wheels
path: dist