From 7cd586d713a7e4b1a889b9b4aee1c05c89b52af8 Mon Sep 17 00:00:00 2001 From: Ashwin Naren Date: Sun, 2 Mar 2025 19:21:01 -0800 Subject: [PATCH 1/2] publish demo on weekly release --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99035d04fc..0d4b3a270c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,6 +106,28 @@ jobs: name: rustpython-release-wasm32-wasip1 path: target/rustpython-release-wasm32-wasip1.wasm + - name: install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - uses: actions/setup-node@v4 + - uses: mwilliamson/setup-wabt-action@v3 + with: { wabt-version: "1.0.30" } + - name: build notebook demo + if: github.ref == 'refs/heads/release' + run: | + npm install + npm run dist + mv dist ../demo/dist/notebook + env: + NODE_OPTIONS: "--openssl-legacy-provider" + working-directory: ./wasm/notebook + - name: Deploy demo to Github Pages + uses: peaceiris/actions-gh-pages@v4 + env: + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }} + PUBLISH_DIR: ./wasm/demo/dist + EXTERNAL_REPOSITORY: RustPython/demo + PUBLISH_BRANCH: master + release: runs-on: ubuntu-latest needs: [build, build-wasm] From 7778e3206966d9c5e075e00c68f5ffffea489fa3 Mon Sep 17 00:00:00 2001 From: Ashwin Naren Date: Sun, 2 Mar 2025 19:26:29 -0800 Subject: [PATCH 2/2] use rust-toolchain targets options instead of using rustup --- .github/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d4b3a270c..98b7de4823 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,10 +89,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - - - name: Set up Environment - shell: bash - run: rustup target add wasm32-wasip1 + with: + targets: wasm32-wasip1 - name: Build RustPython run: cargo build --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib --release @@ -112,7 +110,6 @@ jobs: - uses: mwilliamson/setup-wabt-action@v3 with: { wabt-version: "1.0.30" } - name: build notebook demo - if: github.ref == 'refs/heads/release' run: | npm install npm run dist