From fc8b53d3d2ebb74ee66880c0dfb24ab7a56aaf29 Mon Sep 17 00:00:00 2001 From: Geoffrey Bolmier Date: Wed, 27 Nov 2024 23:53:53 -0500 Subject: [PATCH 1/2] Add test-for-pyodide.yml workflows Let's first test the build of the WASM wheels in an independant workflow so that it is easier to iterate and make sure it works before adding the logic to the pypi workflow. --- .github/workflows/test-for-pyodide.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test-for-pyodide.yml diff --git a/.github/workflows/test-for-pyodide.yml b/.github/workflows/test-for-pyodide.yml new file mode 100644 index 0000000000..4d93a38a1e --- /dev/null +++ b/.github/workflows/test-for-pyodide.yml @@ -0,0 +1,36 @@ +name: test-for-pyodide + +on: + pull_request: + branches: + - "*" + push: + branches: + - main + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: Build wheels + uses: pypa/cibuildwheel@v2.22.0 + timeout-minutes: 720 + env: + CIBW_PLATFORM: "pyodide" + CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"' + CIBW_ENVIRONMENT_LINUX: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_NET_GIT_FETCH_WITH_CLI="true"' + CIBW_BEFORE_BUILD: > + rustup default nightly && + rustup show + CIBW_BEFORE_BUILD_LINUX: > + curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y && + rustup show + CIBW_TEST_REQUIRES: pytest pytest-xdist + CIBW_TEST_COMMAND: pytest {project} -m "not datasets" --durations=10 -n logical From c2b840e56457db5d5b08f20712d3302a050a1e7a Mon Sep 17 00:00:00 2001 From: Geoffrey Bolmier Date: Thu, 28 Nov 2024 00:03:25 -0500 Subject: [PATCH 2/2] Add rustup target add wasm32-unknown-emscripten --- .github/workflows/test-for-pyodide.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-for-pyodide.yml b/.github/workflows/test-for-pyodide.yml index 4d93a38a1e..2a0d928905 100644 --- a/.github/workflows/test-for-pyodide.yml +++ b/.github/workflows/test-for-pyodide.yml @@ -28,9 +28,7 @@ jobs: CIBW_ENVIRONMENT_LINUX: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_NET_GIT_FETCH_WITH_CLI="true"' CIBW_BEFORE_BUILD: > rustup default nightly && - rustup show - CIBW_BEFORE_BUILD_LINUX: > - curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y && + rustup target add wasm32-unknown-emscripten && rustup show CIBW_TEST_REQUIRES: pytest pytest-xdist CIBW_TEST_COMMAND: pytest {project} -m "not datasets" --durations=10 -n logical