Skip to content

Add Conan build support #856

Add Conan build support

Add Conan build support #856

name: clang++
on:
push:
branches:
- 'main'
workflow_dispatch:
pull_request:
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install apt-get dependencies
run: |
sudo apt -qq update \
&& sudo apt install -y --no-install-recommends --no-install-suggests ninja-build
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Configure CMake
run: |
cmake -S ${{github.workspace}} -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_COMPILER=/usr/bin/clang-18 \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-18 \
-DCODE_COVERAGE:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-GNinja
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build/tests
run: ctest --output-on-failure
- name: Generate code coverage
working-directory: ${{github.workspace}}/build
run: |
ninja faker-ccov-all \
&& llvm-cov-18 show `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata > coverage.txt
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOVTOKEN }}