summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/code_coverage.yml78
-rw-r--r--CMakeLists.txt12
-rw-r--r--codecov.yml4
3 files changed, 7 insertions, 87 deletions
diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml
deleted file mode 100644
index e8ad3ba..0000000
--- a/.github/workflows/code_coverage.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-name: Code coverage
-
-on:
- schedule:
- - cron: '0 0 */16 * *'
- workflow_dispatch:
-
-env:
- BUILD_TYPE: Debug
-
-jobs:
- build:
- strategy:
- matrix:
- os: [ ubuntu-latest, macos-11, windows-2019 ]
-
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Install gcovr
- if: runner.os != 'Windows'
- run: |
- python3 -m pip install gcovr==5.0
-
- - name: Install OpenCppCoverage
- if: runner.os == 'Windows'
- shell: bash
- run: |
- choco install opencppcoverage
- echo "C:/Program Files/OpenCppCoverage" >> $GITHUB_PATH
-
- - name: Build
- if: runner.os != 'Windows'
- run: |
- cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S .
- cmake --build build --config $BUILD_TYPE
-
- - name: Build with Visual Studio
- if: runner.os == 'Windows'
- shell: bash
- run: |
- cmake -B build -S .
- cmake --build build --config $BUILD_TYPE
-
- - name: Run tests
- if: runner.os != 'Windows'
- working-directory: ${{ github.workspace }}/build
- run: |
- ctest -V -C $BUILD_TYPE
-
- - name: Generate coverage on Linux
- if: runner.os == 'Linux'
- working-directory: ${{ github.workspace }}/build
- run: |
- gcovr -j $(nproc) --delete --root ../source/ --exclude '\.\./source/test/' --print-summary --xml-pretty --xml coverage.xml .
-
- - name: Generate coverage on macOS
- if: runner.os == 'macOS'
- working-directory: ${{ github.workspace }}/build
- run: |
- gcovr -j 2 --delete --root ../source/ --exclude '\.\./source/test/' --print-summary --xml-pretty --xml coverage.xml .
-
- - name: Run tests & generate coverage on Windows
- if: runner.os == 'Windows'
- shell: bash
- working-directory: ${{ github.workspace }}/build
- run: |
- OpenCppCoverage.exe --sources source\\* --excluded_sources source\\test\\* --export_type cobertura:coverage.xml --cover_children -- ctest -V -C $BUILD_TYPE
-
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v2
- with:
- files: ./build/coverage.xml
- flags: ${{ runner.os }}
- name: ${{ runner.os }} build
- fail_ci_if_error: true
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b0719e..b5d1cc2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 3.16)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "" FORCE)
+
+if(NOT DEFINED CMAKE_BUILD_PARALLEL_LEVEL)
+ set(CMAKE_BUILD_PARALLEL_LEVEL 4 CACHE STRING "" FORCE)
+endif()
+
option(KIT_ENABLE_TESTING "Enable testing" ON)
option(KIT_DISABLE_SYSTEM_MALLOC "Disable system memory allocator" OFF)
@@ -11,10 +17,6 @@ set(KIT_TEST_LIBRARY kit_test)
set(KIT_TEST_SUITE kit_test_suite)
set(KIT_TARGETS kit-targets)
-if(NOT DEFINED CMAKE_BUILD_PARALLEL_LEVEL)
- set(CMAKE_BUILD_PARALLEL_LEVEL 4)
-endif()
-
project(
${KIT_PROJECT}
VERSION 0.1.1
@@ -211,4 +213,4 @@ install(
"${CMAKE_CURRENT_BINARY_DIR}/${project_lower_}-config-version.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
-unset(project_lower_) \ No newline at end of file
+unset(project_lower_)
diff --git a/codecov.yml b/codecov.yml
deleted file mode 100644
index 35cde5c..0000000
--- a/codecov.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-coverage:
- status:
- project: off
- patch: off