-
Notifications
You must be signed in to change notification settings - Fork 26
166 lines (145 loc) · 5.5 KB
/
basic.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
name: libEnsemble-simple-CI
on:
pull_request:
types:
- ready_for_review
- opened
- reopened
- synchronize
jobs:
test-libE:
if: '! github.event.pull_request.draft'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
mpi-version: [mpich]
python-version: [3.9, "3.10", "3.11", "3.12"]
pydantic-version: ["2.8.2"]
comms-type: [m, l]
include:
- os: macos-latest
python-version: "3.11"
mpi-version: mpich
pydantic-version: "2.8.2"
comms-type: m
- os: macos-latest
python-version: "3.11"
mpi-version: mpich
pydantic-version: "2.8.2"
comms-type: l
- os: ubuntu-latest
mpi-version: mpich
python-version: "3.10"
pydantic-version: "1.10.17"
comms-type: m
- os: ubuntu-latest
mpi-version: mpich
python-version: "3.10"
pydantic-version: "1.10.17"
comms-type: l
env:
HYDRA_LAUNCHER: "fork"
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup conda - Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: condaenv
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: flexible
auto-update-conda: true
- uses: actions/cache/restore@v4
name: Restore cached dependencies
id: cache
if: matrix.os == 'ubuntu-latest'
with:
path: |
/home/runner/.local
/usr/share/miniconda3/envs/condaenv
/usr/share/miniconda3/bin
/usr/share/miniconda3/lib
/usr/share/miniconda3/include
key: libe-${{ github.ref_name }}-${{ matrix.python-version }}-${{ matrix.comms-type }}-${{ matrix.pydantic-version }}-basic
- name: Force-update certifi
run: |
python --version
pip install -I --upgrade certifi
- name: Install Ubuntu compilers
if: matrix.os == 'ubuntu-latest'
run: conda install gcc_linux-64
# Roundabout solution on macos for proper linking with mpicc
- name: Install macOS compilers
if: matrix.os == 'macos-latest'
run: |
conda install clang_osx-64
- name: Install basic testing/feature dependencies
run: |
pip install -r install/testing_requirements.txt
pip install -r install/misc_feature_requirements.txt
git clone --recurse-submodules -b develop https://github.com/POptUS/IBCDFO.git
pushd IBCDFO/minq/py/minq5/
export PYTHONPATH="$PYTHONPATH:$(pwd)"
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
popd
pushd IBCDFO/ibcdfo_pypkg/
pip install -e .
popd
- name: Install mpi4py and MPI from conda
run: |
conda install mpi4py ${{ matrix.mpi-version }}
- name: Install generator dependencies
run: |
python -m pip install --upgrade pip
pip install mpmath matplotlib
conda install numpy nlopt scipy
- uses: actions/cache/save@v4
name: Save dependencies to cache
if: matrix.os == 'ubuntu-latest'
with:
path: |
/home/runner/.local
/usr/share/miniconda3/envs/condaenv
/usr/share/miniconda3/bin
/usr/share/miniconda3/lib
/usr/share/miniconda3/include
key: libe-${{ github.ref_name }}-${{ matrix.python-version }}-${{ matrix.comms-type }}
- name: Install libEnsemble, flake8
run: |
pip install pydantic==${{ matrix.pydantic-version }}
pip install -e .
flake8 libensemble
- name: Remove various tests on newer pythons
if: matrix.python-version >= '3.11'
run: |
rm ./libensemble/tests/functionality_tests/test_local_sine_tutorial*.py # matplotlib errors on 3.12
- name: Run simple tests, Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
- name: Run simple tests, macOS
if: matrix.os == 'macos-latest'
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
- name: Merge coverage
run: |
mv libensemble/tests/.cov* .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
spellcheck:
name: Spellcheck release branch
if: contains(github.base_ref, 'develop')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.24.1