]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Merge Ubuntu test matrices in CI (GH-121813) (#122116)
authorSviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Mon, 22 Jul 2024 14:05:41 +0000 (16:05 +0200)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2024 14:05:41 +0000 (08:05 -0600)
.github/workflows/build.yml
.github/workflows/reusable-ubuntu.yml

index e043dc4da1a78ffe4b3c242581a8733f2474d438..17fc270bcc5d0334db6f7e2a6a4ec28731bd9870 100644 (file)
@@ -267,17 +267,20 @@ jobs:
       os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
 
   build_ubuntu:
-    name: 'Ubuntu'
+    name: >-
+      Ubuntu
+      ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
     needs: check_source
     if: needs.check_source.outputs.run_tests == 'true'
+    strategy:
+      matrix:
+        free-threading:
+        - false
+        # - true
     uses: ./.github/workflows/reusable-ubuntu.yml
     with:
       config_hash: ${{ needs.check_source.outputs.config_hash }}
-      options: |
-        ../cpython-ro-srcdir/configure \
-          --config-cache \
-          --with-pydebug \
-          --with-openssl=$OPENSSL_DIR
+      free-threading: ${{ matrix.free-threading }}
 
   build_ubuntu_ssltests:
     name: 'Ubuntu SSL tests with OpenSSL'
index 0dbfcabaa8755ec4d0671ea8383cd305a86096ab..dd47a380da1e77e32ca0d559689a049bc19f0910 100644 (file)
@@ -4,9 +4,11 @@ on:
       config_hash:
         required: true
         type: string
-      options:
-        required: true
-        type: string
+      free-threading:
+        description: Whether to use free-threaded mode
+        required: false
+        type: boolean
+        default: false
 
 jobs:
   build_ubuntu_reusable:
@@ -61,7 +63,12 @@ jobs:
         key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
     - name: Configure CPython out-of-tree
       working-directory: ${{ env.CPYTHON_BUILDDIR }}
-      run: ${{ inputs.options }}
+      run: >-
+        ../cpython-ro-srcdir/configure
+        --config-cache
+        --with-pydebug
+        --with-openssl=$OPENSSL_DIR
+        ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
     - name: Build CPython out-of-tree
       working-directory: ${{ env.CPYTHON_BUILDDIR }}
       run: make -j4