-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 2.27 KB
/
Copy pathdocs.yml
File metadata and controls
71 lines (62 loc) · 2.27 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Docs
on:
push:
branches:
- master
paths:
- 'include/**'
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
branches:
- master
paths:
- 'include/**'
- 'docs/**'
- '.github/workflows/docs.yml'
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -q
sudo apt-get install -y cmake ninja-build g++-15
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 15
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 15
# Ubuntu 24.04's apt package is Doxygen 1.9.8, which misreports several
# correctly-documented symbols as undocumented (confirmed: two template
# overloads of the same free function, and a function immediately
# following a file-level doc comment both trip its param/return
# association) -- fixed upstream by 1.15.0. Install a release binary
# instead of relying on the distro package.
- name: Install Doxygen 1.17.0
run: |
curl -sL https://github.com/doxygen/doxygen/releases/download/Release_1_17_0/doxygen-1.17.0.linux.bin.tar.gz -o /tmp/doxygen.tar.gz
tar -xzf /tmp/doxygen.tar.gz -C /tmp
echo "/tmp/doxygen-1.17.0/bin" >> "$GITHUB_PATH"
- name: Configure (docs target only)
run: |
cmake -S . -B build -G Ninja \
-DMORPH_BUILD_DOCUMENTATION=ON \
-DMORPH_BUILD_TESTS=OFF \
-DMORPH_BUILD_EXAMPLES=OFF
- name: Build documentation (fails on undocumented public symbols)
run: cmake --build build --target doc
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/html/html
clean-exclude: demo/ # preserve the WASM demo published by wasm-demo.yml