cmake: check if correct libvmi is supplied #203
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: CPP CI VMICore | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| paths: | |
| - 'vmicore/**.h' | |
| - 'vmicore/**.cpp' | |
| - 'vmicore/**/CMakeLists.txt' | |
| - 'vmicore/CMakePresets.json' | |
| - 'vmicore/.clang-tidy' | |
| - 'vmicore/.clang-format' | |
| - 'vmicore/sonar-project.properties' | |
| pull_request: | |
| branches: | |
| - "main" | |
| paths: | |
| - 'vmicore/**.h' | |
| - 'vmicore/**.cpp' | |
| - 'vmicore/**/CMakeLists.txt' | |
| - 'vmicore/CMakePresets.json' | |
| - 'vmicore/.clang-tidy' | |
| - 'vmicore/.clang-format' | |
| - 'vmicore/sonar-project.properties' | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: gdatacyberdefense/clang-format:19 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Perform C++ format check | |
| run: find vmicore/ -iname *.h -o -iname *.cpp | xargs clang-format --style=file --dry-run --Werror | |
| build_core: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/gdatasoftwareag/vmi-build | |
| strategy: | |
| matrix: | |
| compiler: [clang, gcc] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Export GitHub Actions cache environment variables | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - name: Build and test vmicore | |
| run: | | |
| cmake --preset ${{ matrix.compiler }}-debug | |
| cmake --build --preset ${{ matrix.compiler }}-build-debug | |
| ctest --preset ${{ matrix.compiler }}-test | |
| working-directory: vmicore | |
| env: | |
| VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" |