File tree 3 files changed +29613
-2
lines changed
3 files changed +29613
-2
lines changed Original file line number Diff line number Diff line change 40
40
if : fromJSON(needs.check_source.outputs.run-docs)
41
41
uses : ./.github/workflows/reusable-docs.yml
42
42
43
+ check_abi :
44
+ name : ' Check if the ABI has changed'
45
+ runs-on : ubuntu-latest
46
+ needs : check_source
47
+ if : needs.check_source.outputs.run_tests == 'true'
48
+ steps :
49
+ - uses : actions/checkout@v4
50
+ - uses : actions/setup-python@v5
51
+ - name : Install dependencies
52
+ run : |
53
+ sudo ./.github/workflows/posix-deps-apt.sh
54
+ sudo apt-get install -yq abigail-tools
55
+ - name : Build CPython
56
+ env :
57
+ CFLAGS : -g3 -O0
58
+ run : |
59
+ # Build Python with the libpython dynamic library
60
+ ./configure --enable-shared
61
+ make -j4
62
+ - name : Check for changes in the ABI
63
+ id : check
64
+ run : |
65
+ if ! make check-abidump; then
66
+ echo "Generated ABI file is not up to date."
67
+ echo "Please add the release manager of this branch as a reviewer of this PR."
68
+ echo ""
69
+ echo "The up to date ABI file should be attached to this build as an artifact."
70
+ echo ""
71
+ echo "To learn more about this check: https://devguide.python.org/getting-started/setup-building/index.html#regenerate-the-abi-dump"
72
+ echo ""
73
+ exit 1
74
+ fi
75
+ - name : Generate updated ABI files
76
+ if : ${{ failure() && steps.check.conclusion == 'failure' }}
77
+ run : |
78
+ make regen-abidump
79
+ - uses : actions/upload-artifact@v4
80
+ name : Publish updated ABI files
81
+ if : ${{ failure() && steps.check.conclusion == 'failure' }}
82
+ with :
83
+ name : abi-data
84
+ path : ./Doc/data/*.abi
85
+
43
86
check_generated_files :
44
87
name : ' Check if generated files are up to date'
45
88
# Don't use ubuntu-latest but a specific version to make the job
Original file line number Diff line number Diff line change @@ -169,5 +169,3 @@ Python/frozen_modules/MANIFEST
169
169
/python
170
170
! /Python /
171
171
172
- # main branch only: ABI files are not checked/maintained.
173
- Doc /data /python * .abi
You can’t perform that action at this time.
0 commit comments