Skip to content

Commit

Permalink
GHA: Fix OpenMP not found on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Nov 20, 2023
1 parent 3330ccb commit fee7a2c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
- name: Install python package
run: scripts/installAmiciSource.sh

- name: Check OpenMP support
run: source build/venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())"

- name: Python tests
run: |
source build/venv/bin/activate \
Expand Down Expand Up @@ -150,22 +153,24 @@ jobs:
- run: echo "BNGPATH=${AMICI_DIR}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
# Ensure CMake is using the python version that we will use for the python tests later on
- run: echo "PYTHON_EXECUTABLE=${Python3_ROOT_DIR}/bin/python3" >> $GITHUB_ENV
- run: echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $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
&& echo LDFLAGS="-L/usr/local/lib/ -L$(brew --prefix)/opt/boost/lib/" >> $GITHUB_ENV \
&& echo CPPFLAGS="-I $(brew --prefix)/opt/boost/include/" >> $GITHUB_ENV
- name: Build AMICI
run: scripts/buildAll.sh

- name: Install python package
run: scripts/installAmiciSource.sh

- name: Check OpenMP support
run: source build/venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())"

- name: cppcheck
run: scripts/run-cppcheck.sh

Expand Down

0 comments on commit fee7a2c

Please sign in to comment.