forked from celeritas-project/celeritas
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (91 loc) · 2.73 KB
/
doc.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: doc
on:
workflow_dispatch:
workflow_call:
concurrency:
group: doc-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}-${{github.workflow}}
cancel-in-progress: true
env:
celer_upload_doc: >-
${{ github.ref_name == 'develop'
|| contains(github.ref_name, 'backports/')
|| contains(github.head_ref, 'release-')
|| contains(github.event.pull_request.labels.*.name, 'documentation')
}}
jobs:
dev:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install \
cmake graphviz ninja-build doxygen gcc
- name: Check out Celeritas
uses: actions/checkout@v4
with:
fetch-depth: 255
fetch-tags: true
- name: Configure celeritas
# Turn warnings into errors only for PRs
# Disable expensive graphs for PRs also
run: |
mkdir build && cd build
cmake \
-DCELERITAS_BUILD_DOCS=ON \
-DCELERITAS_DOXYGEN_BUILD_TESTS=ON \
${{ github.workflow == 'pr'
&& '-DDOXYGEN_WARN_AS_ERROR="YES" -DDOXYGEN_HAVE_DOT="NO"'
|| ''}} \
-GNinja \
..
- name: Build documentation
working-directory: build
run: |
ninja doxygen
- name: Upload pages artifacts
if: ${{env.celer_upload_doc}}
id: upload-pages-user
uses: actions/upload-pages-artifact@v2
with:
path: build/doc/doxygen-html
user:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install \
cmake graphviz ninja-build doxygen gcc
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check out Celeritas
uses: actions/checkout@v4
with:
fetch-depth: 255
fetch-tags: true
- name: Install Python packages
run: |
pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Configure celeritas
run: |
mkdir build && cd build
cmake \
-DCELERITAS_BUILD_DOCS=ON \
-DDOXYGEN_HAVE_DOT="NO" \
-DDOXYGEN_WARN_AS_ERROR="YES" \
-GNinja ..
- name: Build user documentation
working-directory: build
run: |
ninja doc
- name: Upload pages artifacts
if: ${{env.celer_upload_doc}}
id: upload-pages-user
uses: actions/upload-pages-artifact@v2
with:
path: build/doc/html
#TODO: deploy with actions/deploy-pages@v2 ?
# vim: set nowrap tw=100: