Skip to content

Commit 0574bc9

Browse files
committed
Separate workflow for autoconf temporary
1 parent 3a54872 commit 0574bc9

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,43 @@ jobs:
4040
if: fromJSON(needs.check_source.outputs.run-docs)
4141
uses: ./.github/workflows/reusable-docs.yml
4242

43-
check_generated_files:
43+
check_autoconf_regen:
4444
name: 'Check if generated files are up to date'
4545
# Don't use ubuntu-latest but a specific version to make the job
4646
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
4747
runs-on: ubuntu-24.04
4848
container:
4949
image: ghcr.io/python/autoconf:2024.10.11.11293396815
50-
env:
51-
DEBIAN_FRONTEND: noninteractive
50+
timeout-minutes: 60
51+
needs: check_source
52+
if: needs.check_source.outputs.run_tests == 'true'
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Runner image version
56+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
57+
- name: Regenerate autoconf files
58+
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
59+
run: autoreconf -ivf -Werror
60+
- name: Check for changes
61+
run: |
62+
git add -u
63+
changes=$(git status --porcelain)
64+
# Check for changes in regenerated files
65+
if test -n "$changes"; then
66+
echo "Generated files not up to date."
67+
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
68+
echo "configure files must be regenerated with a specific version of autoconf."
69+
echo "$changes"
70+
echo ""
71+
git diff --staged || true
72+
exit 1
73+
fi
74+
75+
check_generated_files:
76+
name: 'Check if generated files are up to date'
77+
# Don't use ubuntu-latest but a specific version to make the job
78+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
79+
runs-on: ubuntu-24.04
5280
timeout-minutes: 60
5381
needs: check_source
5482
if: needs.check_source.outputs.run_tests == 'true'
@@ -83,9 +111,6 @@ jobs:
83111
run: |
84112
# Build Python with the libpython dynamic library
85113
./configure --config-cache --with-pydebug --enable-shared
86-
- name: Regenerate autoconf files
87-
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
88-
run: autoreconf -ivf -Werror
89114
- name: Build CPython
90115
run: |
91116
make -j4 regen-all

0 commit comments

Comments
 (0)