Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b44beac

Browse files
encukousterliakovhugovkpablogsal
authored
[3.12] gh-87891: Add ABI check to CI (#104793)
Backport the workflow change and fix-ups: - GH-92442 (e89c01e) - GH-94129 (0dadb22) - GH-98556 (194588d) Co-Authored-By: sterliakov <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
1 parent 97f8547 commit b44beac

File tree

3 files changed

+26441
-3
lines changed

3 files changed

+26441
-3
lines changed

.github/workflows/build.yml

+30
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,36 @@ jobs:
7575
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
7676
fi
7777
78+
check_abi:
79+
name: 'Check if the ABI has changed'
80+
runs-on: ubuntu-22.04
81+
needs: check_source
82+
if: needs.check_source.outputs.run_tests == 'true'
83+
steps:
84+
- uses: actions/checkout@v3
85+
- uses: actions/setup-python@v4
86+
- name: Install dependencies
87+
run: |
88+
sudo ./.github/workflows/posix-deps-apt.sh
89+
sudo apt-get install -yq abigail-tools
90+
- name: Build CPython
91+
env:
92+
CFLAGS: -g3 -O0
93+
run: |
94+
# Build Python with the libpython dynamic library
95+
./configure --enable-shared
96+
make -j4
97+
- name: Check for changes in the ABI
98+
run: |
99+
if ! make check-abidump; then
100+
echo "Generated ABI file is not up to date."
101+
echo "Please add the release manager of this branch as a reviewer of this PR."
102+
echo ""
103+
echo "To learn more about this check: https://devguide.python.org/setup/#regenerate-the-abi-dump"
104+
echo ""
105+
exit 1
106+
fi
107+
78108
check_generated_files:
79109
name: 'Check if generated files are up to date'
80110
runs-on: ubuntu-latest

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,3 @@ Python/frozen_modules/MANIFEST
156156
# Ignore ./python binary on Unix but still look into ./Python/ directory.
157157
/python
158158
!/Python/
159-
160-
# main branch only: ABI files are not checked/maintained
161-
Doc/data/python*.abi

0 commit comments

Comments
 (0)