2017-02-03 00:00:46 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-02-08 20:47:24 +00:00
|
|
|
if [ -z "$1" ]; then
|
2017-02-03 00:00:46 +00:00
|
|
|
BUILD_TYPE=Release
|
2017-02-08 20:47:24 +00:00
|
|
|
else
|
2017-02-03 00:00:46 +00:00
|
|
|
BUILD_TYPE="$1"
|
|
|
|
fi
|
|
|
|
|
2017-02-08 20:47:24 +00:00
|
|
|
cd $(dirname "$0")/.. &&
|
|
|
|
mkdir -p build &&
|
|
|
|
cd build &&
|
|
|
|
cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" &&
|
2017-02-03 00:00:46 +00:00
|
|
|
make -j2
|
|
|
|
|
2017-02-08 20:47:24 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Failed to build"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-02-03 00:00:46 +00:00
|
|
|
if [ -z $CI ]; then
|
2017-02-08 20:47:24 +00:00
|
|
|
echo "Installing solc and soltest"
|
2017-02-03 00:00:46 +00:00
|
|
|
install solc/solc /usr/local/bin && install test/soltest /usr/local/bin
|
|
|
|
fi
|