forked from joblib/joblib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
120 lines (104 loc) · 3.54 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# 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:
- master
jobs:
- job: linting
displayName: Linting
pool:
vmImage: ubuntu-latest
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- bash: conda create --name flake8_env --yes flake8
displayName: Install flake8
- bash: |
if [[ $BUILD_SOURCEVERSIONMESSAGE =~ \[lint\ skip\] ]]; then
# skip linting
echo "Skipping linting"
exit 0
else
source activate flake8_env
bash continuous_integration/flake8_diff.sh
fi
displayName: Run linting
- job: testing
displayName: Testing
strategy:
matrix:
linux_pypy3:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "pypy3"
LOKY_MAX_CPU_COUNT: "2"
linux_py38:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.8"
EXTRA_CONDA_PACKAGES: "numpy=1.18"
linux_py37_sklearn_tests:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.7"
EXTRA_CONDA_PACKAGES: "numpy=1.16"
SKIP_TESTS: "true"
SKLEARN_TESTS: "true"
linux_py37_distributed:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.7"
EXTRA_CONDA_PACKAGES: "numpy=1.15 distributed=2.13"
linux_py36_cython:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.6"
EXTRA_CONDA_PACKAGES: "numpy=1.14"
CYTHON: "true"
linux_py36_no_multiprocessing_no_lzma:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.6"
EXTRA_CONDA_PACKAGES: "numpy=1.14"
JOBLIB_MULTIPROCESSING: "0"
NO_LZMA: "1"
linux_py36_no_numpy:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.6"
windows_py38:
imageName: "vs2017-win2016"
PYTHON_VERSION: "3.8"
EXTRA_CONDA_PACKAGES: "numpy=1.18"
macos_py38:
imageName: "macos-10.14"
PYTHON_VERSION: "3.8"
EXTRA_CONDA_PACKAGES: "numpy=1.18"
macos_py36_no_numpy:
imageName: "macos-10.14"
PYTHON_VERSION: "3.6"
variables:
JUNITXML: 'test-data.xml'
COVERAGE: "true"
pool:
vmImage: $(imageName)
steps:
- bash: echo "##vso[task.prependpath]C:/Program Files/Git/bin"
displayName: 'Override Git bash shell for Windows'
condition: eq(variables['Agent.OS'], 'Windows_NT')
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
displayName: Add conda to PATH
condition: ne(variables['Agent.OS'], 'Windows_NT')
- bash: bash continuous_integration/install.sh
displayName: 'Install joblib and its dependencies'
- bash: bash continuous_integration/run_tests.sh
displayName: 'Run the tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: '$(JUNITXML)'
displayName: 'Publish Test Results'
condition: and(succeededOrFailed(), ne(variables['SKIP_TESTS'], 'true'))
- bash: curl -s https://codecov.io/bash | bash
displayName: 'Upload to codecov'
condition: and(succeeded(), ne(variables['SKIP_TESTS'], 'true'), eq(variables['COVERAGE'], 'true'))