-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 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,54 @@ | ||
name: Pyodide Build | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- crosshair/** | ||
- setup.py | ||
- .pre-commit-config.yaml | ||
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: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools | ||
pip3 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 |