Updated scripts #28
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| 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: 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' | |
| - name: macos14_clang15 | |
| os: macos-14 | |
| compiler: clang | |
| compiler_version: 15 | |
| setup_build_env: "" | |
| activate_venv: 'source .venv/bin/activate' | |
| runs-on: ${{ matrix.config.os }} | |
| name: ${{ matrix.config.name }} ${{ matrix.build_type }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set Python version | |
| if: matrix.config.os == 'windows-2022' || matrix.config.os == 'windows-2019' || matrix.config.os == 'ubuntu-22.04' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| architecture: 'x64' | |
| - name: Set Python version | |
| if: matrix.config.os == 'macos-14' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| architecture: 'x64' | |
| - name: Cache Virtual Environment | |
| uses: actions/cache@v4 | |
| id: cache-venv | |
| with: | |
| path: .venv | |
| key: venv-${{ matrix.config.os }}-${{ hashFiles('scripts/requirements.txt') }} | |
| - name: Cache Conan | |
| uses: actions/cache@v4 | |
| with: | |
| path: .conan | |
| key: conan-${{ matrix.config.name }}-${{ matrix.build_type }}-${{ hashFiles('inference_client/conanfile.txt') }} | |
| - name: Setup Virtual Environment | |
| if: steps.cache-venv.outputs.cache-hit != 'true' | |
| uses: ./.github/actions/shell | |
| with: | |
| commands: | | |
| python3 -m venv .venv | |
| ${{ matrix.config.activate_venv }} | |
| pip3 install -r scripts/requirements.txt | |
| - name: Setup Conan (Visual Studio 2022) | |
| if: matrix.config.os == 'windows-2022' | |
| uses: ./.github/actions/shell | |
| env: | |
| CMAKE_C_FLAGS: '/TP' | |
| with: | |
| commands: | | |
| ${{ matrix.config.activate_venv }} | |
| python3 scripts/conan/setup.py ${{ matrix.build_type }} ${{ matrix.config.compiler }} ${{ matrix.config.compiler_version }} | |
| - name: Setup Conan | |
| if: matrix.config.os == 'windows-2019' || matrix.config.os == 'ubuntu-22.04' || matrix.config.os == 'macos-14' | |
| 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 }} | |
| - 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: 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 }} | |
| timeout-minutes: 5 | |
| - 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 }} | |
| timeout-minutes: 5 |