Skip to content

Commit

Permalink
ci: fix mac tests with conda
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmmacleod committed Nov 18, 2024
1 parent 53b1757 commit 568aece
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/mac-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,44 @@ jobs:
max-parallel: 4
matrix:
os: [macos-latest]
python-version: ['3.10', '3.11', '3.12']
python-version:
- '3.10'
- '3.11'
- '3.12'

# this is needed for conda environments to activate automatically
defaults:
run:
shell: bash -el {0}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

- name: Cache conda packages
uses: actions/cache@v4
env:
# increment to reset cache
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ matrix.python-version}}-${{ env.CACHE_NUMBER }}

- name: Configure conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
channels: conda-forge
python-version: ${{ matrix.python-version }}

- name: Conda info
run: conda info --all

- run: |
brew install fftw openssl gsl
pip install --upgrade pip setuptools "tox<4.0.0"
conda install \
pip \
setuptools \
"tox<4.0.0"
- name: run basic pycbc test suite
run: |
tox -e py-unittest
9 changes: 2 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ deps =
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
c-compiler
gsl
lapack==3.6.1
mysqlclient
conda_channels=conda-forge
setenv =
; Tell the linker to look for shared libs inside the temporary Conda env.
Expand Down

0 comments on commit 568aece

Please sign in to comment.