Skip to content

Commit

Permalink
fix: install-demo-module.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sizmailov committed Oct 23, 2023
1 parent 316df68 commit 1966005
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
matrix:
pybind11-branch:
- "master"
- "v2.0"
python:
- "3.12"
- "3.11"
Expand Down Expand Up @@ -76,7 +75,9 @@ jobs:

- name: Install demo module
shell: bash
run: ./tests/install-demo-module.sh --pybind11-branch "${{ matrix.pybind11-branch }}"
run: ./tests/install-demo-module.sh \
--pybind11-branch "${{ matrix.pybind11-branch }}" \
--eigen-branch "master"

- name: Check stubs generation
shell: bash
Expand Down
9 changes: 6 additions & 3 deletions tests/install-demo-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ function parse_args() {
fi
echo "Usage: $0 --pybind11-branch PYBIND11_BRANCH"
echo " --pybind11-branch name of pybind11 branch"
echo " --eigen-branch name of eigen branch"
exit 1
}

# parse params
while [[ "$#" > 0 ]]; do case $1 in
--pybind11-branch) PYBIND11_BRANCH="$2"; shift;shift;;
--eigen-branch) EIGEN_BRANCH="$2"; shift;shift;;
*) usage "Unknown parameter passed: $1"; shift; shift;;
esac; done

# verify params
if [ -z "$PYBIND11_BRANCH" ]; then usage "PYBIND11_BRANCH is not set"; fi;
if [ -z "$EIGEN_BRANCH" ]; then usage "EIGEN_BRANCH is not set"; fi;

TESTS_ROOT="$(readlink -m "$(dirname "$0")")"
PROJECT_ROOT="${TESTS_ROOT}/.."
Expand All @@ -41,7 +44,7 @@ clone_eigen() {
if [ ! -d "${EXTERNAL_DIR}/eigen" ]; then
git clone \
--depth 1 \
--branch master \
--branch "${EIGEN_BRANCH}" \
--single-branch \
https://gitlab.com/libeigen/eigen.git \
"${EXTERNAL_DIR}/eigen"
Expand Down Expand Up @@ -85,8 +88,8 @@ install_demo() {
install_pydemo() {
(
export CMAKE_PREFIX_PATH="$(readlink -m "${INSTALL_PREFIX}")";
export CMAKE_ARGS="CMAKE_CXX_STANDARD=17";
pip install "${TESTS_ROOT}/py-demo"
export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=17";
pip install --force-reinstall "${TESTS_ROOT}/py-demo"
)
}

Expand Down

0 comments on commit 1966005

Please sign in to comment.