forked from joblib/joblib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
181 lines (155 loc) · 5.1 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# 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
schedules:
- cron: "0 9 * * *"
displayName: Daily build
branches:
include:
- main
trigger:
- main
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
flake8
fi
displayName: Run linting
- job: testing
displayName: Testing
strategy:
matrix:
linux_pypy38_v7311:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "pypy3.8"
PYPY_VERSION: "7.3.11"
LOKY_MAX_CPU_COUNT: "2"
linux_pypy38_v736:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "pypy3.8"
PYPY_VERSION: "7.3.6"
LOKY_MAX_CPU_COUNT: "2"
linux_pypy310_v7313:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "pypy3.10"
PYPY_VERSION: "7.3.13"
LOKY_MAX_CPU_COUNT: "2"
linux_py39_sklearn_tests:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.9"
# SKIP_TESTS: "true"
SKLEARN_TESTS: "true"
linux_py310_distributed:
# To be updated regularly to use the most recent versions of the
# dependencies.
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.10"
EXTRA_CONDA_PACKAGES: "numpy=1.23 distributed=2023.10.1"
linux_py38_distributed:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.8"
EXTRA_CONDA_PACKAGES: "numpy=1.18.5 distributed=2021.5.0"
linux_py311_cython:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.11"
EXTRA_CONDA_PACKAGES: "numpy=1.24.1"
CYTHON: "true"
linux_py38_no_multiprocessing_no_lzma:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.8"
EXTRA_CONDA_PACKAGES: "numpy=1.16"
JOBLIB_MULTIPROCESSING: "0"
NO_LZMA: "1"
linux_py38_no_numpy:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.8"
linux_py38_default_backend_threading:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "3.8"
JOBLIB_TESTS_DEFAULT_PARALLEL_BACKEND: "threading"
linux_py313_free_threaded:
imageName: 'ubuntu-latest'
PYTHON_VERSION: "free-threaded-3.13"
windows_py310:
imageName: "windows-latest"
PYTHON_VERSION: "3.10"
EXTRA_CONDA_PACKAGES: "numpy=1.23"
macos_py310:
imageName: "macos-latest"
PYTHON_VERSION: "3.10"
EXTRA_CONDA_PACKAGES: "numpy=1.23"
macos_py38_no_numpy:
imageName: "macos-latest"
PYTHON_VERSION: "3.8"
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'))
- task: PublishPipelineArtifact@1
inputs:
targetPath: .coverage
displayName: 'Create coverage artifact data'
condition: and(succeeded(), ne(variables['SKIP_TESTS'], 'true'), eq(variables['COVERAGE'], 'true'))
- job: coverage
displayName: Coverage
dependsOn: testing
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 coverage_env --yes coverage
displayName: Install coverage
- task: DownloadPipelineArtifact@2
inputs:
targetPath: ./
displayName: 'Gather coverage data'
- bash: |
source activate coverage_env
coverage combine **/.coverage
coverage xml
displayName: 'Consolidate coverage data'
- bash: curl -s https://codecov.io/bash | bash
displayName: 'Upload to codecov'
condition: succeeded()