bpo-44035: Check autoconf files thoroughly (GH-29935)

Check that users don't push changes with outdated or patched autoconf.
The presence of runstatedir option and aclocal 1.16.3 are good markers.

Use my container image to regenerate autoconf files. "Check for changes"
will fail later when any file is regenerated.

Use ccache in check_generated_files to speed up testing.
This commit is contained in:
Christian Heimes 2021-12-06 14:18:56 +02:00 committed by GitHub
parent 299483c95d
commit 98fac8bc18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 7 deletions

View File

@ -64,6 +64,18 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
- name: Install Dependencies - name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Add ccache to PATH
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1
- name: Check Autoconf version 2.69 and aclocal 1.16.3
run: |
grep "Generated by GNU Autoconf 2.69" configure
grep "aclocal 1.16.3" aclocal.m4
grep -q "runstatedir" configure
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
- name: Regenerate autoconf files
run: docker run --rm -v $(pwd):/src quay.io/tiran/cpython_autoconf:269
- name: Build CPython - name: Build CPython
run: | run: |
# Build Python with the libpython dynamic library # Build Python with the libpython dynamic library
@ -75,9 +87,10 @@ jobs:
git add -u git add -u
changes=$(git status --porcelain) changes=$(git status --porcelain)
# Check for changes in regenerated files # Check for changes in regenerated files
if ! test -z "$changes" if test -n "$changes"; then
then echo "Generated files not up to date."
echo "Generated files not up to date. Perhaps you forgot to run make regen-all or build.bat --regen ;)" echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
echo "configure files must be regenerated with a specific, unpatched version of autoconf."
echo "$changes" echo "$changes"
exit 1 exit 1
fi fi
@ -85,10 +98,6 @@ jobs:
run: make smelly run: make smelly
- name: Check limited ABI symbols - name: Check limited ABI symbols
run: make check-limited-abi run: make check-limited-abi
- name: Check Autoconf version 2.69
run: |
grep "Generated by GNU Autoconf 2.69" configure
grep "PKG_PROG_PKG_CONFIG" aclocal.m4
build_win32: build_win32:
name: 'Windows (x86)' name: 'Windows (x86)'

2
.gitignore vendored
View File

@ -115,6 +115,8 @@ Tools/unicode/data/
/config.log /config.log
/config.status /config.status
/config.status.lineno /config.status.lineno
# hendrikmuhs/ccache-action@v1
/.ccache
/platform /platform
/profile-clean-stamp /profile-clean-stamp
/profile-run-stamp /profile-run-stamp

View File

@ -0,0 +1,2 @@
CI now verifies that autoconf files have been regenerated with a current and
unpatched autoconf package.