2016-05-28 12:21:40 +07:00
|
|
|
#!/usr/bin/env bash
|
2017-07-20 08:01:46 -07:00
|
|
|
# Exit if anything fails.
|
2016-05-28 12:21:40 +07:00
|
|
|
set -eux
|
|
|
|
|
|
|
|
HERE=$PWD
|
|
|
|
|
2017-07-20 08:01:46 -07:00
|
|
|
# Override gcc version to $GCC_VER.
|
|
|
|
# Put an appropriate symlink at the front of the path.
|
|
|
|
mkdir -v $HOME/bin
|
|
|
|
for g in gcc g++ gcov gcc-ar gcc-nm gcc-ranlib
|
|
|
|
do
|
|
|
|
test -x $( type -p ${g}-$GCC_VER )
|
|
|
|
ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g}
|
|
|
|
done
|
2016-05-09 23:06:38 +07:00
|
|
|
for c in clang clang++ llvm-symbolizer
|
2017-07-20 08:01:46 -07:00
|
|
|
do
|
|
|
|
test -x $( type -p ${c}-$CLANG_VER )
|
|
|
|
ln -sv $(type -p ${c}-$CLANG_VER) $HOME/bin/${c}
|
|
|
|
done
|
2016-04-27 14:58:07 +07:00
|
|
|
# NOTE, changed from PWD -> HOME
|
|
|
|
export PATH=$HOME/bin:$PATH
|
2017-07-20 08:01:46 -07:00
|
|
|
|
|
|
|
# What versions are we ACTUALLY running?
|
|
|
|
if [ -x $HOME/bin/g++ ]; then
|
|
|
|
$HOME/bin/g++ -v
|
|
|
|
fi
|
|
|
|
if [ -x $HOME/bin/clang ]; then
|
|
|
|
$HOME/bin/clang -v
|
|
|
|
fi
|
|
|
|
# Avoid `spurious errors` caused by ~/.npm permission issues
|
|
|
|
# Does it already exist? Who owns? What permissions?
|
|
|
|
ls -lah ~/.npm || mkdir ~/.npm
|
|
|
|
# Make sure we own it
|
|
|
|
chown -Rc $USER ~/.npm
|
|
|
|
# We use this so we can filter the subtrees from our coverage report
|
2016-04-27 14:58:07 +07:00
|
|
|
pip install --user https://github.com/codecov/codecov-python/archive/master.zip
|
|
|
|
pip install --user autobahntestsuite
|
2017-07-20 08:01:46 -07:00
|
|
|
|
|
|
|
bash scripts/install-boost.sh
|
2016-04-27 14:58:07 +07:00
|
|
|
bash scripts/install-valgrind.sh
|
|
|
|
|
|
|
|
# Install lcov
|
|
|
|
# Download the archive
|
|
|
|
wget http://downloads.sourceforge.net/ltp/lcov-1.12.tar.gz
|
|
|
|
# Extract to ~/lcov-1.12
|
|
|
|
tar xfvz lcov-1.12.tar.gz -C $HOME
|
|
|
|
# Set install path
|
|
|
|
mkdir -p $LCOV_ROOT
|
|
|
|
cd $HOME/lcov-1.12 && make install PREFIX=$LCOV_ROOT
|
2016-05-28 12:21:40 +07:00
|
|
|
|
|
|
|
# Install coveralls reporter
|
|
|
|
cd $HERE
|
|
|
|
mkdir -p node_modules
|
|
|
|
npm install coveralls
|