Skip to content

Commit

Permalink
Build and install MorphIO via cmake.
Browse files Browse the repository at this point in the history
This commit checks that MorphIO can be built and installed
into a local directory of our choosing.
  • Loading branch information
1uc committed Sep 11, 2023
1 parent e75d9f4 commit 0113217
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,11 @@ jobs:
./ci/python_test.sh
./ci/cpp_test.sh
./ci/cpp_test.sh "-DMORPHIO_USE_DOUBLE=ON"
- name: Build and install
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}

run: |
./ci/local_install_test.sh
20 changes: 20 additions & 0 deletions ci/local_install_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# This file builds and installs MorphIO to a local directory.

set -euxo pipefail

BUILD_DIR=build/local_install

if [ $# -ge 1 ]; then
EXTRA_OPTIONS=$1
else
EXTRA_OPTIONS=""
fi

rm -rf $BUILD_DIR
cmake -DCMAKE_INSTALL_PREFIX=${BUILD_DIR}/install \
-DMorphIO_CXX_WARNINGS=ON \
-G "${CMAKE_GENERATOR:-Unix Makefiles}" \
-B ${BUILD_DIR} ${EXTRA_OPTIONS}
cmake --build ${BUILD_DIR} --parallel --target install

0 comments on commit 0113217

Please sign in to comment.