-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (64 loc) · 2.31 KB
/
Copy pathrelease.yml
File metadata and controls
77 lines (64 loc) · 2.31 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
env:
PYODIDE_VERSION: "0.29.4"
EMSCRIPTEN_VERSION: "4.0.9"
permissions:
contents: write
jobs:
pyodide-wheel:
name: Build Pyodide wheel + release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
# Pinned nightly: pyodide-build's xbuildenv passes `-Z emscripten-wasm-eh`,
# which newer nightlies no longer accept.
- name: Install Rust nightly (build-std + emscripten target)
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-06-01
components: rust-src
targets: wasm32-unknown-emscripten
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Install pyodide-build
run: pip install pyodide-build
- name: Build wheel
env:
RUSTUP_TOOLCHAIN: nightly-2026-06-01
# `bash` (not ./): must not depend on the exec bit surviving the export.
run: bash ./scripts/build_pyodide.sh
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheel-pyodide-${{ env.PYODIDE_VERSION }}
path: dist/*wasm32*.whl
- name: Create GitHub release with wheel
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/*wasm32*.whl
# Same-origin wheel hosting for the /editor micropip install on
# fast.pathsim.org (served from this repo's gh-pages via GitHub Pages).
# keep_files is REQUIRED: it preserves older wheel versions (micropip can
# pin) and the rest of the site (landing at /, editor at /editor).
- name: Stage wheel for gh-pages
if: startsWith(github.ref, 'refs/tags/')
run: mkdir -p pages-wheels && cp dist/*wasm32*.whl pages-wheels/
- name: Publish wheel to gh-pages /wheels
if: startsWith(github.ref, 'refs/tags/')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./pages-wheels
destination_dir: wheels
keep_files: true