Skip to content

Commit

Permalink
[3.12] Add CI step to check changes in the exported ABI (python#92442)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
2 people authored and encukou committed May 23, 2023
1 parent 97f8547 commit 1aeeebd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,36 @@ jobs:
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
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: |
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, please visit: https://devguide.python.org/setup/?highlight=abi#regenerate-the-abi-dump"
echo ""
exit 1
fi
check_generated_files:
name: 'Check if generated files are up to date'
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1aeeebd

Please sign in to comment.