Skip to content

Commit 9da3502

Browse files
authored
[3.7] Fix the Windows CI config. (GH-96490)
* Add ABI and generated files checks to CI. * Fix the Windows CI config. This matches what 3.8 did in 899eb41.
1 parent bb8e49b commit 9da3502

File tree

3 files changed

+14676
-3
lines changed

3 files changed

+14676
-3
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,70 @@ jobs:
1818
run_tests: ${{ steps.check.outputs.run_tests }}
1919
steps:
2020
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 1000
2123
- name: Check for source changes
2224
id: check
2325
run: |
2426
if [ -z "$GITHUB_BASE_REF" ]; then
2527
echo '::set-output name=run_tests::true'
2628
else
27-
git fetch origin $GITHUB_BASE_REF --depth=1
29+
git fetch origin $GITHUB_BASE_REF
2830
git diff --name-only origin/$GITHUB_BASE_REF... | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
2931
fi
32+
33+
check_abi:
34+
name: 'Check if the ABI has changed'
35+
runs-on: ubuntu-20.04
36+
needs: check_source
37+
if: needs.check_source.outputs.run_tests == 'true'
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: actions/setup-python@v2
41+
- name: Install Dependencies
42+
run: |
43+
sudo ./.github/workflows/posix-deps-apt.sh
44+
sudo apt-get install -yq abigail-tools
45+
- name: Build CPython
46+
env:
47+
CFLAGS: -g3 -O0
48+
run: |
49+
# Build Python with the libpython dynamic library
50+
./configure --enable-shared
51+
make -j4
52+
- name: Check for changes in the ABI
53+
run: make check-abidump
54+
55+
check_generated_files:
56+
name: 'Check if generated files are up to date'
57+
runs-on: ubuntu-latest
58+
needs: check_source
59+
if: needs.check_source.outputs.run_tests == 'true'
60+
steps:
61+
- uses: actions/checkout@v2
62+
- uses: actions/setup-python@v2
63+
- name: Install Dependencies
64+
run: sudo ./.github/workflows/posix-deps-apt.sh
65+
- name: Build CPython
66+
run: |
67+
./configure --with-pydebug
68+
make -j4 regen-all
69+
- name: Check for changes
70+
run: |
71+
changes=$(git status --porcelain)
72+
# Check for changes in regenerated files
73+
if ! test -z "$changes"
74+
then
75+
echo "Generated files not up to date. Perhaps you forgot to run make regen-all ;)"
76+
echo "$changes"
77+
exit 1
78+
fi
79+
- name: Check exported libpython symbols
80+
run: make smelly
81+
3082
build_win32:
3183
name: 'Windows (x86)'
32-
runs-on: windows-latest
84+
runs-on: windows-2019
3385
needs: check_source
3486
if: needs.check_source.outputs.run_tests == 'true'
3587
steps:
@@ -43,7 +95,7 @@ jobs:
4395

4496
build_win_amd64:
4597
name: 'Windows (x64)'
46-
runs-on: windows-latest
98+
runs-on: windows-2019
4799
needs: check_source
48100
if: needs.check_source.outputs.run_tests == 'true'
49101
steps:

0 commit comments

Comments
 (0)