Skip to content

Commit

Permalink
The key changes are:
Browse files Browse the repository at this point in the history
Modified the logic to use two conditions:
First check if there ARE configure/Makefile files (grep -qE)
Then check if there are NO other files (! grep -qvE)
Only skip Windows CI when BOTH conditions are true (only configure-related files changed)
This way, Windows CI will be skipped only when ALL changed files are configure/Makefile related, and will run if there are any other changes
srinivasreddy committed Jan 6, 2025
1 parent c904238 commit ccce2b6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/reusable-change-detection.yml
Original file line number Diff line number Diff line change
@@ -124,13 +124,14 @@ jobs:
# Get changed files
CHANGED_FILES=$(git diff --name-only "origin/$GITHUB_BASE_REF..")
# Check if changes are only in configure/Makefile files
if echo "$CHANGED_FILES" | grep -qvE '^(configure.*|Makefile.*|.*\.m4)$'; then
# Other files changed, run Windows CI
echo "run-windows=true" >> "$GITHUB_OUTPUT"
else
# Check if changes are ONLY in configure/Makefile files
if echo "$CHANGED_FILES" | grep -qE '^(configure.*|Makefile.*|.*\.m4)$' && \
! echo "$CHANGED_FILES" | grep -qvE '^(configure.*|Makefile.*|.*\.m4)$'; then
# Only configure/Makefile files changed, skip Windows CI
echo "run-windows=false" >> "$GITHUB_OUTPUT"
else
# Other files changed, run Windows CI
echo "run-windows=true" >> "$GITHUB_OUTPUT"
fi
fi
- name: Compute hash for config cache key

0 comments on commit ccce2b6

Please sign in to comment.