-
Notifications
You must be signed in to change notification settings - Fork 15
/
azure-pipelines.yml
116 lines (97 loc) · 3.92 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
114
115
116
trigger:
- master
- devel
stages:
- stage: A
jobs:
- job: Ubuntu_Test
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
sudo apt-get -y install gromacs
echo "##vso[task.prependpath]$CONDA/bin"
conda create -y -q -n testenv python=$(python.version)
displayName: "Create Conda environment and install GROMACS"
- script: |
echo "##vso[task.prependpath]$CONDA/bin"
source activate testenv
cd $(Build.SourcesDirectory)
conda install -y conda-build anaconda-client
export GIT_BUILD_STR=$(git rev-parse --short HEAD)
if [ $(Build.SourceBranchName) == "master" ]
then
conda build conda-recipe/meta.yaml -c conda-forge -c omnia -c michellab --token $(anacondaToken) --user essexlab
elif [ $(Build.SourceBranchName) == "devel" ]
then
conda build conda-recipe/meta.yaml -c conda-forge -c omnia -c michellab --token $(anacondaToken) --user essexlab --label dev
fi
PCVERSION=$(less conda-recipe/meta.yaml | grep -Po '(?<=version: )\d.\d.\d')
if [ $(Build.SourceBranchName) == "master" ]
then
conda install -y -c conda-forge -c omnia -c michellab -c essexlab protocaller=$PCVERSION
elif [ $(Build.SourceBranchName) == "devel" ]
then
conda install -y -c conda-forge -c omnia -c michellab -c essexlab/label/dev protocaller=$PCVERSION
fi
$CONDA_PREFIX/bin/python -m pip install --upgrade pip
$CONDA_PREFIX/bin/pip install pytest pytest-azurepipelines
displayName: 'Install ProtoCaller'
- script: |
echo "##vso[task.prependpath]$CONDA/bin"
source activate testenv
$CONDA_PREFIX/bin/python -m pytest test/
displayName: 'Test ProtoCaller'
- stage: B
jobs:
- job: macOS_Test
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
sudo chown -R $USER $CONDA
$CONDA/bin/conda create -y -q -n testenv python=$(python.version)
displayName: "Create Conda environment"
- script: |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gromacs
brew cask install firefox
brew cask install chromedriver
brew install grep
displayName: "Install Homebrew, GROMACS, firefox, chromedriver and ggrep"
- script: |
source $CONDA/bin/activate testenv
cd $(Build.SourcesDirectory)
$CONDA/bin/conda install -y conda-build anaconda-client
export GIT_BUILD_STR=$(git rev-parse --short HEAD)
PCVERSION=$(less conda-recipe/meta.yaml | ggrep -Po '(?<=version: )\d.\d.\d')
if [ $(Build.SourceBranchName) == "master" ]
then
$CONDA/bin/conda install -y -c conda-forge -c omnia -c michellab -c essexlab protocaller=$PCVERSION
elif [ $(Build.SourceBranchName) == "devel" ]
then
$CONDA/bin/conda install -y -c conda-forge -c omnia -c michellab -c essexlab/label/dev protocaller=$PCVERSION
fi
$CONDA_PREFIX/bin/python -m pip install --upgrade pip
$CONDA_PREFIX/bin/pip install pytest pytest-azurepipelines
displayName: 'Install ProtoCaller'
- script: |
source $CONDA/bin/activate testenv
$CONDA_PREFIX/bin/python -m pytest test/
displayName: 'Test ProtoCaller'