Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1bda844
Added build pipeline for github-action.
StefanoLusardiTC May 15, 2025
f360b3b
Add workflow dispatch on github action.
StefanoLusardiTC May 15, 2025
2c855b4
Update build.yml
StefanoLusardiTC May 15, 2025
97a5778
Fixed matrix issue.
StefanoLusardiTC May 15, 2025
a533be4
Address multi job issue in CI matrix.
StefanoLusardiTC May 15, 2025
7606463
Update shell selection condition.
StefanoLusardiTC May 15, 2025
c7f3f30
Another attempt to set shell type.
StefanoLusardiTC May 15, 2025
aea60c1
Removed shell option.
StefanoLusardiTC May 15, 2025
0548aa6
Update python version on macOS. Update PowerShell script on Windows.
StefanoLusardiTC May 15, 2025
2bd30cd
Create shell action.yml
StefanoLusardiTC May 15, 2025
462305c
Update build.yml
StefanoLusardiTC May 15, 2025
f669005
Update build.yml
StefanoLusardiTC May 15, 2025
075e275
Disabled Code Coverage step.
StefanoLusardiTC May 16, 2025
80dfab6
Updated cache key. Silence warnings on Visual Studio 2019.
StefanoLusardiTC May 16, 2025
25b7280
Disable warning 4267 on MSVC to address Visual Studio 2019 build issues.
StefanoLusardiTC May 16, 2025
aec32e1
Disable warning 4244 on MSVC to address Visual Studio 2019 build issues.
StefanoLusardiTC May 16, 2025
b6c0a0f
Disable warning 4018 on MSVC to address Visual Studio 2019 build issues.
StefanoLusardiTC May 16, 2025
2344da2
Disable warning 4702 on MSVC to address Visual Studio 2019 build issues.
StefanoLusardiTC May 16, 2025
d785a37
Merged virtual environment cache on github action.
StefanoLusardiTC May 17, 2025
a810e7d
Update build.yml
StefanoLusardiTC May 18, 2025
40e88f5
Removed unused examples.
StefanoLusardiTC May 23, 2025
81992d2
Update build.yml
StefanoLusardiTC May 23, 2025
190d88d
Merge branch 'github-action' of https://github.com/TeiaCare/TeiaCareI…
StefanoLusardiTC May 23, 2025
156fcea
Update conanfile.py
StefanoLusardiTC May 23, 2025
8d8539f
Merge branch 'github-action' of https://github.com/TeiaCare/TeiaCareI…
StefanoLusardiTC May 23, 2025
78dcb44
Conan file updated.
StefanoLusardiTC May 23, 2025
d66ffac
Set grpc version in conanfile.py to 1.67.1
StefanoLusardiTC May 23, 2025
a3ae497
Fixed test_package
StefanoLusardiTC May 23, 2025
a061873
Fixed test_package source code.
StefanoLusardiTC May 23, 2025
859bc9e
Updated scripts
StefanoLusardiTC May 23, 2025
c25a7bf
Updated Conan package test.
StefanoLusardiTC May 23, 2025
8760eec
Removed timeouts.
StefanoLusardiTC May 23, 2025
4346b76
Test to disable CI cache.
StefanoLusardiTC May 24, 2025
51812e4
Troubleshoot conan remotes setup.
StefanoLusardiTC May 24, 2025
c8d5f58
Another attempt
StefanoLusardiTC May 24, 2025
57961c4
Keep Conan home env var on remotes creation steps.
StefanoLusardiTC May 24, 2025
c0f6b90
Do not overwrite already existing packages.
StefanoLusardiTC May 24, 2025
79e83c0
Upload only conan binaries and avoid recipe.
StefanoLusardiTC May 24, 2025
49925a0
Reverted "no-overwrite" flag for conan upload.
StefanoLusardiTC May 24, 2025
4cd1697
Added deploy job to upload conan package.
StefanoLusardiTC May 25, 2025
561a978
Update artifacts path to upload
StefanoLusardiTC May 25, 2025
a4f459a
Updated docs workflow. Updated conan cache path.
StefanoLusardiTC May 25, 2025
f835bb3
Add include-hidden-files options to artifacts upload step.
StefanoLusardiTC May 25, 2025
ceff778
Updated path for downloading artifacts.
StefanoLusardiTC May 25, 2025
40f9c75
Prefix build/deploy jobs with CI/CD prefixes.
StefanoLusardiTC May 25, 2025
43f8bd1
Force sequential (parallel=1) deploy stage execution to avoid Conan u…
StefanoLusardiTC May 25, 2025
96797b2
Conditionally upload conan package.
StefanoLusardiTC May 26, 2025
195be25
Update force_deployment option.
StefanoLusardiTC May 26, 2025
e91f468
Set python version to 3.12 for every OS. Disabled MacOS jobs
StefanoLusardiTC May 26, 2025
45d5f49
Merge branch 'develop' into github-action
StefanoLusardiTC May 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/actions/shell/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Run Shell Commands"
description: "Runs a list of commands on the native OS shell"

inputs:
commands:
description: 'Multiline string of commands to run'
required: true

runs:
using: "composite"
steps:
- name: CMD
if: runner.os == 'Windows'
shell: cmd
run: |
${{ inputs.commands }}
- name: Bash
if: runner.os != 'Windows'
shell: bash
run: |
${{ inputs.commands }}
245 changes: 245 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1 +1,246 @@
name: Build

on:
push:
workflow_dispatch:
inputs:
force_deployment:
description: 'Force Conan package deploy'
required: true
default: true
type: boolean


jobs:
build:
strategy:
fail-fast: false
matrix:
build_type: ['Debug', 'Release', 'RelWithDebInfo']
config:
# - name: windows2022_msvc2022
# os: windows-2022
# compiler: visual_studio
# compiler_version: 17
# setup_build_env: 'call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
# activate_venv: 'call ".venv\\Scripts\\activate.bat"'

# - name: windows2019_msvc2019
# os: windows-2019
# compiler: visual_studio
# compiler_version: 16
# setup_build_env: 'call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
# activate_venv: 'call ".venv\\Scripts\\activate.bat"'

- name: macos14_clang15
os: macos-14
compiler: clang
compiler_version: 15
setup_build_env: ""
activate_venv: 'source .venv/bin/activate'

- name: ubuntu2204_gcc12
os: ubuntu-22.04
compiler: gcc
compiler_version: 12
setup_build_env: ""
activate_venv: 'source .venv/bin/activate'

- name: ubuntu2204_clang15
os: ubuntu-22.04
compiler: clang
compiler_version: 15
setup_build_env: ""
activate_venv: 'source .venv/bin/activate'

runs-on: ${{ matrix.config.os }}
name: CI ${{ matrix.config.name }} ${{ matrix.build_type }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: Set Python version
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'

- name: Setup Virtual Environment
uses: ./.github/actions/shell
with:
commands: |
python3 -m venv .venv
${{ matrix.config.activate_venv }}
pip3 install -r scripts/requirements.txt
conan remote add teiacare ${{ secrets.ARTIFACTORY_URL }}/teiacare --insert 0 --force
conan user ${{ secrets.ARTIFACTORY_USERNAME }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} -r teiacare
env:
CONAN_USER_HOME: ${{ github.workspace }}

- name: Setup Conan
uses: ./.github/actions/shell
with:
commands: |
${{ matrix.config.activate_venv }}
python3 scripts/conan/setup.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}
env:
CONAN_USER_HOME: ${{ github.workspace }}

- name: Build
uses: ./.github/actions/shell
with:
commands: |
${{ matrix.config.activate_venv }}
${{ matrix.config.setup_build_env }}
python3 scripts/cmake.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }} --warnings
env:
CONAN_USER_HOME: ${{ github.workspace }}

- name: Unit Tests
uses: ./.github/actions/shell
with:
commands: |
${{ matrix.config.activate_venv }}
${{ matrix.config.setup_build_env }}
python3 scripts/cmake.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }} --warnings --coverage
python3 scripts/tools/run_unit_tests.py ${{ matrix.build_type }}
env:
CONAN_USER_HOME: ${{ github.workspace }}
continue-on-error: true
timeout-minutes: 5

# - name: Run Code Coverage ([email protected])
# uses: ./.github/actions/shell
# if: ${{ matrix.build_type == 'Release' && matrix.config.name == 'ubuntu2204_gcc12' }}
# with:
# commands: |
# ${{ matrix.config.activate_venv }}
# python3 scripts/tools/run_coverage.py ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}
# env:
# CONAN_USER_HOME: ${{ github.workspace }}
# continue-on-error: true
# timeout-minutes: 5

# - name: Upload Codecov
# if: ${{ matrix.build_type == 'Release' && matrix.config.name == 'ubuntu2204_gcc12' }}
# uses: codecov/codecov-action@v4
# with:
# files: './results/coverage/cobertura.xml'
# name: TeiaCareVideoIO
# slug: TeiaCare/TeiaCareVideoIO
# token: ${{secrets.CODECOV_TOKEN}}
# flags: '${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}'

# - name: Upload Codacy
# if: ${{ matrix.build_type == 'Release' && matrix.config.name == 'ubuntu2204_gcc12' }}
# run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r results/coverage/cobertura.xml
# env:
# CODACY_PROJECT_TOKEN: ${{secrets.CODACY_TOKEN}}

- name: Create Conan Package
uses: ./.github/actions/shell
with:
commands: |
${{ matrix.config.activate_venv }}
${{ matrix.config.setup_build_env }}
python3 scripts/conan/create.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }}
env:
CONAN_USER_HOME: ${{ github.workspace }}

- name: Publish Conan cache
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.name }}-${{ matrix.build_type }}
path: .conan
if-no-files-found: error
overwrite: true
include-hidden-files: true

deploy:
needs: build
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force_deployment == 'true' || github.ref == 'refs/heads/develop' }}
strategy:
fail-fast: false
matrix:
build_type: ['Debug', 'Release', 'RelWithDebInfo']
config:
# - name: windows2022_msvc2022
# os: windows-2022
# compiler: visual_studio
# compiler_version: 17
# setup_build_env: 'call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
# activate_venv: 'call ".venv\\Scripts\\activate.bat"'

# - name: windows2019_msvc2019
# os: windows-2019
# compiler: visual_studio
# compiler_version: 16
# setup_build_env: 'call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"'
# activate_venv: 'call ".venv\\Scripts\\activate.bat"'

# - name: macos14_clang15
# os: macos-14
# compiler: clang
# compiler_version: 15
# setup_build_env: ""
# activate_venv: 'source .venv/bin/activate'

- name: ubuntu2204_gcc12
os: ubuntu-22.04
compiler: gcc
compiler_version: 12
setup_build_env: ""
activate_venv: 'source .venv/bin/activate'

- name: ubuntu2204_clang15
os: ubuntu-22.04
compiler: clang
compiler_version: 15
setup_build_env: ""
activate_venv: 'source .venv/bin/activate'

runs-on: ${{ matrix.config.os }}
name: CD ${{ matrix.config.name }} ${{ matrix.build_type }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: Set Python version
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'

- name: Setup Virtual Environment
uses: ./.github/actions/shell
with:
commands: |
python3 -m venv .venv
${{ matrix.config.activate_venv }}
pip3 install -r scripts/requirements.txt
conan remote add teiacare ${{ secrets.ARTIFACTORY_URL }}/teiacare --insert 0 --force
conan user ${{ secrets.ARTIFACTORY_USERNAME }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} -r teiacare
env:
CONAN_USER_HOME: ${{ github.workspace }}

- name: Download Conan cache artifacts
uses: actions/download-artifact@v4
with:
name: ${{ matrix.config.name }}-${{ matrix.build_type }}
path: .conan/

- name: Upload Conan Package
uses: ./.github/actions/shell
with:
commands: |
${{ matrix.config.activate_venv }}
${{ matrix.config.setup_build_env }}
python3 scripts/conan/upload.py teiacare ${{ secrets.ARTIFACTORY_URL }} ${{ secrets.ARTIFACTORY_USERNAME }} ${{ secrets.ARTIFACTORY_PASSWORD }}
env:
CONAN_USER_HOME: ${{ github.workspace }}
8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

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

- name: Build Docs
- name: Install Doxygen
run: sudo apt-get install -y doxygen graphviz

- name: Build Docs
run: python3 scripts/tools/run_doxygen.py
run: python3 scripts/tools/run_doxygen.py -d inference_client/docs/Doxyfile

- name: Upload Docs
uses: actions/upload-pages-artifact@v3
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Examples:
### Dependencies Setup
This script must be executed in order to setup the 3rd party dependencies using conan packages.
```bash
conan remote add teiacare https://artifactory.app.teiacare.com/artifactory/api/conan/teiacare --insert 0 --force
conan user <USERNAME> -p <PASSWORD> -r teiacare

python scripts/conan/setup.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION>
```

Expand Down
2 changes: 2 additions & 0 deletions cmake/warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ function(add_warnings_as_errors TARGET)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(${TARGET} PRIVATE -Werror)
elseif(MSVC)
# On Visual Studio disable warnings from 3rd party dependencies.
target_compile_options(${TARGET} PRIVATE /wd4100 /wd4127 /wd4267 /wd4244 /wd4018 /wd4702)
target_compile_options(${TARGET} PRIVATE /WX)
endif()
endfunction()
1 change: 0 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def configure(self):
self.options["grpc"].php_plugin=False
self.options["grpc"].python_plugin=False
self.options["grpc"].ruby_plugin=False
self.options["grpc"].otel_plugin=False
self.options["grpc"].secure=True

def generate(self):
Expand Down
10 changes: 10 additions & 0 deletions inference_client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ if(TC_ENABLE_WARNINGS_ERROR)
add_warnings_as_errors(${TARGET_NAME})
endif()

if(TC_ENABLE_SANITIZER_ADDRESS)
include(sanitizer_address)
add_sanitizer_address(${TARGET_NAME})
endif()

if(TC_ENABLE_SANITIZER_THREAD)
include(sanitizer_thread)
add_sanitizer_thread(${TARGET_NAME})
endif()

#################################################################
# Unit Tests
if(TC_ENABLE_UNIT_TESTS)
Expand Down
6 changes: 0 additions & 6 deletions inference_client/conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ grpc/1.67.1
spdlog/1.14.1
gtest/1.15.0

#opencv/4.5.5
#triton-client/2.31.0@teiacare/stable

[generators]
CMakeDeps

Expand All @@ -19,7 +16,4 @@ grpc:objective_c_plugin=False
grpc:php_plugin=False
grpc:python_plugin=False
grpc:ruby_plugin=False
gpc:otel_plugin=False
grpc:secure=True

opencv:with_ffmpeg=False
Loading