Fix issues found with ASan and UBSan #282
This file contains 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: Coverage | |
on: | |
push: | |
paths: | |
- '.github/**' | |
- 'cmake/**' | |
- 'include/**' | |
- 'scripts/**' | |
- 'src/**' | |
- 'test/**' | |
- '**/CMakeLists.txt' | |
- '**/.gitmodules' | |
pull_request: | |
paths: | |
- '.github/**' | |
- 'cmake/**' | |
- 'include/**' | |
- 'scripts/**' | |
- 'src/**' | |
- 'test/**' | |
- '**/CMakeLists.txt' | |
- '**/.gitmodules' | |
workflow_dispatch: | |
jobs: | |
codecov: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup CMake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Create Build Environment | |
run: | | |
sudo locale-gen en_US.UTF-8 | |
sudo locale-gen fi_FI.UTF-8 | |
sudo update-locale | |
sudo locale -a | |
sudo apt-get install -yq lcov | |
mkdir ${{ runner.workspace }}/build | |
mkdir ${{ runner.workspace }}/report | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Run CMake | |
working-directory: ${{ runner.workspace }}/build | |
run: | | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_CXX_STANDARD=20 \ | |
-DSCN_BUILD_LOCALIZED_TESTS=ON -DSCN_COVERAGE=ON \ | |
-DSCN_BENCHMARKS=OFF -DSCN_EXAMPLES=OFF \ | |
$GITHUB_WORKSPACE | |
- name: Build | |
working-directory: ${{ runner.workspace }}/build | |
run: | | |
cmake --build . -- -k 0 | |
- name: Generate Coverage Report | |
working-directory: ${{ runner.workspace }}/build | |
run: | | |
./coverage.sh | |
cp coverage-filtered.info ${{ runner.workspace }}/report/coverage.info | |
- name: Upload Coverage Report | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: ${{ runner.workspace }}/report | |
fail_ci_if_error: true | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |