@@ -248,70 +248,30 @@ jobs:
248
248
249
249
build_ubuntu :
250
250
name : ' Ubuntu'
251
- runs-on : ubuntu-20.04
252
- timeout-minutes : 60
253
251
needs : check_source
254
252
if : needs.check_source.outputs.run_tests == 'true'
255
- env :
256
- OPENSSL_VER : 3.0.11
257
- PYTHONSTRICTEXTENSIONBUILD : 1
258
- steps :
259
- - uses : actions/checkout@v4
260
- - name : Register gcc problem matcher
261
- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
262
- - name : Install dependencies
263
- run : sudo ./.github/workflows/posix-deps-apt.sh
264
- - name : Configure OpenSSL env vars
265
- run : |
266
- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
267
- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
268
- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
269
- - name : ' Restore OpenSSL build'
270
- id : cache-openssl
271
- uses : actions/cache@v3
272
- with :
273
- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
274
- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
275
- - name : Install OpenSSL
276
- if : steps.cache-openssl.outputs.cache-hit != 'true'
277
- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
278
- - name : Add ccache to PATH
279
- run : |
280
- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
281
- - name : Configure ccache action
282
- uses : hendrikmuhs/ccache-action@v1.2
283
- - name : Setup directory envs for out-of-tree builds
284
- run : |
285
- echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
286
- echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
287
- - name : Create directories for read-only out-of-tree builds
288
- run : mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
289
- - name : Bind mount sources read-only
290
- run : sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
291
- - name : Restore config.cache
292
- uses : actions/cache@v3
293
- with :
294
- path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
295
- key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
296
- - name : Configure CPython out-of-tree
297
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
298
- run : |
253
+ uses : ./.github/workflows/reusable-build-ubuntu.yml
254
+ with :
255
+ config_hash : ${{ needs.check_source.outputs.config_hash }}
256
+ options : |
299
257
../cpython-ro-srcdir/configure \
300
258
--config-cache \
301
259
--with-pydebug \
302
260
--with-openssl=$OPENSSL_DIR
303
- - name : Build CPython out-of-tree
304
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
305
- run : make -j4
306
- - name : Display build info
307
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
308
- run : make pythoninfo
309
- - name : Remount sources writable for tests
310
- # some tests write to srcdir, lack of pyc files slows down testing
311
- run : sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
312
- - name : Tests
313
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
314
- run : xvfb-run make test
261
+
262
+ build_ubuntu_free_threaded :
263
+ name : ' Ubuntu (free-threaded)'
264
+ needs : check_source
265
+ if : needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
266
+ uses : ./.github/workflows/reusable-build-ubuntu.yml
267
+ with :
268
+ config_hash : ${{ needs.check_source.outputs.config_hash }}
269
+ options : |
270
+ ../cpython-ro-srcdir/configure \
271
+ --config-cache \
272
+ --with-pydebug \
273
+ --with-openssl=$OPENSSL_DIR \
274
+ --disable-gil
315
275
316
276
build_ubuntu_ssltests :
317
277
name : ' Ubuntu SSL tests with OpenSSL'
@@ -582,6 +542,7 @@ jobs:
582
542
- build_win_arm64
583
543
- build_macos
584
544
- build_ubuntu
545
+ - build_ubuntu_free_threaded
585
546
- build_ubuntu_ssltests
586
547
- test_hypothesis
587
548
- build_asan
@@ -595,6 +556,7 @@ jobs:
595
556
with :
596
557
allowed-failures : >-
597
558
build_macos,
559
+ build_ubuntu_free_threaded,
598
560
build_ubuntu_ssltests,
599
561
build_win32,
600
562
build_win_arm64,
@@ -617,6 +579,7 @@ jobs:
617
579
build_win_arm64,
618
580
build_macos,
619
581
build_ubuntu,
582
+ build_ubuntu_free_threaded,
620
583
build_ubuntu_ssltests,
621
584
build_asan,
622
585
'
0 commit comments