diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 065697a..dd96d21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,13 @@ jobs: - { arch: arm64, os: macos-latest, wheel_tag: macosx_arm64 } - { arch: x86_64, os: ubuntu-latest, wheel_tag: manylinux_x86_64 } - { arch: aarch64, os: ubuntu-24.04-arm, wheel_tag: manylinux_aarch64 } + include: + - py: cp314 + platform: + arch: wasm32 + os: ubuntu-latest + wheel_tag: pyodide_wasm32 + cibw_platform: pyodide steps: - name: Download source distribution uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -68,6 +75,7 @@ jobs: with: output-dir: wheelhouse env: + CIBW_PLATFORM: ${{ matrix.platform.cibw_platform || 'auto' }} CIBW_ARCHS_MACOS: ${{ matrix.platform.arch }} CIBW_BUILD: ${{ matrix.py }}-${{ matrix.platform.wheel_tag }} CIBW_TEST_COMMAND: python -m unittest discover -v -s {package}/tests @@ -78,29 +86,6 @@ jobs: name: ${{ matrix.py }}-${{ matrix.platform.wheel_tag }} path: ./wheelhouse/*.whl - build_pyodide: - name: Build Pyodide wheel - needs: build_sdist - runs-on: ubuntu-latest - steps: - - name: Download source distribution - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: source - - name: Unpack source distribution - run: tar --strip-components 1 -xvf *.tar.gz - - name: Build and test wheel - uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0 - env: - CIBW_PLATFORM: pyodide - CIBW_BUILD: cp314-pyodide_wasm32 - CIBW_TEST_COMMAND: >- - python -c "import pypcode; assert pypcode.Context('x86:LE:64:default').translate(b'\xc3').ops" - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: cp314-pyodide_wasm32 - path: ./wheelhouse/*.whl - build_docs: name: Build docs runs-on: ubuntu-latest @@ -175,7 +160,7 @@ jobs: upload_pypi: name: Upload wheels to PyPI - needs: [lint, build_docs, build_sdist, build_wheels, build_pyodide, upload_coverage] + needs: [lint, build_docs, build_sdist, build_wheels, upload_coverage] environment: name: pypi url: https://pypi.org/p/pypcode