Skip to content

Unify Mac and Linux tests #7119

Unify Mac and Linux tests

Unify Mac and Linux tests #7119

Workflow file for this run

name: 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: 60
matrix:
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: 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: |
conda install fftw mpi git-lfs graphviz gsl openssl openmpi
conda install -c conda-forge "tox<4.0.0"
- 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
cd lalsuite-extra
git lfs pull -I "data/lalsimulation/SEOBNRv2ROM_*.dat"
git lfs pull -I "data/lalsimulation/*ChirpTime*.dat"
git lfs pull -I "data/lalsimulation/SEOBNRv4ROM_v2.0.hdf5"
mv data/lalsimulation/* ../
cd ../
- name: DEBUG DEBUG DEBUG checking various env stuff
run: |
echo "Which Python version do we have?"
python --version
echo "Where is Python?"
which python
echo "Where is tox?"
which tox
echo "What is CONDA_PREFIX?"
echo $CONDA_PREFIX
echo "Is LAPACK where it should?"
find $CONDA_PREFIX -name \*lapack\*
echo "What is LD_LIBRARY_PATH?"
echo $LD_LIBRARY_PATH
- name: run pycbc test suite
run: |
export LAL_DATA_PATH=$PWD
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_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
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
tox -e py-inference
- name: store documentation page
if: matrix.test-type == 'docs' && matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: documentation-page
path: _gh-pages
deploy_documentation:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- name: retrieve built documentation
uses: actions/download-artifact@v4.1.7
with:
name: documentation-page
- name: debug
run: |
mkdir _gh-pages
mv latest _gh-pages
- name: deploying to gh-pages
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _gh-pages
SINGLE_COMMIT: true