Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Codecov by Azure Pipelines Code Coverage #204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions .azure/codecov.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .azure/templates/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ steps:
conan profile update settings.compiler.libcxx=libstdc++11 default
condition: eq(variables['Agent.OS'], 'Linux')
name: update_conan_cxx_library
- bash: |
set -e -x
pip install gcovr --user --upgrade
condition: eq(variables['coverage'], 'on')
name: install_gcovr
- bash: |
set -e -x
sudo apt-get install libacl1-dev libncurses5-dev pkg-config
Expand Down Expand Up @@ -147,3 +152,25 @@ steps:
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
${GENERATOR:+-G} "${GENERATOR}" "${INSTALLPREFIX}/share/CycloneDDS-CXX/examples/helloworld"
name: test
- bash: |
set -e -x
cd build
cmake --build . --config ${BUILD_TYPE} --target gcov -- ${BUILD_TOOL_OPTIONS}
gcovr --exclude '.*/tests/.*' --root "${BUILD_SOURCESDIRECTORY}" --xml-pretty --output coverage.xml .
condition: eq(variables['coverage'], 'on')
name: generate_code_coverage
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: $(Build.SourcesDirectory)/build/coverage.xml
condition: eq(variables['coverage'], 'on')
name: publish_code_coverage
- task: PublishTestResults@2
inputs:
testRunner: CTest
testResultsFiles: '**/Test.xml'
searchFolder: $(System.DefaultWorkingDirectory)/build/Testing
platform: $(arch)
configuration: $(build_type)
condition: eq(variables['tests'], 'on')
name: publish_test_results
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ if(SANITIZER)
endif()

find_package(codecov)
include(Codecov)

# Build all executables and libraries into the top-level /bin and /lib folders.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tier-1 middleware for the Robot Operating System [ROS 2][6].

[![Build Status](https://dev.azure.com/eclipse-cyclonedds/cyclonedds-cxx/_apis/build/status/Pull%20requests?branchName=master)](https://dev.azure.com/eclipse-cyclonedds/cyclonedds-cxx/_build/latest?definitionId=4&branchName=master)
[![Coverity Status](https://scan.coverity.com/projects/21579/badge.svg)](https://scan.coverity.com/projects/eclipse-cyclonedds-cyclonedds-cxx)
[![Codecov](https://codecov.io/gh/eclipse-cyclonedds/cyclonedds-cxx/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/github/eclipse-cyclonedds/cyclonedds-cxx?branch=master)
[![Coverage](https://img.shields.io/azure-devops/coverage/eclipse-cyclonedds/cyclonedds-cxx/9/master)](https://dev.azure.com/eclipse-cyclonedds/cyclonedds-cxx/_build/latest?definitionId=9&branchName=master)
[![License](https://img.shields.io/badge/License-EPL%202.0-blue)](https://choosealicense.com/licenses/epl-2.0/)
[![License](https://img.shields.io/badge/License-EDL%201.0-blue)](https://choosealicense.com/licenses/edl-1.0/)

Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ strategy:
cxx: g++-10
'Ubuntu 18.04 LTS with GCC 7 (Debug, x86_64)':
image: ubuntu-18.04
coverage: on
tests: on
conanfile: conanfile102.txt
cc: gcc-7
gxx: g++-7
Expand Down
45 changes: 0 additions & 45 deletions cmake/Modules/Codecov.cmake

This file was deleted.

135 changes: 0 additions & 135 deletions cmake/Modules/Codecov/codecov.cmake

This file was deleted.