-
Notifications
You must be signed in to change notification settings - Fork 24
280 lines (248 loc) · 10.2 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
271
272
273
274
275
276
277
278
279
280
name: libEnsemble-CI
on: [pull_request]
jobs:
test-libE:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
do-balsam: [false]
mpi-version: [mpich]
python-version: [3.7, 3.8, 3.9, "3.10"]
comms-type: [m, l]
include:
- os: macos-latest
do-balsam: false
python-version: 3.8
mpi-version: 'mpich'
comms-type: m
- os: macos-latest
do-balsam: false
python-version: 3.8
mpi-version: 'mpich'
comms-type: l
#- os: ubuntu-latest
# do-balsam: false
# python-version: '3.11'
# mpi-version: 'mpich'
# comms-type: l
- os: ubuntu-latest
do-balsam: false
python-version: 3.8
mpi-version: 'mpich'
comms-type: t
- os: ubuntu-latest
do-balsam: false
mpi-version: 'openmpi=4.1.2'
python-version: 3.9
comms-type: l
- os: ubuntu-latest
python-version: 3.8
comms-type: l
mpi-version: 'mpich'
do-balsam: true
- os: windows-latest
python-version: '3.10'
comms-type: l
mpi-version: 'msmpi'
do-balsam: false
- os: windows-latest
python-version: '3.10'
comms-type: m
mpi-version: 'msmpi'
do-balsam: false
env:
HYDRA_LAUNCHER: 'fork'
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup conda - Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: condaenv
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: flexible
auto-update-conda: true
- name: Force-update certifi
run: |
python --version
pip install -I --upgrade certifi
- name: Windows - Add clang path to $PATH env
shell: bash
if: matrix.os == 'windows-latest'
run: |
echo "PATH=$PATH:C:\msys64\mingw64\bin" >> $GITHUB_ENV
echo "PATH=$PATH:C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64" >> $GITHUB_ENV
- name: Install Ubuntu compilers
if: matrix.os == 'ubuntu-latest'
run: conda install gcc_linux-64
- name: Install postgreql
if: matrix.do-balsam == true
env:
BALSAM_DB_PATH: $HOME/test-balsam
run: |
conda install libpq postgresql postgresql-plpython
sudo apt-get update
sudo apt-get install bc
pg_ctl --version
# Roundabout solution on macos for proper linking with mpicc
- name: Install macOS compilers and older SDK
if: matrix.os == 'macos-latest'
run: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.14.sdk.tar.xz
mkdir ../sdk; tar xf MacOSX10.14.sdk.tar.xz -C ../sdk
conda install clang_osx-64=9.0.1
- name: Setup MPI (${{ matrix.mpi-version }})
uses: mpi4py/setup-mpi@v1
if: matrix.os == 'windows-latest'
with:
mpi: ${{ matrix.mpi-version }}
- name: Install mpi4py on Windows
if: matrix.os == 'windows-latest'
run: pip install mpi4py
- name: Install mpi4py and MPI from conda
if: matrix.python-version != '3.10' && matrix.os != 'windows-latest'
run: |
conda install ${{ matrix.mpi-version }}
conda install mpi4py
- name: Install mpi4py from pip, MPI from conda
if: matrix.python-version == '3.10' && matrix.os != 'windows-latest'
run: |
conda install ${{ matrix.mpi-version }}
pip install mpi4py
- name: Install generator dependencies
if: contains('3.7_3.8_3.9_3.10', matrix.python-version) && matrix.do-balsam == false && matrix.os != 'windows-latest'
run: |
python -m pip install --upgrade pip
conda install nlopt
conda install scipy
conda install superlu_dist
conda install hypre
conda install mumps-mpi
conda install petsc
conda install petsc4py
pip install DFO-LS
pip install mpmath
pip install ax-platform
python -m pip install --upgrade git+https://github.com/mosesyhc/surmise.git@development/PCGPwM
- name: Install some generator dependencies on Windows
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
conda install nlopt
conda install scipy
pip install mpmath
- name: Install generator dependencies for Ubuntu tests
if: matrix.os == 'ubuntu-latest' && matrix.do-balsam == false
run: |
sudo apt-get update
sudo apt-get install octave
sudo apt-get install bc
# begin heffte build and dependencies
sudo apt install libfftw3-dev
git clone https://bitbucket.org/icl/heffte.git
mkdir heffte/build
cd heffte/build
pwd
cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D CMAKE_INSTALL_PREFIX=./ -D Heffte_ENABLE_AVX=ON -D Heffte_ENABLE_FFTW=ON ../
make -j 4
make install
cp ./benchmarks/speed3d_c2c ../../libensemble/tests/regression_tests/
# end heffte build and dependencies
# pip install dragonfly-opt
pip install git+https://github.com/dragonfly/dragonfly.git
pip install ax-platform
- name: Install other testing dependencies
if: matrix.do-balsam == false
run: |
pip install -r install/testing_requirements.txt
pip install psutil
pip install pyyaml
pip install funcx
pip install balsam
- name: Install Tasmanian on Ubuntu
if: matrix.os == 'ubuntu-latest' && matrix.do-balsam == false
run: |
pip install scikit-build packaging Tasmanian --user
- name: Install and configure Balsam 0.5.0
if: matrix.do-balsam == true
env:
BALSAM_DB_PATH: $HOME/test-balsam
run: |
pip install -r install/testing_requirements.txt
wget https://github.com/argonne-lcf/balsam/archive/refs/tags/0.5.0.tar.gz
mkdir ../balsam; tar xf 0.5.0.tar.gz -C ../balsam;
python install/configure_balsam_install.py
- name: Modify Balsam for testing, create DB
if: matrix.do-balsam == true
env:
BALSAM_DB_PATH: $HOME/test-balsam
run: |
pg_ctl --version
balsam init $HOME/test-balsam
sudo chmod -R 700 $HOME/test-balsam/balsamdb
source balsamactivate test-balsam
python -c 'from libensemble.tests.regression_tests.common import modify_Balsam_pyCoverage; modify_Balsam_pyCoverage()'
python -c 'from libensemble.tests.regression_tests.common import modify_Balsam_settings; modify_Balsam_settings()'
- name: Find MPI, Install libEnsemble, flake8, ulimit adjust
run: |
pip install -e .
flake8 libensemble
- name: Activate API unit test if using mpich
if: matrix.mpi-version == 'mpich'
run: |
mv libensemble/tests/unit_tests/mpich-only_test_api.py libensemble/tests/unit_tests/test_alt_api.py
- name: Run extensive tests, Ubuntu, Python 3.7-3.10
if: matrix.os == 'ubuntu-latest' && matrix.do-balsam == false && contains('3.7_3.8_3.9_3.10', matrix.python-version)
run: |
./libensemble/tests/run-tests.sh -e -A "-W error" -z -${{ matrix.comms-type }}
- name: Run simple tests, Windows
if: matrix.os == 'windows-latest'
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
- name: Run extensive tests, macOS
if: matrix.os == 'macos-latest'
env:
CONDA_BUILD_SYSROOT: /Users/runner/work/libensemble/sdk/MacOSX10.14.sdk
run: |
./libensemble/tests/run-tests.sh -e -A "-W error" -z -${{ matrix.comms-type }}
- name: Run Balsam test, Ubuntu
if: matrix.do-balsam == true
env:
BALSAM_DB_PATH: $HOME/test-balsam
run: |
source balsamactivate test-balsam
./libensemble/tests/run-tests.sh -re -y 'test_balsam_hworld*' -z -l
- name: Merge coverage, run Coveralls
env:
COVERALLS_PARALLEL: true
run: |
mv libensemble/tests/.cov* .
coveralls --service=github
coveralls:
name: Notify coveralls of all jobs completing
needs: [test-libE]
if: always()
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
spellcheck:
name: Spellcheck release branch
if: contains(github.base_ref, 'main')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crate-ci/typos@v1.0.4