From 797aa733bffc4b4cd555acf2f9fb6bfc36df346f Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Thu, 27 Feb 2025 21:45:49 -0500 Subject: [PATCH] ci: Add a cibuildwheel test run to test.yml This lets us test the cibuildwheel workflow independently of the infrequently-run build.yml. It also gives us an easy way to test freethreading builds. --- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f0114d5..2acbda0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -118,3 +118,37 @@ jobs: name: Install uv - name: Run zizmor run: uvx zizmor .github/workflows + + test_cibw: + # cibuildwheel is the tool that we use for release builds in build.yml. + # Run it in the every-PR workflow because it's slightly different from our + # regular build and this gives us easier ways to test freethreading changes. + # + # Note that test_cibw and test_tox both take about a minute to run, but test_tox runs + # more tests; test_cibw spends a lot of its time installing dependencies. Replacing + # test_tox with test_cibw would entail either increasing test runtime or reducing + # test coverage. + name: Test with cibuildwheel + runs-on: ubuntu-22.04 + needs: test_quick + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Run cibuildwheel + uses: pypa/cibuildwheel@v2.22 + env: + # For speed, we only build one python version and one arch. We throw away the wheels + # built here; the real build is defined in build.yml. + CIBW_ARCHS: native + CIBW_BUILD: cp313-manylinux* + + # Alternatively, uncomment the following lines (and replace the previous CIBW_BUILD) + # to test a freethreading build of python. + #CIBW_BUILD: cp313t-manylinux* + #CIBW_ENABLE: cpython-freethreading + # I don't understand what this does but auditwheel seems to fail in this configuration. + # Since we're throwing away the wheels here, just skip it. + # TODO: When we no longer need to disable this, we can enable freethreading in + # build.yml. + #CIBW_REPAIR_WHEEL_COMMAND: "" -- 2.47.3