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

CI: Fix installation of homebrew packages #2594

Merged
merged 1 commit into from
Nov 23, 2024
Merged
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
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 @@
if hdf5_enabled:
features.append("HDF5")

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

Check warning on line 30 in python/sdist/amici/__main__.py

View check run for this annotation

Codecov / codecov/patch

python/sdist/amici/__main__.py#L29-L30

Added lines #L29 - L30 were not covered by tests

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