From 21157b2ada4f0cab73f1a2e3899598fde3fc2cb5 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 3 Dec 2026 03:33:51 +0530 Subject: [PATCH 1/4] Build and test wheels for Pyodide 315 (2026_5 ABI) --- .github/workflows/buildwheel.yml | 39 +++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index c7910e4e..95ef6345 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -11,8 +11,9 @@ permissions: env: # These values need to be kept in sync. Each Pyodide version pins an - # Emscripten version and a CPython version. - PYODIDE_VERSION: '314.0.0' + # Emscripten version and a CPython version. The cp315 jobs below set + # their own. + PYODIDE_VERSION: '314.0.8' PYODIDE_EMSCRIPTEN_VERSION: '5.0.3' PYODIDE_PYTHON_VERSION: '3.14' @@ -130,6 +131,16 @@ jobs: cibw_build: "cp314-*" cibw_config_settings: "build-dir=flint_wasm_build setup-args=-Dflint_version_check=false" + - name: Build Pyodide wheels (cp315) + os: ubuntu-22.04 + kind: pyodide + artifact_name: wheels-pyodide-cp315 + cibw_platform: pyodide + cibw_build: "cp315-*" + cibw_config_settings: "build-dir=flint_wasm_build setup-args=-Dflint_version_check=false" + pyodide_version: '315.0.0a3' + pyodide_emscripten_version: '6.0.5' + steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -177,7 +188,7 @@ jobs: name: Set up Emscripten toolchain uses: pyodide/setup-emsdk@ca2dd8aef8c2a0e11743c5c36f0b430ddb694b5c # v15 with: - version: ${{ env.PYODIDE_EMSCRIPTEN_VERSION }} + version: ${{ matrix.pyodide_emscripten_version || env.PYODIDE_EMSCRIPTEN_VERSION }} actions-cache-folder: emsdk-cache # ------------- actual build ------------- # @@ -189,7 +200,7 @@ jobs: CIBW_PLATFORM: ${{ matrix.cibw_platform }} CIBW_BUILD: ${{ matrix.cibw_build }} CIBW_CONFIG_SETTINGS: ${{ matrix.cibw_config_settings }} - CIBW_PYODIDE_VERSION: ${{ env.PYODIDE_VERSION }} + CIBW_PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} # override setting in pyproject.toml to use msys2 instead of msys64 bash CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.os == 'windows-11-arm' && 'msys2 -c bin/cibw_before_all_windows_arm64.sh' || 'msys2 -c bin/cibw_before_all_windows_amd64.sh' }} @@ -269,25 +280,37 @@ jobs: test_pyodide: needs: build_wheels - name: Test Pyodide wheel + name: Test Pyodide wheel (${{ matrix.python }}) runs-on: ubuntu-22.04 permissions: {} + strategy: + fail-fast: false + matrix: + include: + - python: cp314 + artifact_name: wheels-pyodide + - python: cp315 + artifact_name: wheels-pyodide-cp315 + pyodide_version: '315.0.0a3' + pyodide_python_version: '3.15' steps: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: - python-version: ${{ env.PYODIDE_PYTHON_VERSION }} + python-version: ${{ matrix.pyodide_python_version || env.PYODIDE_PYTHON_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: '22' + node-version: '24' - run: pip install pyodide-build - run: pyodide xbuildenv install "$PYODIDE_VERSION" + env: + PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - name: wheels-pyodide + name: ${{ matrix.artifact_name }} path: wheelhouse - run: | From 95f0cff3e5ad9327f974052c6e9c3b4c61128d99 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 3 Dec 2026 04:20:50 +0530 Subject: [PATCH 2/4] Fix Emscripten version passthrough --- .github/workflows/buildwheel.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 95ef6345..aad382a0 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -201,6 +201,9 @@ jobs: CIBW_BUILD: ${{ matrix.cibw_build }} CIBW_CONFIG_SETTINGS: ${{ matrix.cibw_config_settings }} CIBW_PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} + # pyodide-build reads these two from the environment as well + PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} + PYODIDE_EMSCRIPTEN_VERSION: ${{ matrix.pyodide_emscripten_version || env.PYODIDE_EMSCRIPTEN_VERSION }} # override setting in pyproject.toml to use msys2 instead of msys64 bash CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.os == 'windows-11-arm' && 'msys2 -c bin/cibw_before_all_windows_arm64.sh' || 'msys2 -c bin/cibw_before_all_windows_amd64.sh' }} @@ -292,6 +295,7 @@ jobs: - python: cp315 artifact_name: wheels-pyodide-cp315 pyodide_version: '315.0.0a3' + pyodide_emscripten_version: '6.0.5' pyodide_python_version: '3.15' steps: @@ -319,6 +323,9 @@ jobs: pip install wheelhouse/*.whl pip install pytest hypothesis python -m pytest -svra -p no:cacheprovider --pyargs flint + env: + PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} + PYODIDE_EMSCRIPTEN_VERSION: ${{ matrix.pyodide_emscripten_version || env.PYODIDE_EMSCRIPTEN_VERSION }} # On new enough Ubuntu we can build against the system deb. test_pip_flint_deb: From fcab12ea62eef84ebf8b1d3f5aa5cf05e88bda50 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 3 Dec 2026 05:26:28 +0530 Subject: [PATCH 3/4] Update buildwheel.yml --- .github/workflows/buildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index aad382a0..f2f4d9bc 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -123,7 +123,7 @@ jobs: cibw_build: "cp310-*" cibw_config_settings: "setup-args=-Dpython.allow_limited_api=true" - - name: Build Pyodide wheels + - name: Build Pyodide wheels (cp314) os: ubuntu-22.04 kind: pyodide artifact_name: wheels-pyodide From 4d0d505402b86c712c95f55174114fa7e880b2c9 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 3 Dec 2026 06:16:16 +0530 Subject: [PATCH 4/4] Clean up env vars --- .github/workflows/buildwheel.yml | 32 +++++++++++--------------------- pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index f2f4d9bc..ed35d3ab 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -9,14 +9,6 @@ concurrency: permissions: contents: read -env: - # These values need to be kept in sync. Each Pyodide version pins an - # Emscripten version and a CPython version. The cp315 jobs below set - # their own. - PYODIDE_VERSION: '314.0.8' - PYODIDE_EMSCRIPTEN_VERSION: '5.0.3' - PYODIDE_PYTHON_VERSION: '3.14' - jobs: build_wheels: name: ${{ matrix.name }} @@ -130,6 +122,9 @@ jobs: cibw_platform: pyodide cibw_build: "cp314-*" cibw_config_settings: "build-dir=flint_wasm_build setup-args=-Dflint_version_check=false" + # Each Pyodide version pins an Emscripten version + pyodide_version: '314.0.8' + pyodide_emscripten_version: '5.0.3' - name: Build Pyodide wheels (cp315) os: ubuntu-22.04 @@ -188,7 +183,7 @@ jobs: name: Set up Emscripten toolchain uses: pyodide/setup-emsdk@ca2dd8aef8c2a0e11743c5c36f0b430ddb694b5c # v15 with: - version: ${{ matrix.pyodide_emscripten_version || env.PYODIDE_EMSCRIPTEN_VERSION }} + version: ${{ matrix.pyodide_emscripten_version }} actions-cache-folder: emsdk-cache # ------------- actual build ------------- # @@ -200,10 +195,7 @@ jobs: CIBW_PLATFORM: ${{ matrix.cibw_platform }} CIBW_BUILD: ${{ matrix.cibw_build }} CIBW_CONFIG_SETTINGS: ${{ matrix.cibw_config_settings }} - CIBW_PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} - # pyodide-build reads these two from the environment as well - PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} - PYODIDE_EMSCRIPTEN_VERSION: ${{ matrix.pyodide_emscripten_version || env.PYODIDE_EMSCRIPTEN_VERSION }} + CIBW_PYODIDE_VERSION: ${{ matrix.pyodide_version }} # override setting in pyproject.toml to use msys2 instead of msys64 bash CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.os == 'windows-11-arm' && 'msys2 -c bin/cibw_before_all_windows_arm64.sh' || 'msys2 -c bin/cibw_before_all_windows_amd64.sh' }} @@ -223,7 +215,7 @@ jobs: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: - python-version: ${{ env.PYODIDE_PYTHON_VERSION }} + python-version: '3.14' - run: bin/install_latest_flint_ubuntu.sh - run: pip install build @@ -292,16 +284,17 @@ jobs: include: - python: cp314 artifact_name: wheels-pyodide + pyodide_version: '314.0.8' + python_version: '3.14' - python: cp315 artifact_name: wheels-pyodide-cp315 pyodide_version: '315.0.0a3' - pyodide_emscripten_version: '6.0.5' - pyodide_python_version: '3.15' + python_version: '3.15' steps: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: - python-version: ${{ matrix.pyodide_python_version || env.PYODIDE_PYTHON_VERSION }} + python-version: ${{ matrix.python_version }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: @@ -310,7 +303,7 @@ jobs: - run: pip install pyodide-build - run: pyodide xbuildenv install "$PYODIDE_VERSION" env: - PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} + PYODIDE_VERSION: ${{ matrix.pyodide_version }} - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: @@ -323,9 +316,6 @@ jobs: pip install wheelhouse/*.whl pip install pytest hypothesis python -m pytest -svra -p no:cacheprovider --pyargs flint - env: - PYODIDE_VERSION: ${{ matrix.pyodide_version || env.PYODIDE_VERSION }} - PYODIDE_EMSCRIPTEN_VERSION: ${{ matrix.pyodide_emscripten_version || env.PYODIDE_EMSCRIPTEN_VERSION }} # On new enough Ubuntu we can build against the system deb. test_pip_flint_deb: diff --git a/pyproject.toml b/pyproject.toml index 55e50857..1bb05b6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -176,7 +176,7 @@ repair-wheel-command = [ ] [tool.cibuildwheel.pyodide] -# pyodide version is set in .github/workflows/buildwheel.yml as PYODIDE_VERSION +# pyodide version is set in .github/workflows/buildwheel.yml as pyodide_version before-all = "bin/cibw_before_all_pyodide.sh" before-build = "bin/cibw_before_build_pyodide.sh"