mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
Update coverage ci
This commit is contained in:
parent
f232c7d995
commit
d4c9227830
9
.github/workflows/coverage.yml
vendored
9
.github/workflows/coverage.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: ubuntu-latest-gcc-ci
|
||||
name: coverage-ci
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@ -18,7 +18,7 @@ on:
|
||||
- bugfix/**
|
||||
|
||||
jobs:
|
||||
gcc_tests:
|
||||
test_coverage:
|
||||
if: >-
|
||||
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
|
||||
! contains(toJSON(github.event.commits.*.message), '[skip github]')
|
||||
@ -43,6 +43,11 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: script/ci_install_deps.sh
|
||||
|
||||
- name: Install test coverage tools
|
||||
run: |
|
||||
apt update
|
||||
apt install -y gcovr lcov
|
||||
|
||||
- name: Configure
|
||||
run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug
|
||||
|
||||
|
@ -41,6 +41,6 @@ foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions
|
||||
target_link_libraries("${name}" PRIVATE ssp::ssp fast_float
|
||||
doctest::doctest)
|
||||
target_compile_definitions(
|
||||
"${name}" PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN CMAKE_GITHUB_CI)
|
||||
"${name}" PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN _CMAKE_GITHUB_CI)
|
||||
add_test(NAME "${name}" COMMAND "${name}")
|
||||
endforeach()
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <vector>
|
||||
#include <filesystem>
|
||||
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
#ifdef _CMAKE_GITHUB_CI
|
||||
#include <doctest/doctest.h>
|
||||
#else
|
||||
#include <doctest.h>
|
||||
|
Loading…
Reference in New Issue
Block a user