From e4fae108df7175317b2e02a3346267e2ce2df039 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Thu, 8 Jan 2026 16:38:54 +0000 Subject: [PATCH 1/3] Run on docs --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6769cdd4531a0c..3d849779606b74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -142,9 +142,24 @@ jobs: - name: Check for unsupported C global variables if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME run: make check-c-globals - - name: Check for undocumented C APIs - run: make check-c-api-docs + check-c-api-docs: + name: 'Check if all C APIs are documented' + runs-on: ubuntu-latest + timeout-minutes: 10 + needs: build-context + if: >- + needs.build-context.outputs.run-tests == 'true' + || needs.build-context.outputs.run-docs == 'true' + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Check for undocumented C APIs + run: python Tools/check-c-api-docs/main.py build-windows: name: >- @@ -685,6 +700,7 @@ jobs: - check-docs - check-autoconf-regen - check-generated-files + - check-c-api-docs - build-windows - build-windows-msi - build-macos @@ -721,6 +737,12 @@ jobs: ' || '' }} + ${{ + !fromJSON(needs.build-context.outputs.run-tests) + && !fromJSON(needs.build-context.outputs.run-docs) + && 'check-c-api-docs,' + || '' + }} ${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }} ${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }} ${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }} From 42c0869334eaea1b301f6658eee4e796d5515eea Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 9 Jan 2026 16:17:13 +0000 Subject: [PATCH 2/3] PR suggestions --- .github/workflows/build.yml | 14 ++-------- .../workflows/reusable-check-c-api-docs.yml | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/reusable-check-c-api-docs.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d849779606b74..5fd5778e28fdbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -144,22 +144,12 @@ jobs: run: make check-c-globals check-c-api-docs: - name: 'Check if all C APIs are documented' - runs-on: ubuntu-latest - timeout-minutes: 10 + name: C API Docs needs: build-context if: >- needs.build-context.outputs.run-tests == 'true' || needs.build-context.outputs.run-docs == 'true' - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Check for undocumented C APIs - run: python Tools/check-c-api-docs/main.py + uses: ./.github/workflows/reusable-check-c-api-docs.yml build-windows: name: >- diff --git a/.github/workflows/reusable-check-c-api-docs.yml b/.github/workflows/reusable-check-c-api-docs.yml new file mode 100644 index 00000000000000..3a502f03681f2a --- /dev/null +++ b/.github/workflows/reusable-check-c-api-docs.yml @@ -0,0 +1,26 @@ +name: Reusable C API Docs Check + +on: + workflow_call: + workflow_dispatch: + +permissions: + contents: read + +env: + FORCE_COLOR: 1 + +jobs: + check-c-api-docs: + name: 'Check if all C APIs are documented' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Check for undocumented C APIs + run: python Tools/check-c-api-docs/main.py From 4ca4198f2655147fec18158f1278d30236752ba4 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Fri, 9 Jan 2026 19:53:37 +0000 Subject: [PATCH 3/3] Update .github/workflows/reusable-check-c-api-docs.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/reusable-check-c-api-docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-check-c-api-docs.yml b/.github/workflows/reusable-check-c-api-docs.yml index 3a502f03681f2a..bab1ca67d538ad 100644 --- a/.github/workflows/reusable-check-c-api-docs.yml +++ b/.github/workflows/reusable-check-c-api-docs.yml @@ -2,7 +2,6 @@ name: Reusable C API Docs Check on: workflow_call: - workflow_dispatch: permissions: contents: read