From 3348be818db392e801de7585d2a3387d6684cf58 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Tue, 6 Oct 2026 15:54:08 -0700 Subject: [PATCH 1/2] ci: Fold pyodide job into build_wheels job matrix --- .github/workflows/build.yml | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 065697a..9a6af86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,15 @@ 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 + test_command: >- + python -c "import pypcode; assert pypcode.Context('x86:LE:64:default').translate(b'\xc3').ops" steps: - name: Download source distribution uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -68,9 +77,10 @@ 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 + CIBW_TEST_COMMAND: ${{ matrix.platform.test_command || 'python -m unittest discover -v -s {package}/tests' }} CIBW_BUILD_VERBOSITY: 1 MACOSX_DEPLOYMENT_TARGET: ${{ matrix.platform.arch == 'arm64' && '11' || '10.14' }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -78,29 +88,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 +162,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 From 85894e05df4fd57c563f3c17ee876e1816750e63 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Tue, 6 Oct 2026 16:04:24 -0700 Subject: [PATCH 2/2] ci: Run full test suite against pyodide build --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a6af86..dd96d21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,8 +62,6 @@ jobs: os: ubuntu-latest wheel_tag: pyodide_wasm32 cibw_platform: pyodide - test_command: >- - python -c "import pypcode; assert pypcode.Context('x86:LE:64:default').translate(b'\xc3').ops" steps: - name: Download source distribution uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -80,7 +78,7 @@ jobs: CIBW_PLATFORM: ${{ matrix.platform.cibw_platform || 'auto' }} CIBW_ARCHS_MACOS: ${{ matrix.platform.arch }} CIBW_BUILD: ${{ matrix.py }}-${{ matrix.platform.wheel_tag }} - CIBW_TEST_COMMAND: ${{ matrix.platform.test_command || 'python -m unittest discover -v -s {package}/tests' }} + CIBW_TEST_COMMAND: python -m unittest discover -v -s {package}/tests CIBW_BUILD_VERBOSITY: 1 MACOSX_DEPLOYMENT_TARGET: ${{ matrix.platform.arch == 'arm64' && '11' || '10.14' }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1