forked from fgnt/paderbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
101 lines (93 loc) · 2.97 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# 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
#
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
# for vmImage. e.g. ubuntu-18.04, ubuntu-latest, ...
# Note: ubuntu-latest is not ubuntu-18.04. But I do not know why.
#
# Python 3.8 does not work at the moment.
# librosa needs numba
# numba needs llvmlite
# llvmlite can not be installed, see:
# https://github.com/numba/llvmlite/issues/527
#
# ubuntu-16.04 has the wrong sox version.
#
# Figure out, how sox can be installed in macos-10.13
trigger:
- master
strategy:
matrix:
Ubuntu18Python36:
IMAGE_NAME: 'ubuntu-18.04'
python.version: '3.6'
Ubuntu18Python37:
IMAGE_NAME: 'ubuntu-18.04'
python.version: '3.7'
# Ubuntu18Python38:
# IMAGE_NAME: 'ubuntu-18.04'
# python.version: '3.8'
# Ubuntu16Python36:
# IMAGE_NAME: 'ubuntu-16.04'
# python.version: '3.6'
# Ubuntu16Python37:
# IMAGE_NAME: 'ubuntu-16.04'
# python.version: '3.7'
# Ubuntu16Python38:
# IMAGE_NAME: 'ubuntu-16.04'
# python.version: '3.8'
# OSXPython36:
# IMAGE_NAME: 'macos-10.13'
# python.version: '3.6'
# OSXPython37:
# IMAGE_NAME: 'macos-10.13'
# python.version: '3.7'
# OSXPython38:
# IMAGE_NAME: 'macos-10.13'
# python.version: '3.8'
pool:
vmImage: $(IMAGE_NAME)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
# Print cmd before executing
trap 'echo -e "$ $BASH_COMMAND"' DEBUG
lsb_release -a
python --version
displayName: 'Show versions'
- script: |
# Print cmd before executing
trap 'echo -e "$ $BASH_COMMAND"' DEBUG
sudo apt-get update
sudo apt-get install libsndfile1 sox
python -m pip install --upgrade pip
# pip install -r requirements.txt
pip install numpy scipy Cython
pip install --editable .[all]
pip install git+https://github.com/fgnt/pb_bss.git#egg=pb_bss[all] # Remove pb_bss, when all corresponding tests are moved to pb_bss
displayName: 'Install dependencies'
- script: |
# Print cmd before executing
trap 'echo -e "$ $BASH_COMMAND"' DEBUG
pip install pytest-azurepipelines
pytest \
tests \
paderbox \
-v \
--test-run-title="Pytest $(IMAGE_NAME) py$(python.version)"
displayName: 'pytest'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'