99
99
steps :
100
100
- uses : actions/checkout@v4
101
101
- uses : actions/setup-python@v4
102
- - name : Install Dependencies
102
+ - name : Install dependencies
103
103
run : |
104
104
sudo ./.github/workflows/posix-deps-apt.sh
105
105
sudo apt-get install -yq abigail-tools
@@ -115,7 +115,7 @@ jobs:
115
115
run : |
116
116
if ! make check-abidump; then
117
117
echo "Generated ABI file is not up to date."
118
- echo "Please, add the release manager of this branch as a reviewer of this PR."
118
+ echo "Please add the release manager of this branch as a reviewer of this PR."
119
119
echo ""
120
120
echo "The up to date ABI file should be attached to this build as an artifact."
121
121
echo ""
@@ -194,159 +194,32 @@ jobs:
194
194
- name : Check limited ABI symbols
195
195
run : make check-limited-abi
196
196
197
- build_win32 :
198
- name : ' Windows (x86)'
199
- runs-on : windows-latest
200
- timeout-minutes : 60
201
- needs : check_source
202
- if : needs.check_source.outputs.run_tests == 'true'
203
- env :
204
- IncludeUwp : ' true'
205
- steps :
206
- - uses : actions/checkout@v4
207
- - name : Build CPython
208
- run : .\PCbuild\build.bat -e -d -p Win32
209
- - name : Display build info
210
- run : .\python.bat -m test.pythoninfo
211
- - name : Tests
212
- run : .\PCbuild\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
213
-
214
- build_win_amd64 :
215
- name : ' Windows (x64)'
216
- runs-on : windows-latest
217
- timeout-minutes : 60
197
+ build_windows :
198
+ name : ' Windows'
218
199
needs : check_source
219
200
if : needs.check_source.outputs.run_tests == 'true'
220
- env :
221
- IncludeUwp : ' true'
222
- steps :
223
- - uses : actions/checkout@v4
224
- - name : Register MSVC problem matcher
225
- run : echo "::add-matcher::.github/problem-matchers/msvc.json"
226
- - name : Build CPython
227
- run : .\PCbuild\build.bat -e -d -p x64
228
- - name : Display build info
229
- run : .\python.bat -m test.pythoninfo
230
- - name : Tests
231
- run : .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
232
-
233
- build_win_arm64 :
234
- name : ' Windows (arm64)'
235
- runs-on : windows-latest
236
- timeout-minutes : 60
237
- needs : check_source
238
- if : needs.check_source.outputs.run_tests == 'true'
239
- env :
240
- IncludeUwp : ' true'
241
- steps :
242
- - uses : actions/checkout@v4
243
- - name : Register MSVC problem matcher
244
- run : echo "::add-matcher::.github/problem-matchers/msvc.json"
245
- - name : Build CPython
246
- run : .\PCbuild\build.bat -e -d -p arm64
201
+ uses : ./.github/workflows/reusable-windows.yml
247
202
248
203
build_macos :
249
204
name : ' macOS'
250
- runs-on : macos-latest
251
- timeout-minutes : 60
252
205
needs : check_source
253
206
if : needs.check_source.outputs.run_tests == 'true'
254
- env :
255
- HOMEBREW_NO_ANALYTICS : 1
256
- HOMEBREW_NO_AUTO_UPDATE : 1
257
- HOMEBREW_NO_INSTALL_CLEANUP : 1
258
- PYTHONSTRICTEXTENSIONBUILD : 1
259
- steps :
260
- - uses : actions/checkout@v4
261
- - name : Restore config.cache
262
- uses : actions/cache@v3
263
- with :
264
- path : config.cache
265
- key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
266
- - name : Install Homebrew dependencies
267
- run :
brew install pkg-config [email protected] xz gdbm tcl-tk
268
- - name : Configure CPython
269
- run : |
270
- GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
271
- GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
272
- ./configure \
273
- --config-cache \
274
- --with-pydebug \
275
- --prefix=/opt/python-dev \
276
- --with-openssl="$(brew --prefix [email protected] )"
277
- - name : Build CPython
278
- run : make -j4
279
- - name : Display build info
280
- run : make pythoninfo
281
- - name : Tests
282
- run : make buildbottest TESTOPTS="-j4 -uall,-cpu"
207
+ uses : ./.github/workflows/reusable-macos.yml
208
+ with :
209
+ config_hash : ${{ needs.check_source.outputs.config_hash }}
283
210
284
211
build_ubuntu :
285
212
name : ' Ubuntu'
286
- runs-on : ubuntu-20.04
287
- timeout-minutes : 60
288
213
needs : check_source
289
214
if : needs.check_source.outputs.run_tests == 'true'
290
- env :
291
- OPENSSL_VER : 3.0.11
292
- PYTHONSTRICTEXTENSIONBUILD : 1
293
- steps :
294
- - uses : actions/checkout@v4
295
- - name : Register gcc problem matcher
296
- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
297
- - name : Install dependencies
298
- run : sudo ./.github/workflows/posix-deps-apt.sh
299
- - name : Configure OpenSSL env vars
300
- run : |
301
- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
302
- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
303
- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
304
- - name : ' Restore OpenSSL build'
305
- id : cache-openssl
306
- uses : actions/cache@v3
307
- with :
308
- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
309
- key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
310
- - name : Install OpenSSL
311
- if : steps.cache-openssl.outputs.cache-hit != 'true'
312
- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
313
- - name : Add ccache to PATH
314
- run : |
315
- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
316
- - name : Configure ccache action
317
- uses :
hendrikmuhs/[email protected]
318
- - name : Setup directory envs for out-of-tree builds
319
- run : |
320
- echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
321
- echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
322
- - name : Create directories for read-only out-of-tree builds
323
- run : mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
324
- - name : Bind mount sources read-only
325
- run : sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
326
- - name : Restore config.cache
327
- uses : actions/cache@v3
328
- with :
329
- path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
330
- key : ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
331
- - name : Configure CPython out-of-tree
332
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
333
- run : |
215
+ uses : ./.github/workflows/reusable-ubuntu.yml
216
+ with :
217
+ config_hash : ${{ needs.check_source.outputs.config_hash }}
218
+ options : |
334
219
../cpython-ro-srcdir/configure \
335
220
--config-cache \
336
221
--with-pydebug \
337
222
--with-openssl=$OPENSSL_DIR
338
- - name : Build CPython out-of-tree
339
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
340
- run : make -j4
341
- - name : Display build info
342
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
343
- run : make pythoninfo
344
- - name : Remount sources writable for tests
345
- # some tests write to srcdir, lack of pyc files slows down testing
346
- run : sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
347
- - name : Tests
348
- working-directory : ${{ env.CPYTHON_BUILDDIR }}
349
- run : xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
350
223
351
224
build_ubuntu_ssltests :
352
225
name : ' Ubuntu SSL tests with OpenSSL'
@@ -463,12 +336,10 @@ jobs:
463
336
- check_source # Transitive dependency, needed to access `run_tests` value
464
337
- check-docs
465
338
- check_generated_files
466
- - build_win32
467
- - build_win_amd64
468
- - build_win_arm64
469
339
- build_macos
470
340
- build_ubuntu
471
341
- build_ubuntu_ssltests
342
+ - build_windows
472
343
- build_asan
473
344
474
345
runs-on : ubuntu-latest
@@ -480,8 +351,6 @@ jobs:
480
351
allowed-failures : >-
481
352
build_macos,
482
353
build_ubuntu_ssltests,
483
- build_win32,
484
- build_win_arm64,
485
354
allowed-skips : >-
486
355
${{
487
356
!fromJSON(needs.check_source.outputs.run-docs)
@@ -494,12 +363,10 @@ jobs:
494
363
needs.check_source.outputs.run_tests != 'true'
495
364
&& '
496
365
check_generated_files,
497
- build_win32,
498
- build_win_amd64,
499
- build_win_arm64,
500
366
build_macos,
501
367
build_ubuntu,
502
368
build_ubuntu_ssltests,
369
+ build_windows,
503
370
build_asan,
504
371
'
505
372
|| ''
0 commit comments