Merge branch 'master' into gitlab-next
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
for f in $(find . -name '*.rs'); do
|
||||
cat license_header $f > $f.new
|
||||
mv $f.new $f
|
||||
PAT_GPL="^// Copyright.*If not, see <http://www.gnu.org/licenses/>\.$"
|
||||
PAT_OTHER="^// Copyright"
|
||||
|
||||
for f in $(find . -type f | egrep '\.(c|cpp|rs)$'); do
|
||||
HEADER=$(head -16 $f)
|
||||
if [[ $HEADER =~ $PAT_GPL ]]; then
|
||||
BODY=$(tail -n +17 $f)
|
||||
cat license_header > temp
|
||||
echo "$BODY" >> temp
|
||||
mv temp $f
|
||||
elif [[ $HEADER =~ $PAT_OTHER ]]; then
|
||||
echo "Other license was found do nothing"
|
||||
else
|
||||
echo "$f was missing header"
|
||||
cat license_header $f > temp
|
||||
mv temp $f
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Installing KCOV under ubuntu
|
||||
# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650#
|
||||
### Install deps
|
||||
@@ -15,18 +15,17 @@ set -x
|
||||
RUSTFLAGS="-C link-dead-code" cargo test --all --no-run || exit $?
|
||||
KCOV_TARGET="target/cov"
|
||||
KCOV_FLAGS="--verify"
|
||||
EXCLUDE="/usr/lib,/usr/include,$HOME/.cargo,$HOME/.multirust,rocksdb,secp256k1"
|
||||
mkdir -p $KCOV_TARGET
|
||||
echo "Cover RUST"
|
||||
for FILE in `find target/debug/deps ! -name "*.*"`
|
||||
do
|
||||
timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE
|
||||
done
|
||||
timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
|
||||
do
|
||||
timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET $FILE
|
||||
done
|
||||
timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
|
||||
echo "Cover JS"
|
||||
cd js
|
||||
npm install&&npm run test:coverage
|
||||
cd ..
|
||||
bash <(curl -s https://codecov.io/bash)&&
|
||||
echo "Uploaded code coverage"
|
||||
echo "Uploaded code coverage"
|
||||
exit 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
# generate documentation only for partiy and ethcore libraries
|
||||
|
||||
cargo doc --no-deps --verbose --all --exclude parity-ipfs-api &&
|
||||
|
||||
11
scripts/docker-build.sh
Executable file
11
scripts/docker-build.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
cd docker/hub
|
||||
DOCKER_BUILD_TAG=$1
|
||||
echo "Docker build tag: " $DOCKER_BUILD_TAG
|
||||
if [[ "$DOCKER_BUILD_TAG" = "latest" ]]; then
|
||||
docker build --build-arg BUILD_TAG="master" --no-cache=true --tag parity/parity:$DOCKER_BUILD_TAG .
|
||||
else
|
||||
docker build --build-arg BUILD_TAG=$DOCKER_BUILD_TAG --no-cache=true --tag parity/parity:$DOCKER_BUILD_TAG .
|
||||
fi
|
||||
docker run -it parity/parity:$DOCKER_BUILD_TAG -v
|
||||
docker push parity/parity:$DOCKER_BUILD_TAG
|
||||
16
scripts/evm_jsontests_bench.sh
Executable file
16
scripts/evm_jsontests_bench.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cargo build --release -p evmbin
|
||||
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmArithmeticTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmBitwiseLogicOperation
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmBlockInfoTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmEnvironmentalInfo
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmIOandFlowOperations
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmLogTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmPerformance
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmPushDupSwapTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmRandomTest
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmSha3Test
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmSystemOperations
|
||||
./target/release/parity-evm stats-jsontests-vm ./ethcore/res/ethereum/tests/VMTests/vmTests
|
||||
25
scripts/evm_uint_bench.sh
Executable file
25
scripts/evm_uint_bench.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cargo build --release -p evmbin
|
||||
|
||||
# LOOP TEST
|
||||
CODE1=606060405260005b620f42408112156019575b6001016007565b600081905550600680602b6000396000f3606060405200
|
||||
if [ -x "$(command -v ethvm)" ]; then
|
||||
ethvm --code $CODE1
|
||||
echo "^^^^ ethvm"
|
||||
fi
|
||||
./target/release/parity-evm stats --code $CODE1 --gas 4402000
|
||||
echo "^^^^ usize"
|
||||
./target/release/parity-evm stats --code $CODE1
|
||||
echo "^^^^ U256"
|
||||
|
||||
# RNG TEST
|
||||
CODE2=6060604052600360056007600b60005b620f4240811215607f5767ffe7649d5eca84179490940267f47ed85c4b9a6379019367f8e5dd9a5c994bba9390930267f91d87e4b8b74e55019267ff97f6f3b29cda529290920267f393ada8dd75c938019167fe8d437c45bb3735830267f47d9a7b5428ffec019150600101600f565b838518831882186000555050505050600680609a6000396000f3606060405200
|
||||
if [ -x "$(command -v ethvm)" ]; then
|
||||
ethvm --code $CODE2
|
||||
echo "^^^^ ethvm"
|
||||
fi
|
||||
./target/release/parity-evm stats --code $CODE2 --gas 143020115
|
||||
echo "^^^^ usize"
|
||||
./target/release/parity-evm stats --code $CODE2
|
||||
echo "^^^^ U256"
|
||||
47
scripts/gitlab-test.sh
Executable file
47
scripts/gitlab-test.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
#ARGUMENT test for RUST and COVERAGE
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
if [[ "$CI_COMMIT_REF_NAME" = "master" || "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
|
||||
export GIT_COMPARE=$CI_COMMIT_REF_NAME~;
|
||||
else
|
||||
export GIT_COMPARE=master;
|
||||
fi
|
||||
git fetch -a
|
||||
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ -e ^docs/ | wc -l)"
|
||||
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
|
||||
TEST_SWITCH=$1
|
||||
rust_test () {
|
||||
git submodule update --init --recursive
|
||||
rustup show
|
||||
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
|
||||
then echo "Skipping Rust tests since no Rust files modified.";
|
||||
else ./test.sh || exit $?;
|
||||
fi
|
||||
# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]];
|
||||
# ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3
|
||||
# then sh scripts/aura-test.sh; # || exit $?;
|
||||
# fi
|
||||
}
|
||||
coverage_test () {
|
||||
git submodule update --init --recursive
|
||||
rm -rf target/*
|
||||
scripts/cov.sh
|
||||
}
|
||||
case $TEST_SWITCH in
|
||||
stable )
|
||||
rustup default stable
|
||||
rust_test
|
||||
;;
|
||||
beta)
|
||||
rustup default beta
|
||||
rust_test
|
||||
;;
|
||||
nightly)
|
||||
rustup default nightly
|
||||
rust_test
|
||||
;;
|
||||
test-coverage)
|
||||
coverage_test
|
||||
;;
|
||||
esac
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e # fail on any error
|
||||
#ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
|
||||
BUILD_PLATFORM=$1
|
||||
@@ -15,15 +16,13 @@ echo "Build identifier: " $IDENT
|
||||
echo "Cargo target: " $PLATFORM
|
||||
echo "CC&CXX flags: " $CC ", " $CXX
|
||||
echo "Architecture: " $ARC
|
||||
echo "Libssl version: " $LIBSSL
|
||||
echo "Parity version: " $VER
|
||||
echo "Branch: " $CI_BUILD_REF_NAME
|
||||
echo "Protect? " $protect
|
||||
echo "--------------------"
|
||||
|
||||
# NOTE for md5 and sha256 we want to display filename as well
|
||||
# NOTE for sha256 we want to display filename as well
|
||||
# hence we use --* instead of -p *
|
||||
MD5_BIN="rhash --md5"
|
||||
SHA256_BIN="rhash --sha256"
|
||||
|
||||
set_env () {
|
||||
@@ -43,7 +42,6 @@ set_env_win () {
|
||||
set RUST_BACKTRACE=1
|
||||
#export RUSTFLAGS=$RUSTFLAGS
|
||||
rustup default stable-x86_64-pc-windows-msvc
|
||||
echo "MsBuild.exe windows\ptray\ptray.vcxproj /p:Platform=x64 /p:Configuration=Release" > msbuild.cmd
|
||||
echo "@ signtool sign /f "\%"1 /p "\%"2 /tr http://timestamp.comodoca.com /du https://parity.io "\%"3" > sign.cmd
|
||||
}
|
||||
build () {
|
||||
@@ -66,90 +64,22 @@ strip_binaries () {
|
||||
calculate_checksums () {
|
||||
echo "__________Checksum calculation__________"
|
||||
rhash --version
|
||||
rm -rf *.md5
|
||||
|
||||
rm -rf *.sha256
|
||||
BIN="target/$PLATFORM/release/parity$S3WIN"
|
||||
export SHA3="$($BIN tools hash $BIN)"
|
||||
echo "__________Parity file SHA3__________"
|
||||
echo $SHA3
|
||||
$MD5_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.sha256
|
||||
$MD5_BIN target/$PLATFORM/release/parity-evm$S3WIN > parity-evm$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/parity-evm$S3WIN > parity-evm$S3WIN.sha256
|
||||
$MD5_BIN target/$PLATFORM/release/ethstore$S3WIN > ethstore$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/ethstore$S3WIN > ethstore$S3WIN.sha256
|
||||
$MD5_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.sha256
|
||||
}
|
||||
make_deb () {
|
||||
rm -rf deb
|
||||
echo "__________Create DEBIAN files__________"
|
||||
mkdir -p deb/usr/bin/
|
||||
mkdir -p deb/DEBIAN
|
||||
echo "create copyright, docs, compat"
|
||||
cp LICENSE deb/DEBIAN/copyright
|
||||
echo "https://github.com/paritytech/parity/wiki" >> deb/DEBIAN/docs
|
||||
echo "8" >> deb/DEBIAN/compat
|
||||
echo "create control file"
|
||||
control=deb/DEBIAN/control
|
||||
echo "Package: parity" >> $control
|
||||
echo "Version: $VER" >> $control
|
||||
echo "Source: parity" >> $control
|
||||
echo "Section: science" >> $control
|
||||
echo "Priority: extra" >> $control
|
||||
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control
|
||||
echo "Build-Depends: debhelper (>=9)" >> $control
|
||||
echo "Standards-Version: 3.9.5" >> $control
|
||||
echo "Homepage: https://parity.io" >> $control
|
||||
echo "Vcs-Git: git://github.com/paritytech/parity.git" >> $control
|
||||
echo "Vcs-Browser: https://github.com/paritytech/parity" >> $control
|
||||
echo "Architecture: $ARC" >> $control
|
||||
echo "Depends: $LIBSSL" >> $control
|
||||
echo "Description: Ethereum network client by Parity Technologies" >> $control
|
||||
size=`du deb/|awk 'END {print $1}'`
|
||||
echo "Installed-Size: $size" >> $control
|
||||
echo "__________Build .deb package__________"
|
||||
cp target/$PLATFORM/release/parity deb/usr/bin/parity
|
||||
cp target/$PLATFORM/release/parity-evm deb/usr/bin/parity-evm
|
||||
cp target/$PLATFORM/release/ethstore deb/usr/bin/ethstore
|
||||
cp target/$PLATFORM/release/ethkey deb/usr/bin/ethkey
|
||||
dpkg-deb -b deb "parity_"$VER"_"$IDENT"_"$ARC".deb"
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC".deb" > "parity_"$VER"_"$IDENT"_"$ARC".deb.md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC".deb" > "parity_"$VER"_"$IDENT"_"$ARC".deb.sha256"
|
||||
}
|
||||
make_rpm () {
|
||||
rm -rf /install
|
||||
echo "__________Create RPM package__________"
|
||||
mkdir -p /install/usr/bin
|
||||
cp target/$PLATFORM/release/parity /install/usr/bin
|
||||
cp target/$PLATFORM/release/parity-evm /install/usr/bin/parity-evm
|
||||
cp target/$PLATFORM/release/ethstore /install/usr/bin/ethstore
|
||||
cp target/$PLATFORM/release/ethkey /install/usr/bin/ethkey
|
||||
|
||||
rm -rf "parity-"$VER"-1."$ARC".rpm" || true
|
||||
fpm -s dir -t rpm -n parity -v $VER --epoch 1 --license GPLv3 -d openssl --provides parity --url https://parity.io --vendor "Parity Technologies" -a x86_64 -m "<devops@parity.io>" --description "Ethereum network client by Parity Technologies" -C /install/
|
||||
cp "parity-"$VER"-1."$ARC".rpm" "parity_"$VER"_"$IDENT"_"$ARC".rpm"
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC".rpm" > "parity_"$VER"_"$IDENT"_"$ARC".rpm.md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC".rpm" > "parity_"$VER"_"$IDENT"_"$ARC".rpm.sha256"
|
||||
}
|
||||
make_pkg () {
|
||||
echo "__________Make OSX PKG__________"
|
||||
cp target/$PLATFORM/release/parity target/release/parity
|
||||
cp target/$PLATFORM/release/parity-evm target/release/parity-evm
|
||||
cp target/$PLATFORM/release/ethstore target/release/ethstore
|
||||
cp target/$PLATFORM/release/ethkey target/release/ethkey
|
||||
cd mac
|
||||
xcodebuild -configuration Release
|
||||
cd ..
|
||||
packagesbuild -v mac/Parity.pkgproj
|
||||
productsign --sign 'Developer ID Installer: PARITY TECHNOLOGIES LIMITED (P2PX3JU8FT)' target/release/Parity\ Ethereum.pkg target/release/Parity\ Ethereum-signed.pkg
|
||||
mv target/release/Parity\ Ethereum-signed.pkg "parity_"$VER"_"$IDENT"_"$ARC".pkg"
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT >> "parity_"$VER"_"$IDENT"_"$ARC".pkg.md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT >> "parity_"$VER"_"$IDENT"_"$ARC".pkg.sha256"
|
||||
echo "Parity file SHA3: $SHA3"
|
||||
$SHA256_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.sha256
|
||||
$SHA256_BIN target/$PLATFORM/release/parity-evm$S3WIN > parity-evm$S3WIN.sha256
|
||||
$SHA256_BIN target/$PLATFORM/release/ethstore$S3WIN > ethstore$S3WIN.sha256
|
||||
$SHA256_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.sha256
|
||||
$SHA256_BIN target/$PLATFORM/release/whisper$S3WIN > whisper$S3WIN.sha256
|
||||
}
|
||||
sign_exe () {
|
||||
if [[ -z "$protect" ]]; then echo "__________Skipping sign binaries__________"&&return; fi
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe"
|
||||
<<<<<<< HEAD:scripts/gitlab/build.sh
|
||||
./sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe
|
||||
}
|
||||
make_exe () {
|
||||
@@ -164,6 +94,12 @@ make_exe () {
|
||||
./sign.cmd $keyfile $certpass "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"
|
||||
=======
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity-evm.exe"
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/ethstore.exe"
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/ethkey.exe"
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/whisper.exe"
|
||||
>>>>>>> master:scripts/gitlab-build.sh
|
||||
}
|
||||
push_snap () {
|
||||
if [[ -z "$protect" ]]; then echo "__________Skipping push and release snap__________"&&return; fi
|
||||
@@ -232,7 +168,7 @@ push_binaries () {
|
||||
echo "__________Push binaries to AWS S3__________"
|
||||
aws configure set aws_access_key_id $s3_key
|
||||
aws configure set aws_secret_access_key $s3_secret
|
||||
if [[ "$CI_BUILD_REF_NAME" = "master" || "$CI_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "nightly" ]];
|
||||
if [[ "$CI_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "nightly" ]];
|
||||
then
|
||||
export S3_BUCKET=builds-parity-published;
|
||||
else
|
||||
@@ -240,35 +176,21 @@ push_binaries () {
|
||||
fi
|
||||
aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/$BUILD_PLATFORM
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN --body target/$PLATFORM/release/parity$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN.md5 --body parity$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN.sha256 --body parity$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN --body target/$PLATFORM/release/parity-evm$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN.md5 --body parity-evm$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN.sha256 --body parity-evm$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN --body target/$PLATFORM/release/ethstore$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN.md5 --body ethstore$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN.sha256 --body ethstore$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN --body target/$PLATFORM/release/ethkey$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.md5 --body ethkey$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.sha256 --body ethkey$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN --body target/$PLATFORM/release/whisper$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN.sha256 --body whisper$S3WIN.sha256
|
||||
}
|
||||
prepare_artifacts () {
|
||||
echo "__________Copy all artifacts to one place__________"
|
||||
rm -rf artifacts
|
||||
mkdir -p artifacts
|
||||
cp target/$PLATFORM/release/parity$S3WIN artifacts
|
||||
cp target/$PLATFORM/release/parity-evm$S3WIN artifacts
|
||||
cp target/$PLATFORM/release/ethstore$S3WIN artifacts
|
||||
cp target/$PLATFORM/release/ethkey$S3WIN parity$S3WIN.md5 artifacts
|
||||
cp parity-evm$S3WIN.md5 ethstore$S3WIN.md5 artifacts
|
||||
cp ethkey$S3WIN.md5 artifacts
|
||||
cp parity$S3WIN.sha256 artifacts
|
||||
cp parity-evm$S3WIN.sha256 artifacts
|
||||
cp ethstore$S3WIN.sha256 artifacts
|
||||
cp ethkey$S3WIN.sha256 artifacts
|
||||
|
||||
make_archive () {
|
||||
echo "add artifacts to archive"
|
||||
rm -rf parity.zip
|
||||
zip -r parity.zip target/$PLATFORM/release/parity$S3WIN target/$PLATFORM/release/parity-evm$S3WIN target/$PLATFORM/release/ethstore$S3WIN target/$PLATFORM/release/ethkey$S3WIN target/$PLATFORM/release/whisper$S3WIN parity$S3WIN.sha256 parity-evm$S3WIN.sha256 ethstore$S3WIN.sha256 ethkey$S3WIN.sha256 whisper$S3WIN.sha256
|
||||
}
|
||||
updater_push_release () {
|
||||
echo "__________Build comlete__________"
|
||||
@@ -294,75 +216,93 @@ case $BUILD_PLATFORM in
|
||||
#set strip bin
|
||||
STRIP_BIN="strip"
|
||||
#package extention
|
||||
EXT="deb"
|
||||
build_and_push
|
||||
;;
|
||||
x86_64-unknown-debian-gnu)
|
||||
STRIP_BIN="strip"
|
||||
EXT="deb"
|
||||
LIBSSL="libssl1.1 (>=1.1.0)"
|
||||
echo "__________Use libssl1.1 (>=1.1.0) for Debian builds__________"
|
||||
build_and_push
|
||||
;;
|
||||
x86_64-unknown-centos-gnu)
|
||||
STRIP_BIN="strip"
|
||||
EXT="rpm"
|
||||
build
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_rpm
|
||||
prepare_artifacts
|
||||
make_archive
|
||||
push_binaries
|
||||
updater_push_release
|
||||
;;
|
||||
i686-unknown-linux-gnu)
|
||||
STRIP_BIN="strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
<<<<<<< HEAD:scripts/gitlab/build.sh
|
||||
build_and_push
|
||||
=======
|
||||
build
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_archive
|
||||
push_binaries
|
||||
>>>>>>> master:scripts/gitlab-build.sh
|
||||
;;
|
||||
armv7-unknown-linux-gnueabihf)
|
||||
STRIP_BIN="arm-linux-gnueabihf-strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build_and_push
|
||||
build
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_archive
|
||||
push_binaries
|
||||
;;
|
||||
arm-unknown-linux-gnueabihf)
|
||||
STRIP_BIN="arm-linux-gnueabihf-strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build_and_push
|
||||
build
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_archive
|
||||
push_binaries
|
||||
;;
|
||||
aarch64-unknown-linux-gnu)
|
||||
STRIP_BIN="aarch64-linux-gnu-strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build_and_push
|
||||
build
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_archive
|
||||
push_binaries
|
||||
;;
|
||||
x86_64-apple-darwin)
|
||||
STRIP_BIN="strip"
|
||||
PLATFORM="x86_64-apple-darwin"
|
||||
EXT="pkg"
|
||||
build
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_pkg
|
||||
prepare_artifacts
|
||||
make_archive
|
||||
push_binaries
|
||||
updater_push_release
|
||||
;;
|
||||
x86_64-unknown-snap-gnu)
|
||||
make_snap
|
||||
;;
|
||||
i686-unknown-snap-gnu)
|
||||
set_env
|
||||
make_snap
|
||||
;;
|
||||
arm64-unknown-snap-gnu)
|
||||
make_snap
|
||||
;;
|
||||
armhf-unknown-snap-gnu)
|
||||
make_snap
|
||||
ARC="amd64"
|
||||
EXT="snap"
|
||||
apt update
|
||||
apt install -y expect zip rhash
|
||||
snapcraft clean
|
||||
echo "Prepare snapcraft.yaml for build on Gitlab CI in Docker image"
|
||||
sed -i 's/git/'"$VER"'/g' snap/snapcraft.yaml
|
||||
if [[ "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "beta" || "$VER" == *1.11* || "$VER" == *2.0* ]];
|
||||
then
|
||||
sed -i -e 's/grade: devel/grade: stable/' snap/snapcraft.yaml;
|
||||
fi
|
||||
mv -f snap/snapcraft.yaml snapcraft.yaml
|
||||
snapcraft -d
|
||||
snapcraft_login=$(expect -c "
|
||||
spawn snapcraft login
|
||||
expect \"Email:\"
|
||||
send \"$SNAP_EMAIL\n\"
|
||||
expect \"Password:\"
|
||||
send \"$SNAP_PASS\n\"
|
||||
expect \"\$\"
|
||||
")
|
||||
echo "$snapcraft_login"
|
||||
snapcraft push "parity_"$VER"_amd64.snap"
|
||||
snapcraft status parity
|
||||
snapcraft logout
|
||||
$SHA256_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.sha256"
|
||||
echo "add artifacts to archive"
|
||||
rm -rf parity.zip
|
||||
zip -r parity.zip "parity_"$VER"_amd64.snap" "parity_"$VER"_amd64.snap.sha256"
|
||||
;;
|
||||
x86_64-pc-windows-msvc)
|
||||
set_env_win
|
||||
@@ -371,8 +311,7 @@ case $BUILD_PLATFORM in
|
||||
build
|
||||
sign_exe
|
||||
calculate_checksums
|
||||
make_exe
|
||||
prepare_artifacts
|
||||
make_archive
|
||||
push_binaries
|
||||
updater_push_release
|
||||
esac
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
FILE=./.git/hooks/pre-push
|
||||
|
||||
echo "#!/bin/sh\n" > $FILE
|
||||
|
||||
6
scripts/remove_duplicate_empty_lines.sh
Executable file
6
scripts/remove_duplicate_empty_lines.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
for f in $(find . -name '*.rs'); do
|
||||
cat -s $f > $f.temp
|
||||
mv $f.temp $f
|
||||
done
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
@@ -17,4 +17,3 @@ else
|
||||
echo 'Unable to push info to updater service.';
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
ERR=0
|
||||
cargo build --release -p chainspec
|
||||
@@ -12,4 +12,3 @@ for spec in ethcore/res/ethereum/*.json; do
|
||||
done
|
||||
|
||||
exit $ERR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user