Skip to content

Commit 1aeeebd

Browse files
pablogsalsterliakov
authored andcommitted
[3.12] Add CI step to check changes in the exported ABI (python#92442)
Backport the workflow change and fix-ups: - pythonGH-92442 (e89c01e) - pythonGH-94129 (0dadb22) - pythonGH-98556 (194588d) Co-Authored-By: sterliakov <50529348+sterliakov@users.noreply.github.com>
1 parent 97f8547 commit 1aeeebd

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 30 additions & 0 deletions
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-20.04
81+
needs: check_source
82+
if: needs.check_source.outputs.run_tests == 'true'
83+
steps:
84+
- uses: actions/checkout@v2
85+
- uses: actions/setup-python@v2
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, please visit: https://devguide.python.org/setup/?highlight=abi#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

0 commit comments

Comments
 (0)