@@ -16,7 +16,7 @@ permissions:
1616 contents : write
1717
1818env :
19- CARGO_ARGS : --no-default-features --features stdlib,zlib, importlib,encodings,sqlite,ssl
19+ CARGO_ARGS : --no-default-features --features stdlib,importlib,encodings,sqlite,ssl
2020
2121jobs :
2222 build :
8989 steps :
9090 - uses : actions/checkout@v4
9191 - uses : dtolnay/rust-toolchain@stable
92-
93- - name : Set up Environment
94- shell : bash
95- run : rustup target add wasm32-wasip1
92+ with :
93+ targets : wasm32-wasip1
9694
9795 - name : Build RustPython
9896 run : cargo build --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib --release
@@ -106,6 +104,34 @@ jobs:
106104 name : rustpython-release-wasm32-wasip1
107105 path : target/rustpython-release-wasm32-wasip1.wasm
108106
107+ - name : install wasm-pack
108+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
109+ - uses : actions/setup-node@v4
110+ - uses : mwilliamson/setup-wabt-action@v3
111+ with : { wabt-version: "1.0.30" }
112+ - name : build demo
113+ run : |
114+ npm install
115+ npm run dist
116+ env :
117+ NODE_OPTIONS : " --openssl-legacy-provider"
118+ working-directory : ./wasm/demo
119+ - name : build notebook demo
120+ run : |
121+ npm install
122+ npm run dist
123+ mv dist ../demo/dist/notebook
124+ env :
125+ NODE_OPTIONS : " --openssl-legacy-provider"
126+ working-directory : ./wasm/notebook
127+ - name : Deploy demo to Github Pages
128+ uses : peaceiris/actions-gh-pages@v4
129+ with :
130+ deploy_key : ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
131+ publish_dir : ./wasm/demo/dist
132+ external_repository : RustPython/demo
133+ publish_branch : master
134+
109135 release :
110136 runs-on : ubuntu-latest
111137 needs : [build, build-wasm]
@@ -142,4 +168,4 @@ jobs:
142168 --target="$tag" \
143169 --generate-notes \
144170 $PRERELEASE_ARG \
145- bin/rustpython-release-*
171+ bin/rustpython-release-*
0 commit comments