@@ -42,11 +42,13 @@ jobs:
4242
4343 check_abi :
4444 name : ' Check if the ABI has changed'
45- runs-on : ubuntu-latest
45+ runs-on : ubuntu-22.04 # 24.04 causes spurious errors
4646 needs : check_source
4747 if : needs.check_source.outputs.run_tests == 'true'
4848 steps :
4949 - uses : actions/checkout@v4
50+ with :
51+ persist-credentials : false
5052 - uses : actions/setup-python@v5
5153 - name : Install dependencies
5254 run : |
@@ -83,16 +85,63 @@ jobs:
8385 name : abi-data
8486 path : ./Doc/data/*.abi
8587
88+ check_autoconf_regen :
89+ name : ' Check if Autoconf files are up to date'
90+ # Don't use ubuntu-latest but a specific version to make the job
91+ # reproducible: to get the same tools versions (autoconf, aclocal, ...)
92+ runs-on : ubuntu-24.04
93+ container :
94+ image : ghcr.io/python/autoconf:2024.10.16.11360930377
95+ timeout-minutes : 60
96+ needs : check_source
97+ if : needs.check_source.outputs.run_tests == 'true'
98+ steps :
99+ - name : Install Git
100+ run : |
101+ apt update && apt install git -yq
102+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
103+ - uses : actions/checkout@v4
104+ with :
105+ fetch-depth : 1
106+ persist-credentials : false
107+ - name : Runner image version
108+ run : echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
109+ - name : Check Autoconf and aclocal versions
110+ run : |
111+ grep "Generated by GNU Autoconf 2.71" configure
112+ grep "aclocal 1.16.5" aclocal.m4
113+ grep -q "runstatedir" configure
114+ grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
115+ - name : Regenerate autoconf files
116+ # Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
117+ run : autoreconf -ivf -Werror
118+ - name : Check for changes
119+ run : |
120+ git add -u
121+ changes=$(git status --porcelain)
122+ # Check for changes in regenerated files
123+ if test -n "$changes"; then
124+ echo "Generated files not up to date."
125+ echo "Perhaps you forgot to run make regen-configure ;)"
126+ echo "configure files must be regenerated with a specific version of autoconf."
127+ echo "$changes"
128+ echo ""
129+ git diff --staged || true
130+ exit 1
131+ fi
132+
86133 check_generated_files :
87134 name : ' Check if generated files are up to date'
88135 # Don't use ubuntu-latest but a specific version to make the job
89136 # reproducible: to get the same tools versions (autoconf, aclocal, ...)
90- runs-on : ubuntu-22 .04
137+ runs-on : ubuntu-24 .04
91138 timeout-minutes : 60
92139 needs : check_source
93140 if : needs.check_source.outputs.run_tests == 'true'
94141 steps :
95142 - uses : actions/checkout@v4
143+ with :
144+ persist-credentials : false
96145 - uses : actions/setup-python@v5
97146 with :
98147 python-version : ' 3.x'
@@ -112,19 +161,10 @@ jobs:
112161 uses : hendrikmuhs/ccache-action@v1.2
113162 with :
114163 save : false
115- - name : Check Autoconf and aclocal versions
116- run : |
117- grep "Generated by GNU Autoconf 2.71" configure
118- grep "aclocal 1.16.5" aclocal.m4
119- grep -q "runstatedir" configure
120- grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
121164 - name : Configure CPython
122165 run : |
123166 # Build Python with the libpython dynamic library
124167 ./configure --config-cache --with-pydebug --enable-shared
125- - name : Regenerate autoconf files
126- # Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
127- run : autoreconf -ivf -Werror
128168 - name : Build CPython
129169 run : |
130170 make -j4 regen-all
@@ -158,16 +198,28 @@ jobs:
158198 needs : check_source
159199 if : fromJSON(needs.check_source.outputs.run_tests)
160200 strategy :
201+ fail-fast : false
161202 matrix :
203+ os :
204+ - windows-latest
162205 arch :
163- - Win32
164- - x64
165- - arm64
206+ - x64
166207 free-threading :
167- - false
168- - true
208+ - false
209+ - true
210+ include :
211+ - os : windows-latest # FIXME(diegorusso): change to os: windows-aarch64
212+ arch : arm64
213+ free-threading : false
214+ - os : windows-latest # FIXME(diegorusso): change to os: windows-aarch64
215+ arch : arm64
216+ free-threading : true
217+ - os : windows-latest
218+ arch : Win32
219+ free-threading : false
169220 uses : ./.github/workflows/reusable-windows.yml
170221 with :
222+ os : ${{ matrix.os }}
171223 arch : ${{ matrix.arch }}
172224 free-threading : ${{ matrix.free-threading }}
173225
@@ -238,13 +290,14 @@ jobs:
238290
239291 build_ubuntu_ssltests :
240292 name : ' Ubuntu SSL tests with OpenSSL'
241- runs-on : ubuntu-22.04
293+ runs-on : ${{ matrix.os }}
242294 timeout-minutes : 60
243295 needs : check_source
244296 if : needs.check_source.outputs.run_tests == 'true'
245297 strategy :
246298 fail-fast : false
247299 matrix :
300+ os : [ubuntu-24.04]
248301 openssl_ver : [3.0.15, 3.1.7, 3.2.3, 3.3.2]
249302 env :
250303 OPENSSL_VER : ${{ matrix.openssl_ver }}
@@ -253,6 +306,8 @@ jobs:
253306 LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
254307 steps :
255308 - uses : actions/checkout@v4
309+ with :
310+ persist-credentials : false
256311 - name : Runner image version
257312 run : echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
258313 - name : Restore config.cache
@@ -274,7 +329,7 @@ jobs:
274329 uses : actions/cache@v4
275330 with :
276331 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
277- key : ${{ runner .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
332+ key : ${{ matrix .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
278333 - name : Install OpenSSL
279334 if : steps.cache-openssl.outputs.cache-hit != 'true'
280335 run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -304,7 +359,7 @@ jobs:
304359
305360 test_hypothesis :
306361 name : " Hypothesis tests on Ubuntu"
307- runs-on : ubuntu-22 .04
362+ runs-on : ubuntu-24 .04
308363 timeout-minutes : 60
309364 needs : check_source
310365 if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -313,6 +368,8 @@ jobs:
313368 PYTHONSTRICTEXTENSIONBUILD : 1
314369 steps :
315370 - uses : actions/checkout@v4
371+ with :
372+ persist-credentials : false
316373 - name : Register gcc problem matcher
317374 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
318375 - name : Install Dependencies
@@ -395,7 +452,7 @@ jobs:
395452 #
396453 # (GH-104097) test_sysconfig is skipped because it has tests that are
397454 # failing when executed from inside a virtual environment.
398- ${{ env. VENV_PYTHON }} -m test \
455+ "${ VENV_PYTHON}" -m test \
399456 -W \
400457 -o \
401458 -j4 \
@@ -417,16 +474,21 @@ jobs:
417474
418475 build_asan :
419476 name : ' Address sanitizer'
420- runs-on : ubuntu-22.04
477+ runs-on : ${{ matrix.os }}
421478 timeout-minutes : 60
422479 needs : check_source
423480 if : needs.check_source.outputs.run_tests == 'true'
481+ strategy :
482+ matrix :
483+ os : [ubuntu-24.04]
424484 env :
425485 OPENSSL_VER : 3.0.15
426486 PYTHONSTRICTEXTENSIONBUILD : 1
427487 ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
428488 steps :
429489 - uses : actions/checkout@v4
490+ with :
491+ persist-credentials : false
430492 - name : Runner image version
431493 run : echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
432494 - name : Restore config.cache
@@ -452,7 +514,7 @@ jobs:
452514 uses : actions/cache@v4
453515 with :
454516 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
455- key : ${{ runner .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
517+ key : ${{ matrix .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
456518 - name : Install OpenSSL
457519 if : steps.cache-openssl.outputs.cache-hit != 'true'
458520 run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -542,6 +604,7 @@ jobs:
542604 needs :
543605 - check_source # Transitive dependency, needed to access `run_tests` value
544606 - check-docs
607+ - check_autoconf_regen
545608 - check_generated_files
546609 - build_macos
547610 - build_ubuntu
@@ -577,6 +640,7 @@ jobs:
577640 ${{
578641 needs.check_source.outputs.run_tests != 'true'
579642 && '
643+ check_autoconf_regen,
580644 check_generated_files,
581645 build_macos,
582646 build_ubuntu,
0 commit comments