forked from FrancescAlted/caterva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-coverage.yml
44 lines (36 loc) · 1.01 KB
/
azure-pipelines-coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
trigger:
- master
strategy:
matrix:
linux-release:
imageName: 'ubuntu-16.04'
BUILD_CONFIGURATION: RelWithDebInfo
pool:
vmImage: $(imageName)
steps:
- bash: |
export PATH=$PATH:$(Build.SourcesDirectory)/build
- bash: |
git submodule sync
git submodule update --init --recursive
displayName: 'Clone repos'
- bash: |
mkdir build
cd build/
cmake -DCMAKE_BUILD_TYPE=$(BUILD_CONFIGURATION) -DENABLE_COVERAGE=TRUE ..
cmake --build .
displayName: 'Build caterva'
- bash: |
cd build/
ctest -T Test -V -L caterva
ctest -D ExperimentalCoverage
displayName: 'Tests'
- bash: |
yes | python -m pip install gcovr
mv build/CMakeFiles/caterva_static.dir/caterva/*.gc* caterva/
rename 's/\.c\./\./' caterva/*
python -m gcovr -v -r caterva/ --xml -o coverage.xml
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'