/
azure-pipelines-steps.yml
77 lines (66 loc) · 2.84 KB
/
azure-pipelines-steps.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
parameters:
platform: none
installer: none
steps:
- task: CacheBeta@0
displayName: HDF5 cache
inputs:
# The key should specify enough to avoid restoring an incompatible build.
# HDF5_VSVERSION is only for Windows - it's just a fixed string elsewhere.
key: HDF5 | "$(Agent.OS)" | "${{ parameters.vmImage }}" | "$(HDF5_VERSION)" | "$(HDF5_VSVERSION)"
path: $(HDF5_CACHE_DIR)
condition: and(succeeded(), ne(variables['HDF5_VERSION'], ''))
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
displayName: 'Use Python $(python.version)'
condition: and(succeeded(), ne(variables['python.version'], 'Pre'))
#- task: stevedower.python.InstallPython.InstallPython@1
# displayName: 'Use prerelease Python'
# inputs:
# prerelease: true
# condition: and(succeeded(), eq(variables['python.version'], 'Pre'))
- ${{ if eq(parameters.installer, 'nuget') }}:
- task: NuGetToolInstaller@0
displayName: 'Use latest available Nuget'
- script: |
nuget install libpng-msvc14-x64 -ExcludeVersion -OutputDirectory "$(build.BinariesDirectory)"
nuget install zlib-msvc14-x64 -ExcludeVersion -OutputDirectory "$(build.BinariesDirectory)"
echo ##vso[task.prependpath]$(build.BinariesDirectory)\libpng-msvc14-x64\build\native\bin_release
echo ##vso[task.prependpath]$(build.BinariesDirectory)\zlib-msvc14-x64\build\native\bin_release
echo ##vso[task.setvariable variable=CL]/I$(build.BinariesDirectory)\libpng-msvc14-x64\build\native\include /I$(build.BinariesDirectory)\zlib-msvc14-x64\build\native\include
echo ##vso[task.setvariable variable=LINK]/LIBPATH:$(build.BinariesDirectory)\libpng-msvc14-x64\build\native\lib_release /LIBPATH:$(build.BinariesDirectory)\zlib-msvc14-x64\build\native\lib_release
displayName: 'Install dependencies with nuget'
- ${{ if eq(parameters.installer, 'brew') }}:
- script: |
brew install pkg-config hdf5 ccache open-mpi
displayName: 'Install dependencies with brew'
- ${{ if eq(parameters.installer, 'apt') }}:
- script: |
sudo apt-get install libhdf5-serial-dev ccache openmpi-bin libopenmpi-dev
displayName: 'Install dependencies with apt'
- script: |
python -m pip install --upgrade pip
pip install tox codecov
displayName: 'Install dependencies with pip'
- script: env
displayName: 'print env'
- ${{ if eq(parameters.shell, 'unix') }}:
- script: |
./ci/travis/get_hdf5_if_needed.sh
displayName: 'ensure HDF5'
- ${{ if eq(parameters.shell, 'cmd') }}:
- script: |
py -3.7 -m pip install requests
py -3.7 ci\\appveyor\\get_hdf5.py
displayName: 'ensure HDF5'
- script: env
displayName: 'print env'
- script: |
tox
displayName: 'tox'
- script: |
python3 ci/fix_coverage.py
codecov --required -t 813fb6da-087d-4b36-a185-5a530cab3455
displayName: 'codecov'