-
Notifications
You must be signed in to change notification settings - Fork 23
340 lines (328 loc) · 13.9 KB
/
Copy pathci.yml
File metadata and controls
340 lines (328 loc) · 13.9 KB
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
name: CI
on:
push:
branches: [rift_O4d, rift_O4d_junior, rift_O4d_gmm_gpu]
pull_request:
branches: [rift_O4d, rift_O4d_junior, rift_O4d_gmm_gpu]
workflow_dispatch:
schedule:
# Weekly canary so a fresh UPSTREAM release (e.g. swig>=4.4.0 -- see #136)
# is caught even when there is no RIFT commit. Mondays 06:00 UTC.
- cron: '0 6 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Smoke-test that the package resolves and installs across the supported
# Python range, including the legacy py3.9 lane (paired with the pinned
# numpy==1.24.4 used by the integrator gate below).
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
python -m pip install coverage pytest pytest-cov --break-system-packages
python -m pip install --editable . --break-system-packages
help-check:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
python -m pip install coverage pytest --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Run help check
run: .travis/test-all-bin.sh
import-check:
needs: install
runs-on: ubuntu-latest
# Verify every declared module imports cleanly under both the pinned
# legacy lane (py3.9 + numpy 1.24.4) and the modern lane (py3.12 +
# numpy 2.x). Catches platform-portability regressions like the
# np.float128 import-time crash on numpy 2.x systems without an
# extended-precision long double.
strategy:
fail-fast: false
matrix:
include:
- lane: legacy
python-version: '3.9'
numpy-pin: 'numpy==1.24.4'
- lane: modern
python-version: '3.12'
numpy-pin: 'numpy>=2.0,<3.0'
name: import-check (${{ matrix.lane }} py${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
# Pin numpy AFTER requirements.txt so it overrides the unpinned
# 'numpy' line in requirements.txt without changing the file.
python -m pip install '${{ matrix.numpy-pin }}' --break-system-packages
python -m pip install coverage pytest --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Show resolved versions
run: |
python -c "import sys, numpy, scipy; print('python', sys.version); print('numpy', numpy.__version__); print('scipy', scipy.__version__)"
- name: Run import check
run: python .travis/test-all-mod.py
sim-manager-check:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
python -m pip install coverage pytest --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Install optional condor builder dep
# lscsoft-glue is optional; with it, the smoke test also exercises the
# Condor build_master_job + generate_dag round trip. Without it the
# condor portion of the smoke test simply skips.
continue-on-error: true
run: python -m pip install lscsoft-glue --break-system-packages
- name: Run simulation_manager smoke test
run: bash .travis/test-simulation-manager.sh
integration-check:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
python -m pip install coverage pytest pytest-cov --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Run integration sampler check
run: bash .travis/test-integrate.sh
asimov-integration:
needs: install
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- asimov-series: '0.5'
asimov-spec: 'asimov>=0.5,<0.6'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
python -m pip install coverage pytest --break-system-packages
python -m pip install --editable . --break-system-packages
python -m pip install htcondor --only-binary=:all: --break-system-packages
- name: Install Asimov
run: python -m pip install '${{ matrix.asimov-spec }}' 'asimov-gwdata>=0.4,<0.5' --break-system-packages
- name: Run Asimov integration test
run: bash .travis/test-asimov.sh
test-run:
needs: install
runs-on: ubuntu-latest
# Integrator + posterior gate. We run this in two CI lanes:
# - legacy : py3.9 + numpy 1.24.4 -- the historically known-good
# configuration on Linux x86_64 where np.float128 is real.
# - modern : py3.12 + numpy 2.x -- the forward-looking target. Catches
# numpy 2.x removals (np.product, np.cumproduct, np.in1d,
# np.alltrue, np.float_) and scipy >= 1.16 mvnun removal.
# Both lanes must pass test-integrate.sh's GMM/AC/AV consistency check.
strategy:
fail-fast: false
matrix:
include:
- lane: legacy
python-version: '3.9'
numpy-pin: 'numpy==1.24.4'
- lane: modern
python-version: '3.12'
numpy-pin: 'numpy>=2.0,<3.0'
name: test-run (${{ matrix.lane }} py${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
# Pin numpy AFTER requirements.txt so it overrides the unpinned
# 'numpy' line in requirements.txt without changing the file.
python -m pip install '${{ matrix.numpy-pin }}' --break-system-packages
python -m pip install coverage pytest pytest-cov --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Show resolved versions
run: |
python -c "import sys, numpy, scipy; print('python', sys.version); print('numpy', numpy.__version__); print('scipy', scipy.__version__)"
- name: Run test scripts
run: |
. .travis/test-coord.sh
. .travis/test-posterior.sh
bash .travis/test-run.sh
bash .travis/test-run-alts.sh
bash .travis/test-build.sh
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.lane }}-py${{ matrix.python-version }}
path: |
**/*.log
**/test-results/*.xml
container-dep-canary:
# Dependency-resolution canary for the container build. The container ships
# an UNPINNED dependency set (containers/requirements-container.txt) and
# clones RIFT at build time, so a fresh upstream release can silently break
# RIFT and only surface when a container rebuild fails (e.g. swig>=4.4.0,
# issue #136). This job installs that same unpinned set + exercises the pixi
# swig-post44 deployment lane and runs the import check, so we get an early
# warning. Runs on push/PR AND weekly (see on.schedule).
#
# Non-blocking: it tracks UPSTREAM changes outside any PR author's control,
# so a red run should alert maintainers, not block unrelated PRs.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10' # matches the container's python3.10
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
- name: Install UNPINNED container dependency set (latest upstream)
run: |
python -m pip install --upgrade pip --break-system-packages
# Strip the GPU-only cupy line: there is no GPU/driver in CI and the
# canary's goal is dependency RESOLUTION + RIFT import, not cupy exec.
# (cupy is not actually listed in requirements-container.txt, but be
# defensive in case it is added later.)
grep -viE '^\s*cupy' containers/requirements-container.txt > /tmp/req-canary.txt
python -m pip install -r /tmp/req-canary.txt --break-system-packages
python -m pip install pytest --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Show resolved versions
run: |
python -c "import sys, numpy, scipy; print('python', sys.version); print('numpy', numpy.__version__); print('scipy', scipy.__version__)"
- name: Import check (latest container deps)
run: python .travis/test-all-mod.py
container-swig-canary:
# Companion to container-dep-canary: exercise the pixi swig-post44 lane,
# which is the direct issue-#136 detector (swig>=4.4.0 breaking RIFT's
# generated bindings). Kept as its own job so a swig failure is distinct
# from a general dependency-resolution failure. Also non-blocking.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
- uses: prefix-dev/setup-pixi@v0.8.1
with:
environments: swig-post44
- name: swig version (post-4.4 lane)
run: pixi run -e swig-post44 swig-version
- name: Install RIFT (post-4.4 swig lane)
run: pixi run -e swig-post44 install-rift
- name: Import check (post-4.4 swig lane)
run: pixi run -e swig-post44 import-check
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
requirements.txt
docs/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
python -m pip install -r docs/requirements.txt --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Build docs
run: |
cd docs
make clean
cd ..
sphinx-build docs/source/ docs/build/
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/rift_O4d'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/
publish_branch: gh-pages
force_push: true