2019-03-11 15:26:35 +01:00
|
|
|
#!/bin/bash
|
|
|
|
echo "________Running test-cpp.sh________"
|
|
|
|
set -e # fail on any error
|
|
|
|
set -u # treat unset variables as error
|
|
|
|
#use nproc `linux only
|
|
|
|
THREADS=$(nproc)
|
2019-10-02 22:01:20 +02:00
|
|
|
export CC="sccache gcc"
|
|
|
|
export CXX="sccache g++"
|
2019-03-11 15:26:35 +01:00
|
|
|
|
|
|
|
echo "________Running the C++ example________"
|
|
|
|
DIR=parity-clib/examples/cpp/build
|
|
|
|
mkdir -p $DIR
|
|
|
|
cd $DIR
|
|
|
|
cmake ..
|
2019-03-26 12:37:45 +01:00
|
|
|
make VERBOSE=1 -j $THREADS
|
2019-03-11 15:26:35 +01:00
|
|
|
# Note: we don't try to run the example because it tries to sync Kovan, and we don't want
|
|
|
|
# that to happen on CI
|
|
|
|
cd -
|
|
|
|
rm -rf $DIR
|
2019-10-02 22:01:20 +02:00
|
|
|
#show sccache statistics
|
2019-10-08 20:58:34 +02:00
|
|
|
sccache --show-stats
|