-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-coverage.yml
75 lines (63 loc) · 2.2 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
trigger:
- develop
variables:
- group: jfrog-artifactory
strategy:
matrix:
linux-release:
imageName: 'ubuntu-18.04'
BUILD_CONFIGURATION: RelWithDebInfo
MULTITHREADING: False
DISABLE_LLVM_CONFIG: True
pool:
vmImage: $(imageName)
steps:
- powershell: gci env:* | sort-object name
- bash: |
mkdir -p $HOME/.inaos/cmake
mkdir -p $HOME/INAOS
echo "INAC_REPOSITORY_LOCAL=$HOME/INAOS" > $HOME/.inaos/cmake/repository.txt
echo "INAC_REPOSITORY_REMOTE=https://inaos.jfrog.io/inaos/libs-release-local/inaos" >> $HOME/.inaos/cmake/repository.txt
echo "INAC_REPOSITORY_USRPWD=licensed:AKCp5bBraH7CasbsYCURsjzkbjXwVwdYcT7u39EiuL6GjnK1VKfKQWCd1E2E64mHokU5YUHku" >> $HOME/.inaos/cmake/repository.txt
git submodule update --init --recursive
displayName: Clone repos
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: |
conda install -y -c intel mkl-include
conda install -y -c intel mkl-static
conda install -y -c intel icc_rt
conda install -y -c conda-forge 'llvmdev>=13'
conda install -y -c conda-forge gcovr
ls -l $CONDA/bin
displayName: Download dependencies
env:
jfrog_artifactory_uid: $(jfrog_artifactory_uid)
jfrog_artifactory_pwd: $(jfrog_artifactory_pwd)
- bash: |
mkdir cmake-build-$BUILD_CONFIGURATION
cd cmake-build-$BUILD_CONFIGURATION
cmake ../ -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION -DMULTITHREADING=$MULTITHREADING -DDISABLE_LLVM_CONFIG=$DISABLE_LLVM_CONFIG -DLLVM_ROOT=$CONDA -DDO_COVERAGE=TRUE
cmake --build .
displayName: Compile
env:
BUILD_CONFIGURATION: $(BUILD_CONFIGURATION)
MULTITHREADING: $(MULTITHREADING)
MKLROOT: $(CONDA)
SVMLROOT: $(CONDA)/lib
- bash: |
cd cmake-build-$BUILD_CONFIGURATION
ctest -L iarray
ctest -L iarray -D ExperimentalCoverage
ls -lR
mv CMakeFiles/iarray_c.dir/src/*.gc* ../src/
displayName: Execute tests
- bash: |
rename 's/\.c\./\./' src/*
gcovr --gcov-ignore-parse-errors -v -r src/ --xml -o coverage.xml
displayName: Create coverage report
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'