Skip to content

Commit 315eb6a

Browse files
committed
Merge branch 'pythongh-128446'
2 parents a734c1e + e3c15ca commit 315eb6a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
Windows
152152
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
153153
needs: check_source
154-
if: fromJSON(needs.check_source.outputs.run_tests)
154+
if: fromJSON(needs.check_source.outputs.run_tests) && fromJSON(needs.check_source.outputs.run-windows)
155155
strategy:
156156
fail-fast: false
157157
matrix:
@@ -182,7 +182,7 @@ jobs:
182182
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
183183
Windows MSI${{ '' }}
184184
needs: check_source
185-
if: fromJSON(needs.check_source.outputs.run-win-msi)
185+
if: fromJSON(needs.check_source.outputs.run-win-msi) && fromJSON(needs.check_source.outputs.run-windows)
186186
strategy:
187187
matrix:
188188
arch:

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

Lines changed: 17 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 || false }}
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 }}'
@@ -111,6 +116,18 @@ jobs:
111116
echo "Branch too old for CIFuzz tests; or no C files were changed"
112117
echo "run-cifuzz=false" >> "$GITHUB_OUTPUT"
113118
fi
119+
120+
CHANGED_FILES=$(git diff --name-only "origin/$GITHUB_BASE_REF..")
121+
# Check if changes are ONLY in configure/Makefile files
122+
if echo "$CHANGED_FILES" | grep -qE '^(configure.*|Makefile.*|.*\.m4)$' && \
123+
! echo "$CHANGED_FILES" | grep -qvE '^(configure.*|Makefile.*|.*\.m4)$'; then
124+
# Only configure/Makefile files changed, skip Windows CI
125+
echo "run-windows=false" >> "$GITHUB_OUTPUT"
126+
else
127+
# Other files changed, run Windows CI
128+
echo "run-windows=true" >> "$GITHUB_OUTPUT"
129+
fi
130+
114131
- name: Compute hash for config cache key
115132
id: config-hash
116133
run: |

0 commit comments

Comments
 (0)