Skip to content

improve test coverage #64

improve test coverage

improve test coverage #64

Workflow file for this run

name: Sanitize
on:
push:
branches:
- master
tags:
- v**.**
pull_request:
branches:
- master
jobs:
sanitize:
strategy:
fail-fast: false
matrix:
# sanitize: [address, memory, thread]
sanitize: [address]
include:
- sanitize: address
sanitize_flag: ENABLE_LLVM_ADDRESS_SANITIZER
# - sanitize: memory
# sanitize_flag: ENABLE_LLVM_MEMORY_SANITIZER
# - sanitize: thread
# sanitize_flag: ENABLE_LLVM_THREAD_SANITIZER
env:
os: "ubuntu-latest"
build_profile: "clang20d"
conan_preset: "clang-20-debug"
name: ${{ matrix.sanitize }}
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- uses: seanmiddleditch/gha-setup-vsdevenv@master
- uses: KyleMayes/install-llvm-action@v1
with:
version: "17.0"
directory: ${{ runner.temp }}/llvm
- run: pip install conan
- name: Install GCC
if: ${{ env.os == 'ubuntu-latest' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-13 g++-13
sudo update-alternatives --remove-all gcc || true
sudo update-alternatives --remove-all g++ || true
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10 --slave /usr/bin/g++ g++ /usr/bin/g++-13
- name: Cache conan packages
id: cache-conan
uses: actions/cache@v3
with:
path: ~/.conan2/p
key: conan-cache-packages-${{ env.build_profile }}
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
env:
PR: "${{github.workspace}}/.github/build_profiles/${{env.build_profile}}"
run: |
cmake -E make_directory "${{github.workspace}}/build"
conan install "${{github.workspace}}" --build=missing -pr $PR -pr:b $PR
conan cache clean
cmake -S "${{github.workspace}}" --preset conan-${{ env.conan_preset }} -D${{ matrix.sanitize_flag }}:BOOL=ON
- name: Build
run: |
cmake --build --preset conan-${{ env.conan_preset }}
- name: Test
run: ${{github.workspace}}/build/${{ env.conan_preset }}/bin/test