diff options
| author | Aiden Grossman <agrossman154@yahoo.com> | 2023-10-16 22:08:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-16 22:08:45 -0700 |
| commit | 12a731b5a4cfec96ba7c72888a1d76b8e13b043e (patch) | |
| tree | 51bdb1b040776f7508da7cf4159dea4b48ab70ed /.github/workflows/docs.yml | |
| parent | 7bc793a6925ccebbe21f1c98a79d6dc89a615c01 (diff) | |
[CI] Add Github actions job to build LLVM documentation (#69269)
This patch adds in support for building the LLVM documentation through a
Github actions job. This enables catching documentation build failures
earlier and also more easily as the job failure will show up directly on
pull requests. The job currently only builds the documentation for LLVM,
but the plan is to extend it to also build the documentation for other
subprojects when appropriate (i.e., the docs files have changed),
starting with clang.
Diffstat (limited to '.github/workflows/docs.yml')
| -rw-r--r-- | .github/workflows/docs.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000000..4af4083a77b8 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,46 @@ +# LLVM Documentation CI +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +name: "Test documentation build" + +permissions: + contents: read + +on: + push: + branches: + - 'main' + paths: + - 'llvm/docs/**' + pull_request: + paths: + - 'llvm/docs/**' + +jobs: + check-docs-build: + name: "Test documentation build" + runs-on: ubuntu-latest + steps: + - name: Fetch LLVM sources + uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Setup Python env + uses: actions/setup-python@v4 + with: + python-version: '3.11' + cache: 'pip' + cache-dependency-path: 'llvm/docs/requirements.txt' + - name: Install python dependencies + run: pip install -r llvm/docs/requirements.txt + - name: Install system dependencies + run: apt-get update && apt-get install -y cmake ninja-build + - name: Build docs + run: | + mkdir build + cd build + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON -DSPHINX_OUTPUT_HTML=ON -DSPHINX_OUTPUT_MAN=ON ../llvm + TZ=UTC ninja docs-llvm-html docs-llvm-man + |
