File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ jobs:
153153 id : set-matrix
154154 working-directory : tools
155155 env :
156+ BASE_SHA : ${{ steps.deepen-and-convert-depth-to-sha.outputs.commit }}
157+ HEAD_SHA : ${{ github.event.after }}
156158 CHANGED_FILES : ${{ steps.get-changes.outputs.changed_files }}
157159 LAST_FAILED_JOBS : ${{ steps.get-last-commit-with-checks.outputs.check_runs }}
158160 run : python3 -u ci_set_matrix.py
Original file line number Diff line number Diff line change 2626import sys
2727import json
2828import pathlib
29+ import subprocess
2930from concurrent .futures import ThreadPoolExecutor
3031
3132tools_dir = pathlib .Path (__file__ ).resolve ().parent
@@ -238,6 +239,15 @@ def set_docs_to_build(build_all):
238239 r"^(?:.github/workflows/|docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$"
239240 )
240241 for p in changed_files :
242+ if (
243+ p .endswith (".c" )
244+ and not subprocess .run (
245+ f"git diff -U0 { os .environ .get ('BASE_SHA' )} ...{ os .environ .get ('HEAD_SHA' )} { p } | grep -o -m 1 '^[+-]\/\/|'" ,
246+ capture_output = True ,
247+ shell = True ,
248+ ).stdout
249+ ):
250+ continue
241251 if doc_pattern .search (p ):
242252 doc_match = True
243253 break
You can’t perform that action at this time.
0 commit comments