-
Notifications
You must be signed in to change notification settings - Fork 49
58 lines (45 loc) · 1.31 KB
/
pyodide.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Pyodide Build
on:
pull_request:
paths:
- crosshair/**
- setup.py
- .pre-commit-config.yaml
- .github/**
push:
branches: [ main ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup packages
run: sudo apt-get update && sudo apt-get install -y python3-dev python3-pip python3-venv
- name: Create venv
run: python3 -m venv ~/env
- name: Install dependencies
run: |
~/env/bin/pip install pyodide-build pyodide-cli
- name: Configure CMake and build
run: |
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}
- name: Build CrossHair
run: |
source ~/emsdk/emsdk_env.sh
~/env/bin/pyodide build
- name: Setup env-pyodide
run: |
source ~/env/bin/activate
source ~/emsdk/emsdk_env.sh
pyodide venv ~/env-pyodide
- name: Upload wheel
uses: actions/upload-artifact@master
with:
name: pyodide-wheel
path: dist/*.whl