Added codecov badge

This commit is contained in:
Bartek Kryza
2022-04-02 17:20:08 +02:00
parent ffc6d56c4d
commit fb00348081
5 changed files with 18 additions and 2 deletions

View File

@@ -20,5 +20,15 @@ jobs:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
- name: Build and unit test - name: Build and unit test
run: | run: |
NUMPROC=2 make debug NUMPROC=2 CMAKE_CXX_FLAGS="--coverage -fno-inline" make debug
make test make test
- name: Run coverage
run: |
lcov --no-external --directory src -c -d debug -o coverage.info
lcov -l coverage.info
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
files: coverage.info
name: clang-uml
fail_ci_if_error: true

2
.gitignore vendored
View File

@@ -20,6 +20,8 @@ bin/
/.cache /.cache
docs/diagrams docs/diagrams
coverage.info
# CLion # CLion

View File

@@ -47,6 +47,7 @@ set(LLVM_PREFERRED_VERSION 12.0.0)
find_package(LibClang REQUIRED) find_package(LibClang REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 ${LIBCLANG_CXXFLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 ${LIBCLANG_CXXFLAGS}")
message(STATUS "Using CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
# Thirdparty sources # Thirdparty sources
set(THIRDPARTY_HEADERS_DIR ${PROJECT_SOURCE_DIR}/thirdparty/) set(THIRDPARTY_HEADERS_DIR ${PROJECT_SOURCE_DIR}/thirdparty/)

View File

@@ -23,6 +23,7 @@
NUMPROC ?= $(shell nproc) NUMPROC ?= $(shell nproc)
LLVM_CONFIG_PATH ?= LLVM_CONFIG_PATH ?=
CMAKE_CXX_FLAGS ?=
.PHONY: clean .PHONY: clean
clean: clean:
@@ -32,6 +33,7 @@ debug/CMakeLists.txt:
cmake -S . -B debug \ cmake -S . -B debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="$(CMAKE_CXX_FLAGS)" \
-DLLVM_CONFIG_PATH=$(LLVM_CONFIG_PATH) -DLLVM_CONFIG_PATH=$(LLVM_CONFIG_PATH)
release/CMakeLists.txt: release/CMakeLists.txt:

View File

@@ -1,6 +1,7 @@
# clang-uml - C++ UML diagram generator based on Clang and PlantUML # clang-uml - C++ UML diagram generator based on Clang and PlantUML
![linux build](https://github.com/bkryza/clang-uml/actions/workflows/build.yml/badge.svg) [![Build status]](https://github.com/bkryza/clang-uml/actions/workflows/build.yml/badge.svg)
[![Coverage](https://codecov.io/gh/bkryza/clang-uml/branch/master/graph/badge.svg)](https://codecov.io/gh/bkryza/clang-uml)
`clang-uml` is an automatic C++ to [PlantUML](https://plantuml.com) class, sequence `clang-uml` is an automatic C++ to [PlantUML](https://plantuml.com) class, sequence
and package diagram generator, driven by YAML configuration files. The main idea behind the and package diagram generator, driven by YAML configuration files. The main idea behind the