[3.14] Forward-port 'check-abi' CI job from 3.13 (GH-133614)

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

The only difference from the 3.13 job is the addition of `with.python-version: 3.x`
to the `setup-python` configuration to pacify a warning.
This commit is contained in:
Zachary Ware 2025-05-07 16:35:46 -05:00 committed by GitHub
parent 7504fe61b8
commit 0eb2291a7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31388 additions and 3 deletions

View file

@ -43,6 +43,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@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo ./.github/workflows/posix-deps-apt.sh
sudo apt-get install -yq 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@v4
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

3
.gitignore vendored
View file

@ -170,6 +170,3 @@ Python/frozen_modules/MANIFEST
# Ignore ./python binary on Unix but still look into ./Python/ directory.
/python
!/Python/
# main branch only: ABI files are not checked/maintained.
Doc/data/python*.abi

31341
Doc/data/python3.14.abi Normal file

File diff suppressed because it is too large Load diff