-
Notifications
You must be signed in to change notification settings - Fork 13
/
azure-pipelines.yml
113 lines (113 loc) · 3.43 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
trigger:
- master
- develop
jobs:
- job:
displayName: Ubuntu-latest
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
steps:
- checkout: self
fetchDepth: 1
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: conda create --yes --quiet --name Build
displayName: Create Anaconda environment
- bash: |
source activate Build
conda install --yes --quiet --name Build -c conda-forge python=$PYTHON_VERSION pytest setuptools dask distributed mkl_fft netcdf4 numba numpy pyinterp python-dateutil scipy xarray
displayName: Install build requirements
- bash: |
source activate Build
python setup.py build
displayName: Build package
- bash: |
source activate Build
pytest tests
displayName: Test cases
# - 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'
- job:
displayName: macOS-12
pool:
vmImage: 'macOS-12'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
steps:
- checkout: self
fetchDepth: 1
- 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 --yes --quiet --name Build
displayName: Create Anaconda environment
- bash: |
source activate Build
conda install --yes --quiet --name Build -c conda-forge python=$PYTHON_VERSION pytest setuptools dask distributed mkl_fft netcdf4 numba numpy pyinterp python-dateutil scipy xarray
displayName: Install build requirements
- bash: |
source activate Build
python setup.py build
displayName: Build package
- bash: |
source activate Build
pytest tests
displayName: Test cases
- job:
displayName: windows-2019
pool:
vmImage: 'windows-2019'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
steps:
- checkout: self
fetchDepth: 1
- script: git submodule update --init --recursive
displayName: Initialize the submodules
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name Build
displayName: Create Anaconda environment
- script: |
call activate Build
conda install --yes --quiet --name Build -c conda-forge python=%PYTHON_VERSION% pytest setuptools dask distributed mkl_fft netcdf4 numba numpy pyinterp python-dateutil scipy xarray
displayName: Install build requirements
- script: |
call activate Build
python setup.py build
displayName: Build package
- bash: |
source activate Build
pytest tests
displayName: Test cases