-
Notifications
You must be signed in to change notification settings - Fork 6
173 lines (147 loc) · 5.61 KB
/
CI.yaml
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
162
163
164
165
166
167
168
169
170
171
172
173
name: CI
on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# Existing codes likely still have "master" as the primary branch
# Both are tracked here to keep legacy and new codes working
push:
branches:
- "master"
- "main"
pull_request:
branches:
- "master"
- "main"
# schedule:
# # Nightly tests run on master by default:
# # Scheduled workflows run on the latest commit on the default or base branch.
# # (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
# - cron: "0 0 * * *"
jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # [macOS-latest, ubuntu-latest, windows-latest]
python-version: [3.8] #, 3.8, 3.9]
steps:
- uses: actions/checkout@v1
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/test_env.yaml
channels: conda-forge,defaults
activate-environment: test
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
#- name: Build OpenMM
# shell: bash -l {0}
# run: |
# git clone https://github.com/openmm/openmm.git
# mkdir -p /home/runner/work/build/bin
# cd openmm
# mkdir build
# cd build
# cmake -DCMAKE_INSTALL_PREFIX=/home/runner/work/build/bin/openmm ..
# make
# make install
# make PythonInstall
# cd ../..
- name: Get NAMD
shell: bash -l {0}
env:
# NAMD_ACCESS_TOKEN: ${{ secrets.NAMD_ACCESS_TOKEN }}
NAMD_ACCESS_TOKEN2: ${{ secrets.NAMD_ACCESS_TOKEN2 }}
run: |
git clone https://github.com/UIUC-PPL/charm
cd charm
./build charm++ multicore-linux-x86_64 --with-production
export CHRMDIR=${PWD}
cd ..
wget http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64.tar.gz
tar xzf tcl8.5.9-linux-x86_64.tar.gz
mkdir tcl
mv tcl8.5.9-linux-x86_64 tcl
export TCLINC=${PWD}/tcl/tcl8.5.9-linux-x86_64/lib/
export TCLLIB=${PWD}/tcl/tcl8.5.9-linux-x86_64/include/
export LD_LIBRARY_PATH=${PWD}/tcl/tcl8.5.9-linux-x86_64/include/:$LD_LIBRARY_PATH
export TCLDIR=${PWD}/tcl/tcl8.5.9-linux-x86_64
# This was commented before
#wget http://www.ks.uiuc.edu/Research/namd/libraries/fftw-linux-x86_64.tar.gz
#tar xzf fftw-linux-x86_64.tar.gz
#mkdir fftw
#mv linux-x86_64 fftw
#export FFTWDIR=${PWD}/fftw/linux-x86_64
git clone https://oauth2:${NAMD_ACCESS_TOKEN2}@gitlab.com/tcbgUIUC/namd.git
cd namd
./config Linux-x86_64-g++ --charm-base $CHRMDIR --tcl-prefix $TCLDIR --without-fftw #--fftw-prefix ${FFTWDIR}
cd Linux-x86_64-g++
make
pwd
ls
export PATH="$PWD:$PATH"
echo "PATH: $PATH"
cd ../..
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
# Install seekr systems repository
git clone https://github.com/seekrcentral/seekr2_systems.git
# Install seekr openmm plugin
git clone https://github.com/seekrcentral/seekr2_openmm_plugin.git
cd seekr2_openmm_plugin/seekr2plugin
mkdir build
cd build
export OPENMM_INSTALL_DIR=${CONDA_PREFIX}
export OPENMM_LIB_PATH=$OPENMM_INSTALL_DIR/lib
export OPENMM_PLUGIN_DIR=$OPENMM_LIB_PATH/plugins
export LD_LIBRARY_PATH=$OPENMM_LIB_PATH:$OPENMM_PLUGIN_DIR:$LD_LIBRARY_PATH
cmake -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DSEEKR2_BUILD_OPENCL_LIB=OFF -DOPENMM_DIR=${CONDA_PREFIX} ..
make
make install
make PythonInstall
make test
- name: Install BrownDye
shell: bash -l {0}
run: |
sudo apt-get install libexpat1 apbs
wget https://browndye.ucsd.edu/downloads/browndye2-ubuntu-20.04.tar.gz
tar -xzf browndye2-ubuntu-20.04.tar.gz
cd browndye2/bin
export PATH="$PWD:$PATH"
echo "PATH: $PATH"
ls
cd ../..
- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
export PATH="/home/runner/work/seekr2/seekr2/browndye2/bin:$PATH"
export PATH="/home/runner/work/seekr2/seekr2/namd/Linux-x86_64-g++/:$PATH"
python -m pip install .
python -m openmm.testInstallation
pytest -v --cov=seekr2 --cov-report=xml --color=yes -m "not needs_cuda" seekr2/tests/ seekr2_systems/tests/
# pytest -v --cov=seekr2 --cov-report=xml --color=yes -m "not needs_cuda" seekr2/tests/
# pytest -v --cov=seekr2_systems --cov-append --cov-report=xml --color=yes -m "not needs_cuda" seekr2_systems/tests/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
directory: ./coverage/reports/
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.txt
verbose: true