|
91 | 91 | name: abi-data
|
92 | 92 | path: ./Doc/data/*.abi
|
93 | 93 |
|
| 94 | + check_autoconf_regen: |
| 95 | + name: 'Check if Autoconf files are up to date' |
| 96 | + # Don't use ubuntu-latest but a specific version to make the job |
| 97 | + # reproducible: to get the same tools versions (autoconf, aclocal, ...) |
| 98 | + runs-on: ubuntu-24.04 |
| 99 | + container: |
| 100 | + image: ghcr.io/python/autoconf:2024.10.11.11293396815 |
| 101 | + timeout-minutes: 60 |
| 102 | + needs: check_source |
| 103 | + if: needs.check_source.outputs.run_tests == 'true' |
| 104 | + steps: |
| 105 | + - name: Install Git |
| 106 | + run: | |
| 107 | + apt install git -yq |
| 108 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 109 | + - uses: actions/checkout@v4 |
| 110 | + with: |
| 111 | + fetch-depth: 1 |
| 112 | + - name: Runner image version |
| 113 | + run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV |
| 114 | + - name: Check Autoconf and aclocal versions |
| 115 | + run: | |
| 116 | + grep "Generated by GNU Autoconf 2.71" configure |
| 117 | + grep "aclocal 1.16.5" aclocal.m4 |
| 118 | + grep -q "runstatedir" configure |
| 119 | + grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 |
| 120 | + - name: Regenerate autoconf files |
| 121 | + # Same command used by Tools/build/regen-configure.sh ($AUTORECONF) |
| 122 | + run: autoreconf -ivf -Werror |
| 123 | + - name: Check for changes |
| 124 | + run: | |
| 125 | + git add -u |
| 126 | + changes=$(git status --porcelain) |
| 127 | + # Check for changes in regenerated files |
| 128 | + if test -n "$changes"; then |
| 129 | + echo "Generated files not up to date." |
| 130 | + echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)" |
| 131 | + echo "configure files must be regenerated with a specific version of autoconf." |
| 132 | + echo "$changes" |
| 133 | + echo "" |
| 134 | + git diff --staged || true |
| 135 | + exit 1 |
| 136 | + fi |
| 137 | +
|
94 | 138 | check_generated_files:
|
95 | 139 | name: 'Check if generated files are up to date'
|
96 | 140 | # Don't use ubuntu-latest but a specific version to make the job
|
@@ -119,19 +163,10 @@ jobs:
|
119 | 163 | uses: hendrikmuhs/[email protected]
|
120 | 164 | with:
|
121 | 165 | save: false
|
122 |
| - - name: Check Autoconf and aclocal versions |
123 |
| - run: | |
124 |
| - grep "Generated by GNU Autoconf 2.71" configure |
125 |
| - grep "aclocal 1.16.5" aclocal.m4 |
126 |
| - grep -q "runstatedir" configure |
127 |
| - grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4 |
128 | 166 | - name: Configure CPython
|
129 | 167 | run: |
|
130 | 168 | # Build Python with the libpython dynamic library
|
131 | 169 | ./configure --config-cache --with-pydebug --enable-shared
|
132 |
| - - name: Regenerate autoconf files |
133 |
| - # Same command used by Tools/build/regen-configure.sh ($AUTORECONF) |
134 |
| - run: autoreconf -ivf -Werror |
135 | 170 | - name: Build CPython
|
136 | 171 | run: |
|
137 | 172 | # Deepfreeze will usually cause global objects to be added or removed,
|
|
0 commit comments