openethereum/scripts/gitlab/build-unix.sh

36 lines
1.0 KiB
Bash
Raw Permalink Normal View History

2018-06-02 04:13:28 +02:00
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
echo "__________Show ENVIROMENT__________"
echo "CC: " $CC
echo "CXX: " $CXX
echo "__________CARGO CONFIG__________"
rm -rf .cargo
mkdir -p .cargo
echo "[target.$CARGO_TARGET]" >> .cargo/config
echo "linker= \"$CC\"" >> .cargo/config
cat .cargo/config
echo "_____ Building target: "$CARGO_TARGET" _____"
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
2018-08-02 14:35:53 +02:00
time cargo build --target $CARGO_TARGET --release -p whisper-cli
2018-06-02 04:13:28 +02:00
echo "_____ Post-processing binaries _____"
rm -rf artifacts
mkdir -p artifacts
cd artifacts
2018-08-02 14:35:53 +02:00
mkdir -p $CARGO_TARGET
cd $CARGO_TARGET
cp ../../target/$CARGO_TARGET/release/{parity,parity-evm,ethstore,ethkey,whisper} .
2018-06-02 04:13:28 +02:00
strip -v ./*
echo "_____ Calculating checksums _____"
for binary in $(ls)
do
rhash --sha256 $binary -o $binary.sha256
done