diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8cba0b0..7ab28a2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -75,6 +75,18 @@ jobs: key: cpython-wasi enableCrossOsArchive: true + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.config.maturin_target }} + args: --release --out dist --features pyo3 + manylinux: 2_28 + docker-options: -v /opt/wasi-sdk:/opt/wasi-sdk + before-script-linux: | + rustup install nightly + rustup component add rust-src --toolchain nightly + rustup target add wasm32-wasip1 wasm32-unknown-unknown + - name: Lint shell: bash run: bash .github/workflows/lint.sh diff --git a/build.rs b/build.rs index 1d1c79b..44b4c51 100644 --- a/build.rs +++ b/build.rs @@ -103,6 +103,12 @@ fn package_all_the_things(out_dir: &Path) -> Result<()> { make_pyo3_config(&repo_dir)?; + let mut target_list_command = Command::new("rustc"); + target_list_command.arg("--print") + .arg("target-list"); + let status = target_list_command.status()?; + assert!(status.success()); + let mut cmd = Command::new("rustup"); cmd.current_dir("runtime") .arg("run") @@ -112,7 +118,7 @@ fn package_all_the_things(out_dir: &Path) -> Result<()> { .arg("-Z") .arg("build-std=panic_abort,std") .arg("--release") - .arg("--target=wasm32-wasi"); + .arg("--target=wasm32-wasip1"); for (key, _) in env::vars_os() { if key