2018-08-26 00:44:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e # fail on any error
|
|
|
|
set -u # treat unset variables as error
|
|
|
|
|
|
|
|
set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs2015\VC\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"
|
|
|
|
set LIB="C:\vs2015\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64"
|
2019-03-27 14:47:08 +01:00
|
|
|
sccache -s
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
echo "__________Show ENVIROMENT__________"
|
|
|
|
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
|
|
|
|
echo "CARGO_HOME: " $CARGO_HOME
|
|
|
|
echo "CARGO_TARGET: " $CARGO_TARGET
|
2019-03-27 14:47:08 +01:00
|
|
|
echo "RUSTC_WRAPPER: " $RUSTC_WRAPPER
|
|
|
|
echo "SCCACHE_DIR: " $SCCACHE_DIR
|
2018-10-02 01:03:58 +02:00
|
|
|
|
|
|
|
echo "_____ Building target: "$CARGO_TARGET" _____"
|
2019-06-18 20:24:21 +02:00
|
|
|
# NOTE: Enables the aes-ni instructions for RustCrypto dependency.
|
|
|
|
# If you change this please remember to also update .cargo/config
|
|
|
|
export RUSTFLAGS=" -Ctarget-feature=+aes,+sse2,+ssse3 -Ctarget-feature=+crt-static"
|
|
|
|
|
2019-04-12 18:51:01 +02:00
|
|
|
time cargo build --target $CARGO_TARGET --verbose --release --features final
|
|
|
|
time cargo build --target $CARGO_TARGET --verbose --release -p evmbin
|
|
|
|
time cargo build --target $CARGO_TARGET --verbose --release -p ethstore-cli
|
|
|
|
time cargo build --target $CARGO_TARGET --verbose --release -p ethkey-cli
|
2018-10-02 01:03:58 +02:00
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
echo "__________Sign binaries__________"
|
2018-10-02 01:03:58 +02:00
|
|
|
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe
|
|
|
|
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe
|
|
|
|
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe
|
|
|
|
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe
|
2018-08-26 00:44:08 +02:00
|
|
|
|
|
|
|
echo "_____ Post-processing binaries _____"
|
|
|
|
rm -rf artifacts
|
|
|
|
mkdir -p artifacts
|
|
|
|
cd artifacts
|
|
|
|
mkdir -p $CARGO_TARGET
|
|
|
|
cd $CARGO_TARGET
|
2018-10-02 01:03:58 +02:00
|
|
|
cp --verbose ../../target/$CARGO_TARGET/release/parity.exe ./parity.exe
|
|
|
|
cp --verbose ../../target/$CARGO_TARGET/release/parity-evm.exe ./parity-evm.exe
|
|
|
|
cp --verbose ../../target/$CARGO_TARGET/release/ethstore.exe ./ethstore.exe
|
|
|
|
cp --verbose ../../target/$CARGO_TARGET/release/ethkey.exe ./ethkey.exe
|
2018-08-26 00:44:08 +02:00
|
|
|
|
|
|
|
echo "_____ Calculating checksums _____"
|
|
|
|
for binary in $(ls)
|
|
|
|
do
|
|
|
|
rhash --sha256 $binary -o $binary.sha256
|
2018-10-01 11:13:31 +02:00
|
|
|
./parity.exe tools hash $binary > $binary.sha3
|
2018-08-26 00:44:08 +02:00
|
|
|
done
|
|
|
|
cp parity.exe.sha256 parity.sha256
|
2018-09-30 13:42:49 +02:00
|
|
|
cp parity.exe.sha3 parity.sha3
|
2019-03-27 14:47:08 +01:00
|
|
|
|
|
|
|
sccache -s
|