Rift o4d junior calmarg in loop: AFTER main 'distance' merge #132
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |