[3.15] Forward-port 'check-abi' CI job from 3.14 (GH-149517)

Also add the python3.15.abi file as generated by the new job and remove
the 'main branch only' entry from .gitignore.

(adapted from commit 0eb2291a7e)
This commit is contained in:
Zachary Ware 2026-05-07 17:15:06 -05:00 committed by GitHub
parent e81025e6d2
commit 4caee143d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33538 additions and 4 deletions

View file

@ -49,6 +49,53 @@ jobs:
if: fromJSON(needs.build-context.outputs.run-docs)
uses: ./.github/workflows/reusable-docs.yml
check-abi:
name: 'Check if the ABI has changed'
runs-on: ubuntu-22.04 # 24.04 causes spurious errors
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo ./.github/workflows/posix-deps-apt.sh
sudo apt-get install -yq --no-install-recommends abigail-tools
- name: Build CPython
env:
CFLAGS: -g3 -O0
run: |
# Build Python with the libpython dynamic library
./configure --enable-shared
make -j4
- name: Check for changes in the ABI
id: check
run: |
if ! make check-abidump; then
echo "Generated ABI file is not up to date."
echo "Please add the release manager of this branch as a reviewer of this PR."
echo ""
echo "The up to date ABI file should be attached to this build as an artifact."
echo ""
echo "To learn more about this check: https://devguide.python.org/getting-started/setup-building/index.html#regenerate-the-abi-dump"
echo ""
exit 1
fi
- name: Generate updated ABI files
if: ${{ failure() && steps.check.conclusion == 'failure' }}
run: |
make regen-abidump
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
name: Publish updated ABI files
if: ${{ failure() && steps.check.conclusion == 'failure' }}
with:
name: abi-data
path: ./Doc/data/*.abi
check-autoconf-regen:
name: 'Check if Autoconf files are up to date'
# Don't use ubuntu-latest but a specific version to make the job

4
.gitignore vendored
View file

@ -177,7 +177,3 @@ Python/frozen_modules/MANIFEST
# People's custom https://docs.anthropic.com/en/docs/claude-code/memory configs.
/.claude/
CLAUDE.local.md
#### main branch only stuff below this line, things to backport go above. ####
# main branch only: ABI files are not checked/maintained.
Doc/data/python*.abi

33491
Doc/data/python3.15.abi Normal file

File diff suppressed because it is too large Load diff