-
Notifications
You must be signed in to change notification settings - Fork 31
/
azure-pipelines.yml
81 lines (70 loc) · 2.22 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
# Azure Pipelines CI configuration file
# More information: https://docs.microsoft.com/azure/devops/pipelines/languages/python
jobs:
- job: 'Default'
strategy:
matrix:
linux-python35:
imageName: 'ubuntu-16.04'
python.version: '3.6'
linux-python37:
imageName: 'ubuntu-16.04'
python.version: '3.7'
windows-python35:
imageName: 'vs2017-win2016'
python.version: '3.6'
windows-python37:
imageName: 'vs2017-win2016'
python.version: '3.7'
pool:
vmImage: $(imageName)
continueOnError: false
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- task: DownloadGitHubRelease@0
inputs:
connection: github-read
userRepository: SuperElastix/elastix
defaultVersionType: 'specificTag' # one of: latest, specificVersion, specificTag
version: '4.9.0'
itemPattern: 'elastix-*' # filter assets
downloadPath: '$(Build.StagingDirectory)'
displayName: 'Download elastix'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Build.StagingDirectory)/*.zip'
destinationFolder: '$(Build.StagingDirectory)'
cleanDestinationFolder: false
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
displayName: 'Extract elastix'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Build.StagingDirectory)/*.tar.bz2'
destinationFolder: '$(Build.StagingDirectory)'
cleanDestinationFolder: false
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
displayName: 'Extract elastix'
- bash: |
set -x
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
displayName: 'Install package'
- bash: |
set -x
case ${AGENT_OS} in
'Linux')
export ELASTIX_PATH=${BUILD_STAGINGDIRECTORY}/bin
export LD_LIBRARY_PATH=${BUILD_STAGINGDIRECTORY}/lib:${LD_LIBRARY_PATH}
;;
'Windows_NT')
export ELASTIX_PATH=${BUILD_STAGINGDIRECTORY}
;;
*) ;;
esac
pip install -r requirements_test.txt
pytest .
displayName: 'Test package'