Skip to content

[Github] Add flang docs to Github actions #70530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

boomanaiden154
Copy link
Contributor

This patch enables building the flang docs in Github actions to enable rapid iteration in PRs and to catch docs build failures more easily before merge/after merge. This patch currently doesn't fail for Sphinx warnings, but the intention is to enable this functionality once the flang docs are fixed to build without warnings after the transition to Myst.

@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2023

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch enables building the flang docs in Github actions to enable rapid iteration in PRs and to catch docs build failures more easily before merge/after merge. This patch currently doesn't fail for Sphinx warnings, but the intention is to enable this functionality once the flang docs are fixed to build without warnings after the transition to Myst.


Full diff: https://github.com/llvm/llvm-project/pull/70530.diff

1 Files Affected:

  • (modified) .github/workflows/docs.yml (+11)
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index e6af2f41167e0a1..40cd3da1f8120c3 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -21,6 +21,7 @@ on:
       - 'libcxx/docs/**'
       - 'libc/docs/**'
       - 'lld/docs/**'
+      - 'flang/docs/**'
   pull_request:
     paths:
       - 'llvm/docs/**'
@@ -31,6 +32,7 @@ on:
       - 'libcxx/docs/**'
       - 'libc/docs/**'
       - 'lld/docs/**'
+      - 'flang/docs/**'
 
 jobs:
   check-docs-build:
@@ -67,6 +69,8 @@ jobs:
               - 'libc/docs/**'
             lld:
               - 'lld/docs/**'
+            flang:
+              - 'flang/docs/**'
       - name: Fetch LLVM sources (PR)
         if: ${{ github.event_name == 'pull_request' }}
         uses: actions/checkout@v4
@@ -125,4 +129,11 @@ jobs:
         run: |
           cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm
           TZ=UTC ninja -C lld-build docs-lld-html
+      - name: Build Flang docs
+        if: steps.docs-changed-subprojects.outputs.flang_any_changed == 'true'
+        # TODO(boomanaiden154): Remove the SPHINX_WARNINGS_AS_ERRORS from the
+        # CMake invocation once the warnings in the flang docs build are fixed.
+        run: |
+          cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON -DSPHINX_WARNINGS_AS_ERRORS=OFF ./llvm
+          TZ=UTC ninja -C flang-build docs-flang-html docs-flang-man
 

@bishaaradan

This comment was marked as off-topic.

This patch enables building the flang docs in Github actions to enable
rapid iteration in PRs and to catch docs build failures more easily
before merge/after merge. This patch currently doesn't fail for Sphinx
warnings, but the intention is to enable this functionality once the
flang docs are fixed to build without warnings after the transition to
Myst.
@boomanaiden154 boomanaiden154 merged commit 9189cd6 into llvm:main Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants