@@ -3,167 +3,35 @@ name: Continuous Integration
3
3
on :
4
4
push :
5
5
branches :
6
- - master
6
+ - main
7
7
8
8
pull_request :
9
9
branches :
10
- - master
10
+ - main
11
11
12
12
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
-
126
13
docs :
127
14
# Deploy docs only when builds succeed
128
- needs : [sanitize, test]
129
-
130
15
runs-on : ubuntu-latest
131
16
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'
144
18
&& github.event_name == 'push'
145
- && github.repository_owner == '<name>'
146
- && false
19
+ && github.repository_owner == 'heal-research'
147
20
148
21
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
156
23
157
- - name : Install Doxygen
24
+ - name : Install deps
158
25
run : sudo apt-get update -q
159
- && sudo apt-get install doxygen -q -y
26
+ && sudo apt-get install doxygen graphviz -q -y
160
27
161
28
- name : Build docs
162
29
run : cmake -B build -D "CMAKE_PROJECT_INCLUDE=$PWD/cmake/docs.cmake"
163
30
&& cmake --build build --target docs
164
31
165
32
- name : Deploy docs
166
- uses : peaceiris/actions-gh-pages@v3
33
+ uses : peaceiris/actions-gh-pages@v4
167
34
with :
168
35
github_token : ${{ secrets.GITHUB_TOKEN }}
169
- publish_dir : build/docs/html
36
+ publish_dir : ./docs/html
37
+ allow_empty_commit : true
0 commit comments