-
Notifications
You must be signed in to change notification settings - Fork 75
129 lines (111 loc) · 3.71 KB
/
ci.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
name: ci
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macOS-latest
- ubuntu-latest
python-version:
- "3.8"
- "3.9"
env:
CI_OS: ${{ matrix.os }}
PYVER: ${{ matrix.python-version }}
PACKAGE: forcebalance
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces
python=${{ matrix.python-version }}
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
run: |
conda info --all
conda list
# Need to replace ndcctools with this block
# - name: Install Work Queue
# run: |
# wget https://raw.githubusercontent.com/leeping/forcebalance/master/tools/install-cctools.sh
# bash install-cctools.sh
# echo "Checking for Work Queue import; if successful, no message will be printed"
# python -c "import work_queue"
# export PATH="$GITHUB_WORKSPACE/opt/cctools/current/bin:$PATH"
- name: Install Tinker
run: |
if [[ "$CI_OS" == 'ubuntu-latest' ]]; then
wget https://dasher.wustl.edu/tinker/downloads/bin-linux-8.8.3.tar.gz -O tinker.tar.gz
fi
if [[ "$CI_OS" == 'macOS-latest' ]]; then
wget https://dasher.wustl.edu/tinker/downloads/bin-macos-8.8.3.tar.gz -O tinker.tar.gz
fi
tar xvzf tinker.tar.gz &> untar.log
mkdir -p $GITHUB_WORKSPACE/opt/tinker/8.8.3
if [[ "$CI_OS" == 'ubuntu-latest' ]]; then
mv bin-linux $GITHUB_WORKSPACE/opt/tinker/8.8.3/bin
fi
if [[ "$CI_OS" == 'macOS-latest' ]]; then
mv bin-macos $GITHUB_WORKSPACE/opt/tinker/8.8.3/bin
fi
echo "$GITHUB_WORKSPACE/opt/tinker/8.8.3/bin" >> $GITHUB_PATH
#- name: Install Gromacs
# run: |
# wget http://ftp.gromacs.org/pub/gromacs/gromacs-5.1.5.tar.gz
# tar xvzf gromacs-5.1.5.tar.gz
# cd gromacs-5.1.5
# cp -r cmake cmake_s
# cd cmake
# cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/opt/gromacs/5.1.5 -DGMX_DOUBLE=ON -DGMX_BUILD_OWN_FFTW=ON -DGMX_USE_RDTSCP=OFF ..
# make -j 8 && make install
# cd ../cmake_s
# cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/opt/gromacs/5.1.5 -DGMX_BUILD_OWN_FFTW=ON -DGMX_USE_RDTSCP=OFF ..
# make -j 8 && make install
# cd ..
# . $GITHUB_WORKSPACE/opt/gromacs/5.1.5/bin/GMXRC.bash
# echo "$GITHUB_WORKSPACE/opt/gromacs/5.1.5/bin" >> $GITHUB_PATH
# which gmx
# which gmx_d
- name: Extract data archives
run: |
cd studies/001_water_tutorial
tar xvjf targets.tar.bz2
cd ../../
- name: Install package
run: |
python -m pip install --no-deps .
python -c "import forcebalance; print(forcebalance.__version__)"
- name: Run tests
run: |
pytest -vx --cov=forcebalance --cov-config=setup.cfg --durations=0 --cov-report=xml -k "not TestEvaluatorBromineStudy" src/tests/
- name: Run water study
run: |
cd studies/001_water_tutorial
tar xvjf targets.tar.bz2
ForceBalance very_simple.in
cd ../../
- name: Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false