-
Notifications
You must be signed in to change notification settings - Fork 15
/
azure-pipelines.yml
80 lines (69 loc) · 2.36 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
schedules:
- cron: "0 6 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true
trigger:
- master
name: $(Date:yyyyMMdd)$(Rev:.r)
jobs:
- job: 'ShakeMap'
timeoutInMinutes: 120
strategy:
matrix:
Linux_Python37:
imageName: 'ubuntu-latest'
python.version: '3.7'
Linux_Python38:
imageName: 'ubuntu-latest'
python.version: '3.8'
MacOS_10_15_Python37:
imageName: 'macOS-10.15'
python.version: '3.7'
MacOS_10_15_Python38:
imageName: 'macOS-10.15'
python.version: '3.8'
MacOS_10_14_Python37:
imageName: 'macOS-10.14'
python.version: '3.7'
MacOS_10_14_Python38:
imageName: 'macOS-10.14'
python.version: '3.8'
pool:
vmImage: $(imageName)
variables:
osImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to path
- bash: |
if [[ $(Agent.OS) = 'Darwin' ]]
then
sudo chown -R $USER $CONDA
if [[ -e '/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg' ]]
then
sudo installer -allowUntrusted -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
echo "MacOS 10.14"
else
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
echo "MacOS 10.15"
fi
fi
echo $(Agent.NAME)
echo $(python.version)
bash install.sh -p $(python.version)
displayName: Create environment
- bash: conda init bash
displayName: Init conda for bash
- bash: |
source activate pager
export PYTHONPATH="."
py.test --cov=. --cov-report=xml
failOnStderr: true
displayName: Run tests
name: RunTests