forked from pramodk/nrn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis_build.sh
executable file
·48 lines (38 loc) · 965 Bytes
/
travis_build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
# Smoke test for NEURON builds travis_build.sh relative/path/to/build if the
# environment variable CONFIG_OPTIONS is set, that is used for the ./configure
# script, otherwise a default is used
set -ex
BUILD_DIR=$1; shift
INSTALL_DIR=$(pwd)/$BUILD_DIR/install
if [[ -z $CONFIG_OPTIONS ]]; then
CONFIG_OPTIONS="--without-x
--without-paranrn
--with-nrnpython=$(which python)
"
fi
CONFIG_OPTIONS+=" --prefix=$INSTALL_DIR"
configure() {
local CONFIGURE
CONFIGURE=$1; shift
echo "Building with options: $CONFIG_OPTIONS"
"$CONFIGURE" $CONFIG_OPTIONS
}
git_clean() {
git clean -ffd
}
build() {
./build.sh
CONFIGURE=$(readlink -f configure)
mkdir -p "$BUILD_DIR"
pushd "$BUILD_DIR"
configure "$CONFIGURE"
make install
popd
}
test_install() {
echo -e 'topology()' | "$INSTALL_DIR/x86_64/bin/neurondemo" | grep -q soma
}
git_clean
build
test_install