[llvm] [Github] Add flang docs to Github actions (PR #70530)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 4 00:16:32 PDT 2023


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/70530

>From 59af261612a035021a69ba28752324cbbece16cc Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Fri, 27 Oct 2023 18:51:39 -0700
Subject: [PATCH] [Github] Add flang docs to Github actions

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.
---
 .github/workflows/docs.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 17b2fbbae7bd5d6..66afa60c5a62c71 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -23,6 +23,7 @@ on:
       - 'lld/docs/**'
       - 'openmp/docs/**'
       - 'polly/docs/**'
+      - 'flang/docs/**'
   pull_request:
     paths:
       - 'llvm/docs/**'
@@ -35,6 +36,7 @@ on:
       - 'lld/docs/**'
       - 'openmp/docs/**'
       - 'polly/docs/**'
+      - 'flang/docs/**'
 
 jobs:
   check-docs-build:
@@ -75,6 +77,8 @@ jobs:
               - 'openmp/docs/**'
             polly:
               - 'polly/docs/**'
+            flang:
+              - 'flang/docs/**'
       - name: Fetch LLVM sources (PR)
         if: ${{ github.event_name == 'pull_request' }}
         uses: actions/checkout at v4
@@ -143,4 +147,11 @@ jobs:
         run: |
           cmake -B polly-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="polly" -DLLVM_ENABLE_SPHINX=ON ./llvm
           TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man
+      - 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
 



More information about the llvm-commits mailing list