Skip to content

Commit 0dc4c5e

Browse files
Create pyodide.yml
1 parent d3009da commit 0dc4c5e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/pyodide.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Pyodide Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
env:
8+
BUILD_TYPE: Release
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Configure CMake and build
25+
run: |
26+
sudo apt-get update && sudo apt-get install -y python3-dev python3-pip python3-venv
27+
python3 -m venv ~/env
28+
~/env/bin/pip install pyodide-build
29+
git clone https://github.com/emscripten-core/emsdk.git ~/emsdk && cd ~/emsdk && PYODIDE_EMSCRIPTEN_VERSION=$(~/env/bin/pyodide config get emscripten_version) && ./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION} && ./emsdk activate ${PYODIDE_EMSCRIPTEN_VERSION}
30+
source ~/emsdk/emsdk_env.sh && cd src/api/python && ~/env/bin/pyodide build --exports whole_archive
31+
source ~/emsdk/emsdk_emv.sh && ~/env/bin/pyodide venv ~/env-pyodide
32+
~/env-pyodide/bin/pip install src/api/python/dist/*.whl
33+
~/env-pyodide/bin/python - <src/api/python/z3test.py z3 && ~/env-pyodide/bin/python - <src/api/python/z3test.py z3num

0 commit comments

Comments
 (0)