Skip to content

Commit

Permalink
CI: Fix installation of homebrew packages (#2594)
Browse files Browse the repository at this point in the history
Things started failing yesterday(?), seemingly because of a pre-installed pkgconf interfering with the one to be installed as hdf5 dependency.
  • Loading branch information
dweindl authored Nov 23, 2024
1 parent f42cc16 commit 7ba2165
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/actions/install-macos-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ runs:

# install amici dependencies
- name: homebrew
run: brew install hdf5 swig gcc libomp boost
# install hdf5 without dependencies, because pkgconf installation fails,
# because it's already installed on the runners. install the other
# hdf5 dependencies (libaec) manually
run: brew install libaec && brew install --ignore-dependencies hdf5 && brew install swig libomp boost
shell: bash
10 changes: 2 additions & 8 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,8 @@ jobs:

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV

# install amici dependencies
- name: homebrew
run: |
brew install hdf5 swig gcc cppcheck libomp boost \
&& brew ls -v boost \
&& brew ls -v libomp \
&& echo LDFLAGS="-L/usr/local/lib/ -L/usr/local/Cellar/boost/1.81.0_1/lib/" >> $GITHUB_ENV \
&& echo CPPFLAGS="-I /usr/local/Cellar/boost/1.81.0_1/include/" >> $GITHUB_ENV
- name: Install dependencies
uses: ./.github/actions/install-macos-dependencies

- name: Create AMICI sdist
run: scripts/buildSdist.sh
Expand Down
11 changes: 10 additions & 1 deletion python/sdist/amici/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

import sys

from . import __version__, compiledWithOpenMP, has_clibs, hdf5_enabled
from . import (
__version__,
compiledWithOpenMP,
has_clibs,
hdf5_enabled,
CpuTimer,
)


def print_info():
Expand All @@ -20,6 +26,9 @@ def print_info():
if hdf5_enabled:
features.append("HDF5")

if CpuTimer.uses_thread_clock:
features.append("thread_clock")

print(
f"AMICI ({sys.platform}) version {__version__} ({','.join(features)})"
)
Expand Down

0 comments on commit 7ba2165

Please sign in to comment.