forked from MaginnGroup/mosdef_cassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
162 lines (141 loc) · 4.76 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
trigger:
- master
pr:
autoCancel: true
branches:
include:
- master
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build for master
branches:
include:
- master
always: true
jobs:
- job: BleedingMoSDeF
strategy:
matrix:
Python310Ubuntu:
imageName: 'ubuntu-22.04'
python.version: 3.10
Python311Ubuntu:
imageName: 'ubuntu-22.04'
python.version: 3.11
Python10macOS:
imageName: 'macOS-14'
python.version: 3.10
Python311macOS:
imageName: 'macOS-14'
python.version: 3.11
pool:
vmImage: $(imageName)
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add Conda to path
- bash : echo "##vso[task.prependpath]$(Build.SourcesDirectory)/Cassandra-1.3.1/bin"
displayName: Add Cassandra to path
- bash: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda update -c defaults conda
conda update --all
conda create --yes -n bleeding-test-environment python=$(python.version) --file requirements-dev.txt
displayName: Create a new bleeding test environment
- bash: |
source activate bleeding-test-environment
wget https://github.com/MaginnGroup/Cassandra/archive/v1.3.1.tar.gz
tar -xzvf v1.3.1.tar.gz
cd Cassandra-1.3.1/Src
make -f Makefile.gfortran
mkdir ../bin
cp cassandra_gfortran.exe ../bin/.
cp ../Scripts/Frag_Library_Setup/library_setup.py ../bin/.
cd ../../
displayName: Build Cassandra
- bash: |
echo Working directory:
pwd
echo ls:
ls
echo PATH:
echo "$PATH"
echo CASSANDRA:
which cassandra_gfortran.exe
echo PYTHON2
which python2
echo LIBRARY_SETUP:
which library_setup.py
displayName: Check cassandra install
- bash: |
source activate bleeding-test-environment
git clone https://github.com/mosdef-hub/foyer.git
git clone https://github.com/mosdef-hub/mbuild.git
cd foyer
conda install --yes python=$(python.version) --file requirements-dev.txt
python -m pip install --user .
python -m pip uninstall mbuild -y
cd ..
cd mbuild
conda install --yes python=$(python.version) --file requirements-dev.txt
python -m pip install .
cd ..
python -m pip install .
displayName: clone,install foyer,mbuild; install mosdef_cassandra
- bash: |
source activate bleeding-test-environment
python -m pip install pytest-cov
python -m pip install pytest-azurepipelines
python -m pytest mosdef_cassandra/tests -v --cov=mosdef_cassandra --cov-report=html --pyargs
displayName: Run Tests
- bash: |
source activate bleeding-test-environment
coverage xml
bash <(curl -s https://codecov.io/bash) -t 022e3719-0209-42d8-ae36-488daf8e4e61
condition: and( eq( variables['Agent.OS'], 'Linux' ), eq( variables['python.version'], '3.7' ) )
displayName: Upload coverage
- job: StandardMoSDeF
strategy:
matrix:
Python39Ubuntu:
imageName: 'ubuntu-20.04'
python.version: 3.9
Python38Ubuntu:
imageName: 'ubuntu-20.04'
python.version: 3.8
Python37macOS:
imageName: 'macOS-10.14'
python.version: 3.7
Python39macOS:
imageName: 'macOS-latest'
python.version: 3.9
pool:
vmImage: $(imageName)
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add Conda to path
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
# We need to take ownership if we want to update conda or install packages globally
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
condition: eq( variables['Agent.OS'], 'Darwin' )
- bash: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda update -c defaults conda
conda update --all
conda create --yes -n test-environment python=$(python.version) --file requirements-test.txt
displayName: Create a new test environment
- bash: |
source activate test-environment
echo "PYTHON VERSION:"
python --version
echo "CASSANDRA EXEC:"
which cassandra.exe
python -m pip install --user .
displayName: clone,install foyer,mbuild; install mosdef_cassandra
- bash: |
source activate test-environment
python -m pip install --user pytest-azurepipelines
python -m pytest mosdef_cassandra/tests -v
displayName: Run Tests