Skip to content

Commit 82b8137

Browse files
miss-islingtonwebknjazhugovk
authored
[3.13] Merge Ubuntu test matrices in CI (GH-121813) (#122098)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent e458268 commit 82b8137

File tree

2 files changed

+20
-26
lines changed

2 files changed

+20
-26
lines changed

.github/workflows/build.yml

+9-22
Original file line numberDiff line numberDiff line change
@@ -242,31 +242,20 @@ jobs:
242242
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
243243

244244
build_ubuntu:
245-
name: 'Ubuntu'
246-
needs: check_source
247-
if: needs.check_source.outputs.run_tests == 'true'
248-
uses: ./.github/workflows/reusable-ubuntu.yml
249-
with:
250-
config_hash: ${{ needs.check_source.outputs.config_hash }}
251-
options: |
252-
../cpython-ro-srcdir/configure \
253-
--config-cache \
254-
--with-pydebug \
255-
--with-openssl=$OPENSSL_DIR
256-
257-
build_ubuntu_free_threading:
258-
name: 'Ubuntu (free-threading)'
245+
name: >-
246+
Ubuntu
247+
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
259248
needs: check_source
260249
if: needs.check_source.outputs.run_tests == 'true'
250+
strategy:
251+
matrix:
252+
free-threading:
253+
- false
254+
- true
261255
uses: ./.github/workflows/reusable-ubuntu.yml
262256
with:
263257
config_hash: ${{ needs.check_source.outputs.config_hash }}
264-
options: |
265-
../cpython-ro-srcdir/configure \
266-
--config-cache \
267-
--with-pydebug \
268-
--with-openssl=$OPENSSL_DIR \
269-
--disable-gil
258+
free-threading: ${{ matrix.free-threading }}
270259

271260
build_ubuntu_ssltests:
272261
name: 'Ubuntu SSL tests with OpenSSL'
@@ -578,7 +567,6 @@ jobs:
578567
- build_macos
579568
- build_macos_free_threading
580569
- build_ubuntu
581-
- build_ubuntu_free_threading
582570
- build_ubuntu_ssltests
583571
- build_wasi
584572
- build_windows
@@ -613,7 +601,6 @@ jobs:
613601
build_macos,
614602
build_macos_free_threading,
615603
build_ubuntu,
616-
build_ubuntu_free_threading,
617604
build_ubuntu_ssltests,
618605
build_wasi,
619606
build_windows,

.github/workflows/reusable-ubuntu.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
config_hash:
55
required: true
66
type: string
7-
options:
8-
required: true
9-
type: string
7+
free-threading:
8+
description: Whether to use free-threaded mode
9+
required: false
10+
type: boolean
11+
default: false
1012

1113
jobs:
1214
build_ubuntu_reusable:
@@ -63,7 +65,12 @@ jobs:
6365
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
6466
- name: Configure CPython out-of-tree
6567
working-directory: ${{ env.CPYTHON_BUILDDIR }}
66-
run: ${{ inputs.options }}
68+
run: >-
69+
../cpython-ro-srcdir/configure
70+
--config-cache
71+
--with-pydebug
72+
--with-openssl=$OPENSSL_DIR
73+
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
6774
- name: Build CPython out-of-tree
6875
working-directory: ${{ env.CPYTHON_BUILDDIR }}
6976
run: make -j4

0 commit comments

Comments
 (0)