Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-87891: Add ABI check to CI #104793

Merged
merged 5 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Yhg1s marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-20.04
encukou marked this conversation as resolved.
Show resolved Hide resolved
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
encukou marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Dependencies
encukou marked this conversation as resolved.
Show resolved Hide resolved
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."
encukou marked this conversation as resolved.
Show resolved Hide resolved
echo ""
echo "To learn more about this check, please visit: https://devguide.python.org/setup/?highlight=abi#regenerate-the-abi-dump"
encukou marked this conversation as resolved.
Show resolved Hide resolved
echo ""
exit 1
fi

check_generated_files:
name: 'Check if generated files are up to date'
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading