diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 54d5ee2c9b8..941fd11fca4 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -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" @@ -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' diff --git a/.github/workflows/mac-test.yml b/.github/workflows/mac-test.yml deleted file mode 100644 index 2a26882d7ae..00000000000 --- a/.github/workflows/mac-test.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: macos basic tests - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - max-parallel: 4 - matrix: - os: [macos-latest] - python-version: ['3.10', '3.11', '3.12'] - steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - run: | - brew install fftw openssl gsl - pip install --upgrade pip setuptools "tox<4.0.0" - - name: run basic pycbc test suite - run: | - tox -e py-unittest diff --git a/tox.ini b/tox.ini index d3d96b2039b..d0c41fcd12d 100644 --- a/tox.ini +++ b/tox.ini @@ -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] @@ -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 @@ -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