-
Notifications
You must be signed in to change notification settings - Fork 81
270 lines (228 loc) · 8.34 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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
name: CI
on:
push:
branches:
- master
- next2024
pull_request:
branches:
- master
- next2024
schedule:
- cron: "9 16 * * 1"
jobs:
build:
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
cfg:
#- conda-env: psi
# python-version: 3.7
# label: Psi4-1.5
# runs-on: ubuntu-latest
# pytest: ""
# Note: removed Sep 2024 b/c too hard to reconcile w/pyd v2
- conda-env: psi-nightly
python-version: "3.10"
label: Psi4-1.6
runs-on: ubuntu-latest
pytest: ""
- conda-env: psi-cf
python-version: "3.12"
label: Psi4-1.8
runs-on: windows-latest
pytest: "-k 'not (hes2 or qchem)'"
- conda-env: torchani
python-version: 3.8
label: ANI
runs-on: ubuntu-latest
pytest: ""
- conda-env: openmm
python-version: 3.8
label: OpenMM
runs-on: ubuntu-latest
pytest: ""
- conda-env: xtb
python-version: "3.10"
label: xTB
runs-on: ubuntu-latest
pytest: ""
#- conda-env: qcore
# python-version: 3.7
# label: QCore
# runs-on: ubuntu-latest
# pytest: ""
# Note: removed Sep 2024 b/c too hard to reconcile w/pyd v2. Manby approves.
- conda-env: nwchem
python-version: 3.8
label: NWChem70
runs-on: ubuntu-20.04
pytest: ""
# formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021
- conda-env: nwchem-cf
python-version: 3.12
label: NWChem
runs-on: ubuntu-latest
pytest: ""
- conda-env: mrchem
python-version: 3.8
label: MRChem
runs-on: ubuntu-latest
pytest: ""
- conda-env: adcc
python-version: 3.8
label: ADCC
runs-on: ubuntu-latest
pytest: ""
- conda-env: opt-disp
python-version: 3.8
label: optimization-dispersion
runs-on: ubuntu-latest
pytest: ""
- conda-env: opt-disp-cf
python-version: 3.11
label: optimization-dispersion
runs-on: windows-latest
pytest: "-k 'not (hes2 or qchem)'"
# 3.13
#- conda-env: disp-win
# python-version: 3.12
# label: disp-win
# runs-on: windows-latest
# pytest: ""
- conda-env: mace
python-version: "3.10"
label: MACE
runs-on: ubuntu-latest
pytest: ""
- conda-env: aimnet2
python-version: 3.11
label: AIMNET2
runs-on: ubuntu-latest
pytest: ""
#- conda-env: nwchem
# python-version: "3.10"
# label: TeraChem
# runs-on: ubuntu-20.04
# pytest: ""
name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}"
runs-on: ${{ matrix.cfg.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Environment
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
environment-file: devtools/conda-envs/${{ matrix.cfg.conda-env }}.yaml
python-version: ${{ matrix.cfg.python-version }}
auto-activate-base: false
show-channel-urls: true
add-pip-as-python-dependency: true
# note: conda-forge chnl req'd for Mambaforge, but we'll spec in file, not here `channels: conda-forge,...`
# note: any activate/deactivate use the conda cmd. other cmds use mamba cmd.
- name: Special Config - NWChem
if: "(matrix.cfg.label == 'NWChem70')"
run: |
sudo apt-get -y install nwchem
- name: Special Config - QCore
if: "(matrix.cfg.label == 'QCore')"
run: |
qcore --accept-license
#docker.io/mtzgroup/terachem:latest
#Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
- name: Special Config - QCElemental Dep
#if: false
run: |
conda remove qcelemental --force
python -m pip install 'git+https://github.com/loriab/QCElemental.git@csse_layout_536b' --no-deps
# note: conda remove --force, not mamba remove --force b/c https://github.com/mamba-org/mamba/issues/412
# alt. is micromamba but not yet ready for setup-miniconda https://github.com/conda-incubator/setup-miniconda/issues/75
- name: Special Config - QCEngine Dep
if: "(startsWith(matrix.cfg.label, 'Psi4')) || (matrix.cfg.label == 'ADCC') || (matrix.cfg.label == 'optimization-dispersion')"
run: |
conda remove qcengine --force
# QCEngine CI and Psi4 are circularly dependent, so a hack is in order
- name: Special Config - Faux Pydantic Upgrade
if: "((matrix.cfg.label == 'Psi4-1.6') || (matrix.cfg.label == 'optimization-dispersion')) && (runner.os != 'Windows')"
run: |
sed -i s/from\ pydantic\ /from\ pydantic.v1\ /g ${CONDA_PREFIX}/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/driver/*py
- name: Special Config - Forced Interface Upgrade
if: "(matrix.cfg.label == 'Psi4-1.6')"
run: |
grep -r "local_options" ${CONDA_PREFIX}/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/driver/
sed -i "s/local_options/task_config/g" ${CONDA_PREFIX}/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/driver/procrouting/*py
- name: Install QCEngine
run: |
python -m pip install . --no-deps
- name: Environment Information
run: |
conda info
conda list
python -c "import qcelemental as q;print(q.__file__, q.__version__)"
python -c "import qcengine as q;print(q.__file__, q.__version__)"
git describe
- name: QCEngineRecords
if: "(matrix.cfg.label != 'Psi4-1.6')"
run: |
qcengine info
export QCER_VER=`python -c "import qcengine.testing; print(qcengine.testing.QCENGINE_RECORDS_COMMIT)"`
pip install git+https://github.com/MolSSI/QCEngineRecords.git@${QCER_VER}#egg=qcenginerecords
python -c "import qcengine; print(qcengine.config.global_repr())"
- name: PyTest
run: |
pytest -rws -v ${{ matrix.cfg.pytest }} --cov=qcengine --color=yes --cov-report=xml qcengine/
- name: CodeCov
uses: codecov/codecov-action@v4
release_sphinx:
needs: [build]
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
cfg:
- conda-env: docs-cf
python-version: "3.10"
label: Sphinx
runs-on: ubuntu-latest
name: "🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }}"
runs-on: ${{ matrix.cfg.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Create Environment
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
environment-file: devtools/conda-envs/${{ matrix.cfg.conda-env }}.yaml
python-version: ${{ matrix.cfg.python-version }}
auto-activate-base: false
add-pip-as-python-dependency: true
channels: conda-forge
- name: Special Config - QCElemental Dep
#if: false
run: |
conda remove qcelemental --force
python -m pip install 'git+https://github.com/loriab/QCElemental.git@csse_pyd2_warnings' --no-deps
- name: Environment Information
run: |
conda info
conda list --show-channel-urls
- name: Build Documentation
run: |
python -m pip install . --no-deps
python -c "import qcelemental as q;print(q.__file__, q.__version__)"
python -c "import qcengine as q;print(q.__file__, q.__version__)"
cd docs
make html
- name: GitHub Pages Deploy
uses: JamesIves/[email protected]
if: github.event_name == 'push' && github.repository == 'MolSSI/QCEngine' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' )
with:
branch: gh-pages
folder: docs/build/html