Add CI step to check changes in the exported ABI (GH-25230)

This commit is contained in:
Pablo Galindo 2021-04-09 01:34:08 +01:00 committed by GitHub
parent a9228d02d1
commit 4d9336d114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13872 additions and 0 deletions

View File

@ -48,6 +48,28 @@ jobs:
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
fi
check_abi:
name: 'Check if the ABI has changed'
runs-on: ubuntu-20.04
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- 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
run: make check-abidump
check_generated_files:
name: 'Check if generated files are up to date'
runs-on: ubuntu-latest

13843
Doc/data/python3.9.abi Normal file

File diff suppressed because it is too large Load Diff

View File

@ -753,6 +753,13 @@ regen-importlib: Programs/_freeze_importlib
$(srcdir)/Python/importlib_zipimport.h.new
$(UPDATE_FILE) $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/importlib_zipimport.h.new
regen-abidump: all
@$(MKDIR_P) $(srcdir)/Doc/data/
abidw "libpython$(LDVERSION).so" --no-architecture --out-file $(srcdir)/Doc/data/python$(LDVERSION).abi.new
@$(UPDATE_FILE) $(srcdir)/Doc/data/python$(LDVERSION).abi $(srcdir)/Doc/data/python$(LDVERSION).abi.new
check-abidump: all
abidiff "libpython$(LDVERSION).so" $(srcdir)/Doc/data/python$(LDVERSION).abi --drop-private-types --no-architecture --no-added-syms
############################################################################
# Regenerate all generated files