-
Notifications
You must be signed in to change notification settings - Fork 14
58 lines (51 loc) · 1.97 KB
/
hdoc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: hdoc
on:
push:
branches: [main]
jobs:
docs:
name: Generate documentation with hdoc
if: github.repository == 'chromium/subspace'
runs-on: ubuntu-latest
env:
clang_version: 16
installed_clang_version: 14
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install LLVM+Clang
run: |
sudo apt-get remove clang-${installed_clang_version} \
lldb-${installed_clang_version} \
lld-${installed_clang_version} \
clangd-${installed_clang_version} \
clang-tidy-${installed_clang_version} \
clang-format-${installed_clang_version} \
clang-tools-${installed_clang_version} \
llvm-${installed_clang_version}-dev \
lld-${installed_clang_version} \
lldb-${installed_clang_version} \
llvm-${installed_clang_version}-tools \
libomp-${installed_clang_version}-dev \
libc++-${installed_clang_version}-dev \
libc++abi-${installed_clang_version}-dev \
libclang-common-${installed_clang_version}-dev \
libclang-${installed_clang_version}-dev \
libclang-cpp${installed_clang_version}-dev \
libunwind-${installed_clang_version}-dev
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${clang_version} all
- name: Configure
run: |
# Path to LLVM+Clang nightly that we have installed.
export LLVM_DIR="/usr/lib/llvm-${clang_version}/lib/cmake/llvm"
export Clang_DIR="/usr/lib/llvm-${clang_version}/lib/cmake/clang"
sudo apt install build-essential cmake ninja-build
cmake -G Ninja -B out -D CMAKE_EXPORT_COMPILE_COMMANDS=1
- name: Generate
uses: hdoc/hdoc-github-action@v2
with:
compile-commands-path: out/compile_commands.json
hdoc-api-key: ${{ secrets.HDOC_PROJECT_API_KEY }}