File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,9 +187,14 @@ jobs:
187187 - name : Check for unsupported C global variables
188188 if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
189189 run : make check-c-globals
190- - name : Check for undocumented C APIs
191- run : make check-c-api-docs
192190
191+ check-c-api-docs :
192+ name : C API Docs
193+ needs : build-context
194+ if : >-
195+ needs.build-context.outputs.run-tests == 'true'
196+ || needs.build-context.outputs.run-docs == 'true'
197+ uses : ./.github/workflows/reusable-check-c-api-docs.yml
193198
194199 build-windows :
195200 name : >-
@@ -674,6 +679,7 @@ jobs:
674679 - check-docs
675680 - check-autoconf-regen
676681 - check-generated-files
682+ - check-c-api-docs
677683 - build-windows
678684 - build-windows-msi
679685 - build-macos
@@ -710,6 +716,12 @@ jobs:
710716 '
711717 || ''
712718 }}
719+ ${{
720+ !fromJSON(needs.build-context.outputs.run-tests)
721+ && !fromJSON(needs.build-context.outputs.run-docs)
722+ && 'check-c-api-docs,'
723+ || ''
724+ }}
713725 ${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
714726 ${{
715727 !fromJSON(needs.build-context.outputs.run-ci-fuzz)
Original file line number Diff line number Diff line change 1+ name : Reusable C API Docs Check
2+
3+ on :
4+ workflow_call :
5+
6+ permissions :
7+ contents : read
8+
9+ env :
10+ FORCE_COLOR : 1
11+
12+ jobs :
13+ check-c-api-docs :
14+ name : ' Check if all C APIs are documented'
15+ runs-on : ubuntu-latest
16+ timeout-minutes : 5
17+ steps :
18+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
19+ with :
20+ persist-credentials : false
21+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
22+ with :
23+ python-version : ' 3.x'
24+ - name : Check for undocumented C APIs
25+ run : python Tools/check-c-api-docs/main.py
You can’t perform that action at this time.
0 commit comments