File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ jobs:
153
153
id : set-matrix
154
154
working-directory : tools
155
155
env :
156
+ BASE_SHA : ${{ steps.deepen-and-convert-depth-to-sha.outputs.commit }}
157
+ HEAD_SHA : ${{ github.event.after }}
156
158
CHANGED_FILES : ${{ steps.get-changes.outputs.changed_files }}
157
159
LAST_FAILED_JOBS : ${{ steps.get-last-commit-with-checks.outputs.check_runs }}
158
160
run : python3 -u ci_set_matrix.py
Original file line number Diff line number Diff line change 26
26
import sys
27
27
import json
28
28
import pathlib
29
+ import subprocess
29
30
from concurrent .futures import ThreadPoolExecutor
30
31
31
32
tools_dir = pathlib .Path (__file__ ).resolve ().parent
@@ -238,6 +239,15 @@ def set_docs_to_build(build_all):
238
239
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))$"
239
240
)
240
241
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
241
251
if doc_pattern .search (p ):
242
252
doc_match = True
243
253
break
You can’t perform that action at this time.
0 commit comments