Skip to content

Commit f643c0d

Browse files
authored
CMake: Find static suitesparse on mac (#2076)
* CMake: Find static suitesparse on mac * Test installation of source distribution on mac
1 parent e524930 commit f643c0d

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

.github/workflows/test_install.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
run: |
5151
scripts/installAmiciArchive.sh
5252
53-
sdist:
54-
name: sdist Install
53+
sdist_ubuntu:
54+
name: sdist Install Ubuntu
5555

5656
runs-on: ubuntu-22.04
5757

@@ -92,3 +92,45 @@ jobs:
9292
- name: Test import
9393
run: |
9494
python -m amici
95+
96+
97+
sdist_macos:
98+
name: sdist Install macos
99+
100+
runs-on: macos-latest
101+
102+
strategy:
103+
matrix:
104+
python-version: [3.9]
105+
106+
steps:
107+
- name: Set up Python ${{ matrix.python-version }}
108+
uses: actions/setup-python@v4
109+
with:
110+
python-version: ${{ matrix.python-version }}
111+
112+
- uses: actions/checkout@v3
113+
- run: git fetch --prune --unshallow
114+
115+
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
116+
117+
# install amici dependencies
118+
- name: homebrew
119+
run: |
120+
brew install hdf5 swig gcc cppcheck libomp boost \
121+
&& brew ls -v boost \
122+
&& brew ls -v libomp \
123+
&& echo LDFLAGS="-L/usr/local/lib/ -L/usr/local/Cellar/boost/1.81.0_1/lib/" >> $GITHUB_ENV \
124+
&& echo CPPFLAGS="-I /usr/local/Cellar/boost/1.81.0_1/include/" >> $GITHUB_ENV
125+
126+
- name: Create AMICI sdist
127+
run: |
128+
scripts/buildSdist.sh
129+
130+
- name: Install python sdist
131+
run: |
132+
pip3 install -v --user $(ls -t python/sdist/dist/amici-*.tar.gz | head -1)
133+
134+
- name: Test import
135+
run: |
136+
python -m amici

ThirdParty/sundials/cmake/tpl/FindKLU.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ if(WIN32)
3535
set(CMAKE_FIND_LIBRARY_PREFIXES lib ${CMAKE_FIND_LIBRARY_PREFIXES})
3636
set(CMAKE_FIND_LIBRARY_SUFFIXES d.lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
3737
elseif(APPLE)
38-
set(CMAKE_FIND_LIBRARY_SUFFIXES d.a ${CMAKE_FIND_LIBRARY_SUFFIXES})
38+
# AMICI
39+
# set(CMAKE_FIND_LIBRARY_SUFFIXES d.a ${CMAKE_FIND_LIBRARY_SUFFIXES})
40+
set(CMAKE_FIND_LIBRARY_SUFFIXES .a d.a ${CMAKE_FIND_LIBRARY_SUFFIXES})
3941
else()
4042
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
4143
endif()

0 commit comments

Comments
 (0)