-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci to build pyodide wheels * add compute and io modules * Build on tags
- Loading branch information
1 parent
bce24b5
commit d0d737a
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: Build pyodide wheels | ||
|
||
on: | ||
push: | ||
tags: | ||
- "py-core-v*" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: | ||
- arro3-core | ||
- arro3-compute | ||
- arro3-io | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
targets: wasm32-unknown-emscripten | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Python build dependencies | ||
run: pip install maturin pyodide-build | ||
|
||
- name: Install emsdk & build wheels | ||
run: | | ||
git clone https://github.com/emscripten-core/emsdk.git | ||
cd emsdk | ||
PYODIDE_EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) | ||
./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION} | ||
./emsdk activate ${PYODIDE_EMSCRIPTEN_VERSION} | ||
source emsdk_env.sh | ||
cd .. | ||
RUSTUP_TOOLCHAIN=nightly maturin build --release -o dist --target wasm32-unknown-emscripten -i python3.11 --manifest-path ${{ matrix.module }}/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-pyodide-${{ matrix.module }} | ||
path: dist |