Skip to content

Commit 1441240

Browse files
committed
update CI for docs
1 parent 5cb970a commit 1441240

File tree

1 file changed

+10
-142
lines changed

1 file changed

+10
-142
lines changed

.github/workflows/ci.yml

+10-142
Original file line numberDiff line numberDiff line change
@@ -3,167 +3,35 @@ name: Continuous Integration
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
pull_request:
99
branches:
10-
- master
10+
- main
1111

1212
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v2
18-
19-
- uses: actions/setup-python@v2
20-
with: { python-version: "3.8" }
21-
22-
- name: Install codespell
23-
run: pip3 install codespell
24-
25-
- name: Lint
26-
run: cmake -D FORMAT_COMMAND=clang-format-11 -P cmake/lint.cmake
27-
28-
- name: Spell check
29-
if: always()
30-
run: cmake -P cmake/spell.cmake
31-
32-
coverage:
33-
needs: [lint]
34-
35-
runs-on: ubuntu-latest
36-
37-
# To enable coverage, go to https://codecov.io/, acquire a token, put it
38-
# into your secrets (Settings > Secrets > New repository secret), delete
39-
# the last line from the conditional below and edit the "<name>"
40-
# placeholder to your GitHub name.
41-
# If you do not wish to use codecov, then simply delete this job from the
42-
# workflow.
43-
if: github.repository_owner == '<name>'
44-
&& false
45-
46-
steps:
47-
- uses: actions/checkout@v2
48-
49-
- name: Install LCov
50-
run: sudo apt-get update -q
51-
&& sudo apt-get install lcov -q -y
52-
53-
- name: Configure
54-
run: cmake --preset=ci-coverage
55-
56-
- name: Build
57-
run: cmake --build build/coverage -j 2
58-
59-
- name: Test
60-
working-directory: build/coverage
61-
run: ctest --output-on-failure -j 2
62-
63-
- name: Process coverage info
64-
run: cmake --build build/coverage -t coverage
65-
66-
- name: Submit to codecov.io
67-
uses: codecov/codecov-action@v1
68-
with:
69-
file: build/coverage/coverage.info
70-
71-
sanitize:
72-
needs: [lint]
73-
74-
runs-on: ubuntu-latest
75-
76-
steps:
77-
- uses: actions/checkout@v2
78-
79-
- name: Configure
80-
env: { CXX: clang++-11 }
81-
run: cmake --preset=ci-sanitize
82-
83-
- name: Build
84-
run: cmake --build build/sanitize -j 2
85-
86-
- name: Test
87-
working-directory: build/sanitize
88-
env:
89-
ASAN_OPTIONS: "strict_string_checks=1:\
90-
detect_stack_use_after_return=1:\
91-
check_initialization_order=1:\
92-
strict_init_order=1:\
93-
detect_leaks=1"
94-
UBSAN_OPTIONS: print_stacktrace=1
95-
run: ctest --output-on-failure -j 2
96-
97-
test:
98-
needs: [lint]
99-
100-
strategy:
101-
matrix:
102-
os: [macos, ubuntu, windows]
103-
104-
runs-on: ${{ matrix.os }}-latest
105-
106-
steps:
107-
- uses: actions/checkout@v2
108-
109-
- name: Install static analyzers
110-
if: matrix.os == 'ubuntu'
111-
run: sudo apt-get install clang-tidy cppcheck -y -q
112-
113-
- name: Configure
114-
run: cmake --preset=ci-${{ matrix.os }}
115-
116-
- name: Build
117-
run: cmake --build build --config Release -j 2
118-
119-
- name: Install
120-
run: cmake --install build --config Release --prefix prefix
121-
122-
- name: Test
123-
working-directory: build
124-
run: ctest --output-on-failure -C Release -j 2
125-
12613
docs:
12714
# Deploy docs only when builds succeed
128-
needs: [sanitize, test]
129-
13015
runs-on: ubuntu-latest
13116

132-
# To enable, first you have to create an orphaned gh-pages branch:
133-
#
134-
# git switch --orphan gh-pages
135-
# git commit --allow-empty -m "Initial commit"
136-
# git push -u origin gh-pages
137-
#
138-
# Edit the <name> placeholder below to your GitHub name, so this action
139-
# runs only in your repository and no one else's fork. After these, delete
140-
# this comment and the last line in the conditional below.
141-
# If you do not wish to use GitHub Pages for deploying documentation, then
142-
# simply delete this job similarly to the coverage one.
143-
if: github.ref == 'refs/heads/master'
17+
if: github.ref == 'refs/heads/main'
14418
&& github.event_name == 'push'
145-
&& github.repository_owner == '<name>'
146-
&& false
19+
&& github.repository_owner == 'heal-research'
14720

14821
steps:
149-
- uses: actions/checkout@v2
150-
151-
- uses: actions/setup-python@v2
152-
with: { python-version: "3.8" }
153-
154-
- name: Install m.css dependencies
155-
run: pip3 install jinja2 Pygments
22+
- uses: actions/checkout@v4
15623

157-
- name: Install Doxygen
24+
- name: Install deps
15825
run: sudo apt-get update -q
159-
&& sudo apt-get install doxygen -q -y
26+
&& sudo apt-get install doxygen graphviz -q -y
16027

16128
- name: Build docs
16229
run: cmake -B build -D "CMAKE_PROJECT_INCLUDE=$PWD/cmake/docs.cmake"
16330
&& cmake --build build --target docs
16431

16532
- name: Deploy docs
166-
uses: peaceiris/actions-gh-pages@v3
33+
uses: peaceiris/actions-gh-pages@v4
16734
with:
16835
github_token: ${{ secrets.GITHUB_TOKEN }}
169-
publish_dir: build/docs/html
36+
publish_dir: ./docs/html
37+
allow_empty_commit: true

0 commit comments

Comments
 (0)