mirror of
https://github.com/python/cpython
synced 2024-10-14 09:58:30 +00:00
[3.12] gh-87891: Add ABI check to CI (#104793)
Backport the workflow change and fix-ups: - GH-92442 (e89c01eac7
) - GH-94129 (0dadb2249a
) - GH-98556 (194588decc
) Co-Authored-By: sterliakov <50529348+sterliakov@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
97f8547913
commit
b44beac5e1
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
|
@ -75,6 +75,36 @@ jobs:
|
|||
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
check_abi:
|
||||
name: 'Check if the ABI has changed'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: check_source
|
||||
if: needs.check_source.outputs.run_tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- 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: |
|
||||
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 "To learn more about this check: https://devguide.python.org/setup/#regenerate-the-abi-dump"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_generated_files:
|
||||
name: 'Check if generated files are up to date'
|
||||
runs-on: ubuntu-latest
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -156,6 +156,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
|
||||
|
|
26411
Doc/data/python3.12.abi
Normal file
26411
Doc/data/python3.12.abi
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue