-
Notifications
You must be signed in to change notification settings - Fork 9
/
azure-pipelines.yml
55 lines (48 loc) · 1.5 KB
/
azure-pipelines.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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- main
- codecov
pool:
vmImage: ubuntu-latest
strategy:
matrix:
Python310:
python.version: '3.10'
boost: 'false'
Python310Boost:
python.version: '3.10'
boost: 'true'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
conda config --set always_yes yes
if [ $(boost) = 'true' ]
then
conda install -c conda-forge lcov pytest boost
echo "##vso[task.setvariable variable=BOOST_ROOT]$(conda info --base)"
else
conda install -c conda-forge lcov pytest
fi
displayName: 'Install conda dependencies'
- script: |
# enable code coverage via setup.cfg
echo '[CMakeBuild]' > setup.cfg
echo 'code_coverage=ON' >> setup.cfg
python setup.py develop
displayName: 'Compile wicked'
- script: |
pip install pytest pytest-azurepipelines
pytest tests
displayName: 'Run pytest'
- script: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*fmt*' '*c++*' '*pybind11*' 'wicked/fmt/*' --output-file coverage2.info
lcov --list coverage2.info #debug info
bash <(curl -s https://codecov.io/bash)
displayName: 'Upload to codecov.io'