]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
ci: Add a cibuildwheel test run to test.yml
authorBen Darnell <ben@bendarnell.com>
Fri, 28 Feb 2025 02:45:49 +0000 (21:45 -0500)
committerBen Darnell <ben@bendarnell.com>
Fri, 28 Feb 2025 02:47:44 +0000 (21:47 -0500)
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

index 8f0114d51443f0666f991294fd53936a904dd356..2acbda0c9a990babef4813c6f979adf9f5f6db93 100644 (file)
@@ -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: ""