Skip to content

Commit cd04dd1

Browse files
Project rafacoring. Use doxygen_template as git submodule. Use github actions as CI instead of Azure DevOps.
1 parent 06eefa0 commit cd04dd1

14 files changed

+322
-2515
lines changed

.github/actions/shell/action.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Run Shell Commands"
2+
description: "Runs a list of commands on the native OS shell"
3+
4+
inputs:
5+
commands:
6+
description: 'Multiline string of commands to run'
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: CMD
13+
if: runner.os == 'Windows'
14+
shell: cmd
15+
run: |
16+
${{ inputs.commands }}
17+
18+
- name: Bash
19+
if: runner.os != 'Windows'
20+
shell: bash
21+
run: |
22+
${{ inputs.commands }}

.github/workflows/build.yml

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
inputs:
7+
force_deployment:
8+
description: 'Force Conan package deploy'
9+
required: true
10+
default: true
11+
type: boolean
12+
13+
jobs:
14+
build:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
build_type: ['Debug', 'Release', 'RelWithDebInfo']
19+
config:
20+
- name: windows2022_msvc2022
21+
os: windows-2022
22+
compiler: visual_studio
23+
compiler_version: 17
24+
setup_build_env: 'call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
25+
activate_venv: 'call ".venv\\Scripts\\activate.bat"'
26+
27+
- name: windows2019_msvc2019
28+
os: windows-2019
29+
compiler: visual_studio
30+
compiler_version: 16
31+
setup_build_env: 'call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
32+
activate_venv: 'call ".venv\\Scripts\\activate.bat"'
33+
34+
- name: macos14_clang15
35+
os: macos-14
36+
compiler: clang
37+
compiler_version: 15
38+
setup_build_env: ""
39+
activate_venv: 'source .venv/bin/activate'
40+
41+
- name: ubuntu2204_gcc12
42+
os: ubuntu-22.04
43+
compiler: gcc
44+
compiler_version: 12
45+
setup_build_env: ""
46+
activate_venv: 'source .venv/bin/activate'
47+
48+
- name: ubuntu2204_clang15
49+
os: ubuntu-22.04
50+
compiler: clang
51+
compiler_version: 15
52+
setup_build_env: ""
53+
activate_venv: 'source .venv/bin/activate'
54+
55+
runs-on: ${{ matrix.config.os }}
56+
name: CI ${{ matrix.config.name }} ${{ matrix.build_type }}
57+
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
with:
62+
submodules: true
63+
64+
- name: Set Python version
65+
uses: actions/setup-python@v5
66+
with:
67+
python-version: '3.12'
68+
architecture: 'x64'
69+
70+
- name: Setup Virtual Environment
71+
uses: ./.github/actions/shell
72+
with:
73+
commands: |
74+
python3 -m venv .venv
75+
${{ matrix.config.activate_venv }}
76+
pip3 install -r scripts/requirements.txt
77+
conan remote add teiacare ${{ secrets.ARTIFACTORY_URL }}/teiacare --insert 0 --force
78+
conan user ${{ secrets.ARTIFACTORY_USERNAME }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} -r teiacare
79+
env:
80+
CONAN_USER_HOME: ${{ github.workspace }}
81+
82+
- name: Setup Conan
83+
uses: ./.github/actions/shell
84+
with:
85+
commands: |
86+
${{ matrix.config.activate_venv }}
87+
python3 scripts/conan/setup.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}
88+
env:
89+
CONAN_USER_HOME: ${{ github.workspace }}
90+
91+
- name: Build
92+
uses: ./.github/actions/shell
93+
with:
94+
commands: |
95+
${{ matrix.config.activate_venv }}
96+
${{ matrix.config.setup_build_env }}
97+
python3 scripts/cmake.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }} --warnings
98+
env:
99+
CONAN_USER_HOME: ${{ github.workspace }}
100+
101+
- name: Unit Tests
102+
uses: ./.github/actions/shell
103+
with:
104+
commands: |
105+
${{ matrix.config.activate_venv }}
106+
${{ matrix.config.setup_build_env }}
107+
python3 scripts/cmake.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }} --warnings --unit_tests
108+
python3 scripts/tools/run_unit_tests.py ${{ matrix.build_type }}
109+
env:
110+
CONAN_USER_HOME: ${{ github.workspace }}
111+
continue-on-error: true
112+
timeout-minutes: 5
113+
114+
- name: Create Conan Package
115+
uses: ./.github/actions/shell
116+
with:
117+
commands: |
118+
${{ matrix.config.activate_venv }}
119+
${{ matrix.config.setup_build_env }}
120+
python3 scripts/conan/create.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}
121+
env:
122+
CONAN_USER_HOME: ${{ github.workspace }}
123+
124+
- name: Publish Conan cache
125+
uses: actions/upload-artifact@v4
126+
with:
127+
name: ${{ matrix.config.name }}-${{ matrix.build_type }}
128+
path: .conan
129+
if-no-files-found: error
130+
overwrite: true
131+
include-hidden-files: true
132+
133+
coverage:
134+
needs: build
135+
runs-on: ubuntu-22.04
136+
name: Code Coverage
137+
138+
env:
139+
COMPILER: gcc
140+
COMPILER_VERSION: 12
141+
BUILD_TYPE: Debug
142+
143+
steps:
144+
- name: Checkout repository
145+
uses: actions/checkout@v4
146+
with:
147+
submodules: true
148+
149+
- name: Set Python version
150+
uses: actions/setup-python@v5
151+
with:
152+
python-version: '3.12'
153+
architecture: 'x64'
154+
155+
- name: Setup Virtual Environment
156+
uses: ./.github/actions/shell
157+
with:
158+
commands: |
159+
python3 -m venv .venv
160+
${{ matrix.config.activate_venv }}
161+
pip3 install -r scripts/requirements.txt
162+
conan remote add teiacare ${{ secrets.ARTIFACTORY_URL }}/teiacare --insert 0 --force
163+
conan user ${{ secrets.ARTIFACTORY_USERNAME }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} -r teiacare
164+
env:
165+
CONAN_USER_HOME: ${{ github.workspace }}
166+
167+
- name: Setup Conan
168+
uses: ./.github/actions/shell
169+
with:
170+
commands: |
171+
source .venv/bin/activate
172+
python3 scripts/conan/setup.py ${{ env.BUILD_TYPE }} ${{ env.COMPILER }} ${{ env.COMPILER_VERSION }}
173+
env:
174+
CONAN_USER_HOME: ${{ github.workspace }}
175+
176+
- name: Run Code Coverage
177+
run: |
178+
source .venv/bin/activate
179+
python3 scripts/cmake.py ${{ env.BUILD_TYPE }} ${{ env.COMPILER }} ${{ env.COMPILER_VERSION }} --warnings --coverage
180+
python3 scripts/tools/run_unit_tests.py ${{ env.BUILD_TYPE }}
181+
python3 scripts/tools/run_coverage.py ${{ env.COMPILER }} ${{ env.COMPILER_VERSION }} sdk
182+
timeout-minutes: 5
183+
continue-on-error: true
184+
env:
185+
CONAN_USER_HOME: ${{ github.workspace }}
186+
187+
- name: Upload Codacy
188+
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r results/coverage/cobertura.xml
189+
env:
190+
CODACY_PROJECT_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
191+
192+
deploy:
193+
needs: build
194+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force_deployment == 'true' || github.ref == 'refs/heads/develop' }}
195+
strategy:
196+
fail-fast: false
197+
matrix:
198+
build_type: ['Debug', 'Release', 'RelWithDebInfo']
199+
config:
200+
- name: windows2022_msvc2022
201+
os: windows-2022
202+
compiler: visual_studio
203+
compiler_version: 17
204+
setup_build_env: 'call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
205+
activate_venv: 'call ".venv\\Scripts\\activate.bat"'
206+
207+
- name: windows2019_msvc2019
208+
os: windows-2019
209+
compiler: visual_studio
210+
compiler_version: 16
211+
setup_build_env: 'call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
212+
activate_venv: 'call ".venv\\Scripts\\activate.bat"'
213+
214+
- name: macos14_clang15
215+
os: macos-14
216+
compiler: clang
217+
compiler_version: 15
218+
setup_build_env: ""
219+
activate_venv: 'source .venv/bin/activate'
220+
221+
- name: ubuntu2204_gcc12
222+
os: ubuntu-22.04
223+
compiler: gcc
224+
compiler_version: 12
225+
setup_build_env: ""
226+
activate_venv: 'source .venv/bin/activate'
227+
228+
- name: ubuntu2204_clang15
229+
os: ubuntu-22.04
230+
compiler: clang
231+
compiler_version: 15
232+
setup_build_env: ""
233+
activate_venv: 'source .venv/bin/activate'
234+
235+
runs-on: ${{ matrix.config.os }}
236+
name: CD ${{ matrix.config.name }} ${{ matrix.build_type }}
237+
238+
steps:
239+
- name: Checkout repository
240+
uses: actions/checkout@v4
241+
with:
242+
submodules: true
243+
244+
- name: Set Python version
245+
uses: actions/setup-python@v5
246+
with:
247+
python-version: '3.12'
248+
architecture: 'x64'
249+
250+
- name: Setup Virtual Environment
251+
uses: ./.github/actions/shell
252+
with:
253+
commands: |
254+
python3 -m venv .venv
255+
${{ matrix.config.activate_venv }}
256+
pip3 install -r scripts/requirements.txt
257+
conan remote add teiacare ${{ secrets.ARTIFACTORY_URL }}/teiacare --insert 0 --force
258+
conan user ${{ secrets.ARTIFACTORY_USERNAME }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} -r teiacare
259+
env:
260+
CONAN_USER_HOME: ${{ github.workspace }}
261+
262+
- name: Download Conan cache
263+
uses: actions/download-artifact@v4
264+
with:
265+
name: ${{ matrix.config.name }}-${{ matrix.build_type }}
266+
path: .conan/
267+
268+
- name: Upload Conan Package
269+
uses: ./.github/actions/shell
270+
with:
271+
commands: |
272+
${{ matrix.config.activate_venv }}
273+
${{ matrix.config.setup_build_env }}
274+
python3 scripts/conan/upload.py teiacare ${{ secrets.ARTIFACTORY_URL }} ${{ secrets.ARTIFACTORY_USERNAME }} ${{ secrets.ARTIFACTORY_PASSWORD }}
275+
env:
276+
CONAN_USER_HOME: ${{ github.workspace }}

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828
url: ${{ steps.deployment.outputs.page_url }}
2929

3030
steps:
31-
- name: Checkout
31+
- name: Checkout repository
3232
uses: actions/checkout@v4
3333
with:
3434
submodules: true
3535

3636
- name: Setup GitHub Pages
3737
uses: actions/configure-pages@v4
3838

39-
- name: Build Docs
39+
- name: Install Doxygen
4040
run: sudo apt-get install -y doxygen graphviz
4141

4242
- name: Build Docs

sdk/docs/Doxyfile renamed to Doxyfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ PROJECT_BRIEF = TeiaCareSDK is a collection of reusable C++ components
6161
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
6262
# the logo to the output directory.
6363

64-
PROJECT_LOGO = sdk/docs/logo/logo-small.png
64+
PROJECT_LOGO = doxygen/logo/logo-small.png
6565

6666
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
6767
# into which the generated documentation will be written. If a relative path is
@@ -1317,7 +1317,7 @@ HTML_FILE_EXTENSION = .html
13171317
# of the possible markers and block names see the documentation.
13181318
# This tag requires that the tag GENERATE_HTML is set to YES.
13191319

1320-
HTML_HEADER = sdk/docs/style/header.html
1320+
HTML_HEADER = doxygen/style/header.html
13211321

13221322
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
13231323
# generated HTML page. If the tag is left blank doxygen will generate a standard
@@ -1327,7 +1327,7 @@ HTML_HEADER = sdk/docs/style/header.html
13271327
# that doxygen normally uses.
13281328
# This tag requires that the tag GENERATE_HTML is set to YES.
13291329

1330-
HTML_FOOTER = sdk/docs/style/footer.html
1330+
HTML_FOOTER = doxygen/style/footer.html
13311331

13321332
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
13331333
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@@ -1357,7 +1357,7 @@ HTML_STYLESHEET =
13571357
# documentation.
13581358
# This tag requires that the tag GENERATE_HTML is set to YES.
13591359

1360-
HTML_EXTRA_STYLESHEET = sdk/docs/style/doxygen-awesome.css sdk/docs/style/doxygen-awesome-sidebar-only-darkmode-toggle.css
1360+
HTML_EXTRA_STYLESHEET = doxygen/style/doxygen-awesome.css doxygen/style/doxygen-awesome-sidebar-only-darkmode-toggle.css
13611361

13621362
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
13631363
# other source files which should be copied to the HTML output directory. Note
@@ -1367,7 +1367,7 @@ HTML_EXTRA_STYLESHEET = sdk/docs/style/doxygen-awesome.css sdk/docs/style/doxyg
13671367
# files will be copied as-is; there are no commands or markers available.
13681368
# This tag requires that the tag GENERATE_HTML is set to YES.
13691369

1370-
HTML_EXTRA_FILES = sdk/docs/style/doxygen-awesome-darkmode-toggle.js sdk/docs/style/doxygen-awesome-fragment-copy-button.js
1370+
HTML_EXTRA_FILES = doxygen/style/doxygen-awesome-darkmode-toggle.js doxygen/style/doxygen-awesome-fragment-copy-button.js
13711371

13721372
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
13731373
# should be rendered with a dark or light theme.

sdk/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ set(TARGET_SOURCES
6464
src/version.cpp
6565
)
6666

67-
list(APPEND ALL_SOURCES ${TARGET_HEADERS} ${TARGET_SOURCES})
68-
list(TRANSFORM ALL_SOURCES_ABS_PATH PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
69-
7067
target_compile_features(${TARGET_NAME} PUBLIC cxx_std_20)
7168
target_sources(${TARGET_NAME} PUBLIC ${TARGET_HEADERS} PRIVATE ${TARGET_SOURCES})
7269
target_include_directories(${TARGET_NAME}

sdk/docs/logo/logo-big.png

-6.06 KB
Binary file not shown.

sdk/docs/logo/logo-small.png

-1.03 KB
Binary file not shown.

0 commit comments

Comments
 (0)