Skip to content

Commit 13e0e1b

Browse files
committed
Merge branch 'pythongh-128446'
2 parents e5c3b7e + 1df4641 commit 13e0e1b

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
Windows
155155
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156156
needs: check_source
157-
if: fromJSON(needs.check_source.outputs.run_tests)
157+
if: fromJSON(needs.check_source.outputs.run_tests) && fromJSON(needs.check_source.outputs.run-windows)
158158
strategy:
159159
fail-fast: false
160160
matrix:
@@ -185,7 +185,7 @@ jobs:
185185
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
186186
Windows MSI${{ '' }}
187187
needs: check_source
188-
if: fromJSON(needs.check_source.outputs.run-win-msi)
188+
if: fromJSON(needs.check_source.outputs.run-win-msi) && fromJSON(needs.check_source.outputs.run-windows)
189189
strategy:
190190
matrix:
191191
arch:

.github/workflows/reusable-change-detection.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ on: # yamllint disable-line rule:truthy
3636
description: Whether to run the MSI installer smoke tests
3737
value: >- # bool
3838
${{ jobs.compute-changes.outputs.run-win-msi || false }}
39+
run-windows:
40+
description: Whether to run the Windows CI
41+
value: >- # bool
42+
${{ jobs.compute-changes.outputs.run-windows || true }}
3943
run_hypothesis:
4044
description: Whether to run the Hypothesis tests
4145
value: >- # bool
@@ -57,6 +61,7 @@ jobs:
5761
run-hypothesis: ${{ steps.check.outputs.run-hypothesis }}
5862
run-tests: ${{ steps.check.outputs.run-tests }}
5963
run-win-msi: ${{ steps.win-msi-changes.outputs.run-win-msi }}
64+
run-windows: ${{ steps.check.outputs.run-windows }}
6065
steps:
6166
- run: >-
6267
echo '${{ github.event_name }}'
@@ -126,6 +131,20 @@ jobs:
126131
echo "Branch too old for CIFuzz tests; or no C files were changed"
127132
echo "run-cifuzz=false" >> "$GITHUB_OUTPUT"
128133
fi
134+
135+
if [ "$GITHUB_BASE_REF" = "main" ]; then
136+
CHANGED_FILES=$(git diff --name-only "origin/$GITHUB_BASE_REF..")
137+
# Check if changes are ONLY in configure/Makefile files
138+
if echo "$CHANGED_FILES" | grep -qE '^(configure.*|Makefile(\.pre)?\.in|Makefile|.*\.m4)$' && \
139+
! echo "$CHANGED_FILES" | grep -qvE '^(configure.*|Makefile(\.pre)?\.in|Makefile|.*\.m4)$'; then
140+
# Only configure/Makefile files changed, skip Windows CI
141+
echo "run-windows=false" >> "$GITHUB_OUTPUT"
142+
else
143+
# Other files changed, run Windows CI
144+
echo "run-windows=true" >> "$GITHUB_OUTPUT"
145+
fi
146+
fi
147+
129148
- name: Compute hash for config cache key
130149
id: config-hash
131150
run: |

0 commit comments

Comments
 (0)