Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Mac and Linux tests #4925

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,35 @@ jobs:
strategy:
max-parallel: 60
matrix:
os: [ubuntu-20.04]
os: [ubuntu-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
test-type: [unittest, search, docs]
defaults:
run:
# important when we use Conda envs
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: tests
- uses: actions/checkout@v4
- name: installing system packages
run: |
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* git-lfs graphviz
pip install "tox<4.0.0" pip setuptools --upgrade
conda install fftw git-lfs graphviz gsl openssl
conda install -c conda-forge "tox<4.0.0" mpi openmpi mpi4py
- name: installing macosx packages
if: matrix.os == 'macos-latest'
run: |
conda install -c conda-forge lapack==3.9.0
- name: installing ubuntu packages
if: matrix.os == 'ubuntu-latest'
run: |
conda install -c conda-forge lapack==3.6.1
- name: installing auxiliary data files
run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://git.ligo.org/lscsoft/lalsuite-extra
GIT_LFS_SKIP_SMUDGE=1 git clone https://git.ligo.org/lscsoft/lalsuite-extra.git
cd lalsuite-extra
git lfs pull -I "data/lalsimulation/SEOBNRv2ROM_*.dat"
git lfs pull -I "data/lalsimulation/*ChirpTime*.dat"
Expand All @@ -38,16 +50,25 @@ jobs:
- name: run pycbc test suite
run: |
export LAL_DATA_PATH=$PWD
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH
export CPATH=$CONDA_PREFIX/include:$CPATH
export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
tox -e py-${{matrix.test-type}}
- name: check help messages work
if: matrix.test-type == 'unittest'
run: |
export LAL_DATA_PATH=$PWD
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH
export CPATH=$CONDA_PREFIX/include:$CPATH
export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
tox -e py-help
- name: run inference tests
if: matrix.test-type == 'search'
run: |
export LAL_DATA_PATH=$PWD
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH
export CPATH=$CONDA_PREFIX/include:$CPATH
export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
tox -e py-inference
- name: store documentation page
if: matrix.test-type == 'docs' && matrix.python-version == '3.12'
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/mac-test.yml

This file was deleted.

33 changes: 0 additions & 33 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ deps =
[testenv]
allowlist_externals = bash
passenv=LAL_DATA_PATH
conda_deps=openssl
conda_channels=conda-forge
platform = lin: linux
mac: darwin

# This test should run on almost anybody's environment
[testenv:py-unittest]
Expand All @@ -28,20 +24,6 @@ deps =
; Needed for `BBHx` package to work with PyCBC
git+https://github.com/titodalcanton/BBHx.git@py39-and-cleanup; sys_platform == 'linux'
git+https://github.com/gwastro/BBHX-waveform-model.git; sys_platform == 'linux'
conda_deps=
mysqlclient
lin: gcc_linux-64>=12.2.0
lin: gxx_linux-64>=12.2.0
; mac doesn't work, need fix
; mac: clang_osx-64
; mac: clangxx_osx-64
gsl
lapack==3.6.1
conda_channels=conda-forge
setenv =
; Tell the linker to look for shared libs inside the temporary Conda env.
; Needed to build BBHx's wheel, whick links to LAPACK.
LIBRARY_PATH={envdir}/lib:{env:LIBRARY_PATH:}
commands = pytest

# The following are long running or may require
Expand Down Expand Up @@ -73,21 +55,6 @@ deps =
; Needed for `BBHx` package to work with PyCBC
git+https://github.com/titodalcanton/BBHx.git@py39-and-cleanup; sys_platform == 'linux'
git+https://github.com/gwastro/BBHX-waveform-model.git; sys_platform == 'linux'
conda_deps=
mysqlclient
lin: gcc_linux-64>=12.2.0
lin: gxx_linux-64>=12.2.0
; mac doesn't work, need fix
; mac: clang_osx-64
; mac: clangxx_osx-64
binutils_linux-64>=2.39
gsl
lapack==3.6.1
openmpi
conda_channels=conda-forge
setenv =
PYCBC_TEST_TYPE=docs
; Tell the linker to look for shared libs inside the temporary Conda env.
; Needed to build BBHx's wheel, whick links to LAPACK.
LIBRARY_PATH={envdir}/lib:{env:LIBRARY_PATH:}
commands = bash tools/pycbc_test_suite.sh
Loading