-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
59 lines (47 loc) · 1.55 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
# 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
pool:
vmImage: "ubuntu-latest"
strategy:
matrix:
Python37:
python.version: "3.7"
Python38:
python.version: "3.8"
steps:
- task: Cache@2
inputs:
key: 'poetry | "$(Agent.OS)" | "$(python.version)" | v2 | poetry.lock'
path: /home/vsts/.cache/pypoetry/virtualenvs
restoreKeys: |
poetry | "$(Agent.OS)" | "$(python.version)" | v2
displayName: Cache pip packages
- task: Cache@2
inputs:
key: "downloads | v2"
path: $(System.DefaultWorkingDirectory)/downloads
restoreKeys: |
downloads | v2
displayName: Cache downloaded models
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"
- script: pip install poetry
displayName: "Install poetry"
- script: poetry run pip install --upgrade pip
displayName: "Upgrade pip"
- script: poetry install
displayName: "Install dependencies"
- script: sudo apt install -y ninja-build
displayName: "Install C++ dependencies"
- script: poetry run python src/amanda/cli/download_model.py
displayName: "Download models"
- script: poetry run make build_cc
displayName: "Build C++ code"
- script: poetry run pytest -m "not slow"
displayName: "Run pytest"