Skip to content

Commit c8fd3bd

Browse files
arihant2mathyouknowone
authored andcommitted
Build wasm on release
1 parent 1abaf87 commit c8fd3bd

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/release.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,31 @@ jobs:
7676
name: rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}
7777
path: target/rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}*
7878

79+
build-wasm:
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@v4
83+
- uses: dtolnay/rust-toolchain@stable
84+
85+
- name: Set up Environment
86+
shell: bash
87+
run: rustup target add wasm32-wasi
88+
89+
- name: Build RustPython
90+
run: cargo build --target wasm32-wasi --no-default-features --features freeze-stdlib,stdlib --release
91+
92+
- name: Rename Binary
93+
run: cp target/wasm32-wasi/release/rustpython.wasm target/rustpython-release-wasm32-wasi.wasm
94+
95+
- name: Upload Binary Artifacts
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: rustpython-release-wasm32-wasi
99+
path: target/rustpython-release-wasm32-wasi.wasm
100+
79101
release:
80102
runs-on: ubuntu-latest
81-
needs: build
103+
needs: [build, build-wasm]
82104
steps:
83105
- name: Download Binary Artifacts
84106
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)