diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index c7910e4e..ed35d3ab 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -9,13 +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. - PYODIDE_VERSION: '314.0.0' - PYODIDE_EMSCRIPTEN_VERSION: '5.0.3' - PYODIDE_PYTHON_VERSION: '3.14' - jobs: build_wheels: name: ${{ matrix.name }} @@ -122,13 +115,26 @@ 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 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 + 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 @@ -177,7 +183,7 @@ jobs: name: Set up Emscripten toolchain uses: pyodide/setup-emsdk@ca2dd8aef8c2a0e11743c5c36f0b430ddb694b5c # v15 with: - version: ${{ env.PYODIDE_EMSCRIPTEN_VERSION }} + version: ${{ matrix.pyodide_emscripten_version }} actions-cache-folder: emsdk-cache # ------------- actual build ------------- # @@ -189,7 +195,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 }} # 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' }} @@ -209,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 @@ -269,25 +275,39 @@ 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 + pyodide_version: '314.0.8' + python_version: '3.14' + - python: cp315 + artifact_name: wheels-pyodide-cp315 + pyodide_version: '315.0.0a3' + python_version: '3.15' steps: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: - python-version: ${{ env.PYODIDE_PYTHON_VERSION }} + python-version: ${{ matrix.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 }} - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - name: wheels-pyodide + name: ${{ matrix.artifact_name }} path: wheelhouse - run: | 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"