-
Notifications
You must be signed in to change notification settings - Fork 166
/
azure-pipelines.yml
92 lines (79 loc) · 2.59 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
variables:
AZURE_BUILD: true
trigger:
- master
jobs:
- job: 'Test'
displayName: 'Unit tests'
pool:
vmImage: $(image.name)
strategy:
matrix:
linux-python39:
image.name: 'ubuntu-latest'
python.version: '3.9'
linux-python310:
image.name: 'ubuntu-latest'
python.version: '3.10'
linux-python311:
image.name: 'ubuntu-latest'
python.version: '3.11'
linux-python312:
image.name: 'ubuntu-latest'
python.version: '3.12'
osx-python39:
image.name: 'macos-latest'
python.version: '3.9'
osx-python310:
image.name: 'macos-latest'
python.version: '3.10'
osx-python311:
image.name: 'macos-latest'
python.version: '3.11'
osx-python312:
image.name: 'macos-latest'
python.version: '3.12'
windows-python39:
image.name: 'windows-latest'
python.version: '3.9'
windows-python310:
image.name: 'windows-latest'
python.version: '3.10'
windows-python311:
image.name: 'windows-latest'
python.version: '3.11'
windows-python312:
image.name: 'windows-latest'
python.version: '3.12'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
displayName: 'Use Python $(python.version)'
- script: env
displayName: 'List enviromental variables'
- script: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install numpy
displayName: 'Install job dependencies'
# stop the build if there are Python syntax errors or undefined names
- script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
displayName: 'Check for syntax errors'
- script: pip install -vv .
displayName: 'Install package'
- script: pip install pynndescent
displayName: 'Install optional dependencies - pynndescent'
- script: pip install hnswlib
env:
HNSWLIB_NO_NATIVE: 1 # -march=native is not available on clang, so just disable it
displayName: 'Install optional dependencies - hnswlib'
# Since Python automatically adds `cwd` to `sys.path`, it's important we remove the local folder
# containing our code from the working directory. Otherwise, the tests will use the local copy
# instead of the installed package. We can easily achieve this by renaming the source folder.
- bash: mv openTSNE src
displayName: 'Remove source files from path'
- script: pytest -v
timeoutInMinutes: 15
displayName: 'Run unit tests'