4141 CHANGED_CPP_FILES=$(echo "$CHANGED_FILES" | \
4242 grep -E '\.(cc|cpp|cxx|c\+\+|h|hpp|hxx|h\+\+)$' || true)
4343
44+ # Filter for C++ files specifically in the problems directory
45+ CHANGED_CPP_PROBLEMS_FILES=$(echo "$CHANGED_CPP_FILES" | \
46+ grep -E '^problems/' || true)
47+
4448 # Extract unique problem directories from changed C++ files
45- CHANGED_PROBLEMS=$(echo "$CHANGED_CPP_FILES " | \
49+ CHANGED_PROBLEMS=$(echo "$CHANGED_CPP_PROBLEMS_FILES " | \
4650 grep -E '^problems/[^/]+/' | cut -d'/' -f2 | \
4751 sort -u | tr '\n' ' ' || true)
4852
@@ -57,13 +61,15 @@ jobs:
5761
5862 echo "Changed C++ files:"
5963 echo "$CHANGED_CPP_FILES"
64+ echo "Changed C++ files in problems/:"
65+ echo "$CHANGED_CPP_PROBLEMS_FILES"
6066 echo "Changed problems: $CHANGED_PROBLEMS"
6167 echo "C++ config changes: $CPP_CONFIG_CHANGES"
6268 echo "Common directory changes: $COMMON_CHANGES"
6369
6470 # Set outputs
6571 echo "changed_problems=$CHANGED_PROBLEMS" >> $GITHUB_OUTPUT
66- echo "has_cpp_changes=$([ -n "$CHANGED_CPP_FILES " ] && \
72+ echo "has_cpp_changes=$([ -n "$CHANGED_CPP_PROBLEMS_FILES " ] && \
6773 echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
6874 echo "has_cpp_config_changes=$([ -n "$CPP_CONFIG_CHANGES" ] && \
6975 echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
@@ -137,7 +143,7 @@ jobs:
137143 "false" ] && \
138144 [ "${{ steps.detect-changes.outputs.has_common_changes }}" = \
139145 "false" ]; then
140- echo "- No C++ files changed - skipped all tasks" >> \
146+ echo "- No C++ files in problems/ changed - skipped all tasks" >> \
141147 $GITHUB_STEP_SUMMARY
142148 elif [ "${{ steps.detect-changes.outputs.should_run_all_tests }}" = \
143149 "true" ]; then
0 commit comments