Skip to content

Commit b7d321d

Browse files
[Github] Upload built docs as artifact from test build docs job
This patch makes the test documentation build job upload the docs that have been built as artifacts. This makes it much easier to take a peek at the resulting documentation rather than just being able to see that it builds.
1 parent a348f22 commit b7d321d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,58 +112,87 @@ jobs:
112112
sudo apt-get update
113113
# swig and graphviz are lldb specific dependencies
114114
sudo apt-get install -y cmake ninja-build swig graphviz
115+
- name: Setup output folder
116+
run: mkdir built-docs
115117
- name: Build LLVM docs
116118
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
117119
run: |
118120
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON ./llvm
119121
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
122+
mkdir built-docs/llvm
123+
cp -r llvm-build/docs/* built-docs/llvm/
120124
- name: Build Clang docs
121125
if: steps.docs-changed-subprojects.outputs.clang_any_changed == 'true'
122126
run: |
123127
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON ./llvm
124128
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
129+
mkdir built-docs/clang
130+
cp -r clang-build/docs/* built-docs/clang/
125131
- name: Build clang-tools-extra docs
126132
if: steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true'
127133
run: |
128134
cmake -B clang-tools-extra-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_SPHINX=ON ./llvm
129135
TZ=UTC ninja -C clang-tools-extra-build docs-clang-tools-html docs-clang-tools-man
136+
mkdir built-docs/clang-tools-extra
137+
cp -r clang-tools-extra-build/docs/* built-docs/clang-tools-extra/
130138
- name: Build LLDB docs
131139
if: steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true'
132140
run: |
133141
cmake -B lldb-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_ENABLE_SPHINX=ON ./llvm
134142
TZ=UTC ninja -C lldb-build docs-lldb-html docs-lldb-man
143+
mkdir built-docs/lldb
144+
cp -r lldb-build/docs/* built-docs/lldb/
135145
- name: Build libunwind docs
136146
if: steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true'
137147
run: |
138148
cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
139149
TZ=UTC ninja -C libunwind-build docs-libunwind-html
150+
mkdir built-docs/libunwind
151+
cp -r libunwind-build/docs/* built-docs/libunwind
140152
- name: Build libcxx docs
141153
if: steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true'
142154
run: |
143155
cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx;libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
144156
TZ=UTC ninja -C libcxx-build docs-libcxx-html
157+
mkdir built-docs/libcxx
158+
cp -r libcxx-build/docs/* built-docs/libcxx/
145159
- name: Build libc docs
146160
if: steps.docs-changed-subprojects.outputs.libc_any_changed == 'true'
147161
run: |
148162
cmake -B libc-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLLVM_ENABLE_SPHINX=ON ./runtimes
149163
TZ=UTC ninja -C libc-build docs-libc-html
164+
mkdir built-docs/libc
165+
cp -r libc-build/docs/* built-docs/libc/
150166
- name: Build LLD docs
151167
if: steps.docs-changed-subprojects.outputs.lld_any_changed == 'true'
152168
run: |
153169
cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm
154170
TZ=UTC ninja -C lld-build docs-lld-html
171+
mkdir built-docs/lld
172+
cp -r lld-build/docs/* built-docs/lld/
155173
- name: Build OpenMP docs
156174
if: steps.docs-changed-subprojects.outputs.openmp_any_changed == 'true'
157175
run: |
158176
cmake -B openmp-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;openmp" -DLLVM_ENABLE_SPHINX=ON ./llvm
159177
TZ=UTC ninja -C openmp-build docs-openmp-html
178+
mkdir built-docs/openmp
179+
cp -r openmp-build/docs/* built-docs/openmp/
160180
- name: Build Polly docs
161181
if: steps.docs-changed-subprojects.outputs.polly_any_changed == 'true'
162182
run: |
163183
cmake -B polly-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="polly" -DLLVM_ENABLE_SPHINX=ON ./llvm
164184
TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man
185+
mkdir built-docs/polly
186+
cp -r polly-build/docs/* built-docs/polly/
165187
- name: Build Flang docs
166188
if: steps.docs-changed-subprojects.outputs.flang_any_changed == 'true'
167189
run: |
168190
cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON ./llvm
169191
TZ=UTC ninja -C flang-build docs-flang-html
192+
mkdir built-docs/flang
193+
cp -r flang-build/docs/* built-docs/flang/
194+
- name: Upload docs
195+
uses: actions/upload-artifact@v4
196+
with:
197+
name: docs-output
198+
path: built-docs/

0 commit comments

Comments
 (0)