2018-08-26 00:44:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e # fail on any error
|
|
|
|
set -u # treat unset variables as error
|
2018-10-02 01:03:58 +02:00
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
echo "__________Show ENVIROMENT__________"
|
2018-10-02 01:03:58 +02:00
|
|
|
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
|
|
|
|
echo "CARGO_HOME: " $CARGO_HOME
|
|
|
|
echo "CARGO_TARGET: " $CARGO_TARGET
|
|
|
|
echo "CC: " $CC
|
|
|
|
echo "CXX: " $CXX
|
2019-02-13 11:00:41 +01:00
|
|
|
#strip ON
|
|
|
|
export RUSTFLAGS=" -C link-arg=-s"
|
2019-02-25 15:24:44 +01:00
|
|
|
# Linker for crosscomile
|
|
|
|
echo "_____ Linker _____"
|
|
|
|
cat .cargo/config
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-01-22 12:33:45 +01:00
|
|
|
echo "_____ Building target: "$CARGO_TARGET" _____"
|
2018-11-06 20:26:05 +01:00
|
|
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
|
|
|
then
|
2019-01-22 12:33:45 +01:00
|
|
|
time cargo build --target $CARGO_TARGET --release -p parity-clib --features final
|
2018-11-06 20:26:05 +01:00
|
|
|
else
|
2019-01-22 12:33:45 +01:00
|
|
|
time cargo build --target $CARGO_TARGET --release --features final
|
|
|
|
time cargo build --target $CARGO_TARGET --release -p evmbin
|
|
|
|
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
|
|
|
|
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
|
|
|
|
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
2018-11-06 20:26:05 +01:00
|
|
|
fi
|
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
echo "_____ Post-processing binaries _____"
|
2019-02-25 15:24:44 +01:00
|
|
|
rm -rf artifacts/*
|
2019-02-13 11:00:41 +01:00
|
|
|
mkdir -p artifacts/$CARGO_TARGET
|
|
|
|
cd artifacts/$CARGO_TARGET
|
|
|
|
|
2019-01-22 12:33:45 +01:00
|
|
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
|
|
|
then
|
|
|
|
cp -v ../../target/$CARGO_TARGET/release/libparity.so ./libparity.so
|
|
|
|
else
|
|
|
|
cp -v ../../target/$CARGO_TARGET/release/parity ./parity
|
|
|
|
cp -v ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
|
|
|
|
cp -v ../../target/$CARGO_TARGET/release/ethstore ./ethstore
|
|
|
|
cp -v ../../target/$CARGO_TARGET/release/ethkey ./ethkey
|
|
|
|
cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper
|
|
|
|
fi
|
2018-11-06 20:26:05 +01:00
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
echo "_____ Calculating checksums _____"
|
|
|
|
for binary in $(ls)
|
|
|
|
do
|
2019-02-25 15:24:44 +01:00
|
|
|
rhash --sha256 $binary -o $binary.sha256 #do we still need this hash (SHA2)?
|
|
|
|
rhash --sha3-256 $binary -o $binary.sha3
|
2018-08-26 00:44:08 +02:00
|
|
|
done
|