forked from AMICI-dev/AMICI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix_2235
- Loading branch information
Showing
6 changed files
with
109 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Install AMICI dependencies for MacOS | ||
description: Install AMICI dependencies for MacOS | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# use all available cores | ||
- run: echo "AMICI_PARALLEL_COMPILE=" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# AMICI repository root | ||
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# BioNetGen path | ||
- run: echo "BNGPATH=${AMICI_DIR}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# CMake hints | ||
# 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 | ||
shell: bash | ||
- run: echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $GITHUB_ENV | ||
shell: bash | ||
- run: echo "BOOST_ROOT=$(brew --prefix)/opt/boost" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
# install amici dependencies | ||
- name: homebrew | ||
run: brew install hdf5 swig gcc libomp boost | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
#!/bin/bash | ||
# | ||
# Build libamici | ||
# | ||
# Create a virtual environment and perform an editable amici installation | ||
set -e | ||
|
||
SCRIPT_PATH=$(dirname $BASH_SOURCE) | ||
AMICI_PATH=$(cd $SCRIPT_PATH/.. && pwd) | ||
AMICI_PATH=$(cd "$SCRIPT_PATH/.." && pwd) | ||
|
||
venv_dir="${AMICI_PATH}/build/venv" | ||
# Disabled until cmake package is made compatible with updated setup.py | ||
#make python-wheel | ||
#pip3 install --user --prefix= `ls -t ${AMICI_PATH}/build/python/amici-*.whl | head -1` | ||
|
||
# test install from setup.py | ||
set +e | ||
python3 -m venv ${AMICI_PATH}/build/venv --clear | ||
mkdir -p "${venv_dir}" | ||
python3 -m venv "${venv_dir}" --clear | ||
# in case this fails (usually due to missing ensurepip, try getting pip | ||
# manually | ||
if [[ $? ]]; then | ||
set -e | ||
python3 -m venv ${AMICI_PATH}/build/venv --clear --without-pip | ||
source ${AMICI_PATH}/build/venv/bin/activate | ||
curl https://bootstrap.pypa.io/get-pip.py -o ${AMICI_PATH}/build/get-pip.py | ||
python3 ${AMICI_PATH}/build/get-pip.py | ||
python3 -m venv "${venv_dir}" --clear --without-pip | ||
source "${venv_dir}/bin/activate" | ||
get_pip=${AMICI_PATH}/build/get-pip.py | ||
curl "https://bootstrap.pypa.io/get-pip.py" -o "${get_pip}" | ||
python3 "${get_pip}" | ||
rm "${get_pip}" | ||
else | ||
set -e | ||
source ${AMICI_PATH}/build/venv/bin/activate | ||
source "${venv_dir}/bin/activate" | ||
fi | ||
|
||
pip install --upgrade pip wheel | ||
pip install --upgrade pip scipy matplotlib coverage pytest \ | ||
pytest-cov cmake_build_extension numpy | ||
pip install git+https://github.com/FFroehlich/pysb@fix_pattern_matching # pin to PR for SPM with compartments | ||
AMICI_BUILD_TEMP="${AMICI_PATH}/python/sdist/build/temp" pip install --verbose -e ${AMICI_PATH}/python/sdist[petab,test,vis] --no-build-isolation | ||
python -m pip install --upgrade pip wheel | ||
python -m pip install --upgrade pip setuptools cmake_build_extension numpy | ||
python -m pip install git+https://github.com/FFroehlich/pysb@fix_pattern_matching # pin to PR for SPM with compartments | ||
AMICI_BUILD_TEMP="${AMICI_PATH}/python/sdist/build/temp" \ | ||
python -m pip install --verbose -e "${AMICI_PATH}/python/sdist[petab,test,vis]" --no-build-isolation | ||
deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters