Backports for stable 2.0.7 (#9648)
* parity-version: bump stable to 2.0.7 * HF in POA Sokol (2018-09-19) (#9607) https://github.com/poanetwork/poa-chain-spec/pull/86 * fix failing node-table tests on mac os, closes #9632 (#9633) * fix(light_fetch): avoid race with BlockNumber::Latest (#9665) * CI: Remove unnecessary pipes (#9681) * ci: reduce gitlab pipelines significantly * ci: build pipeline for PR * ci: remove dead weight * ci: remove github release script * ci: remove forever broken aura tests * ci: add random stuff to the end of the pipes * ci: add wind and mac to the end of the pipe * ci: remove snap artifacts * ci: (re)move dockerfiles * ci: clarify job names * ci: add cargo audit job * ci: make audit script executable * ci: ignore snap and docker files for rust check * ci: simplify audit script * ci: rename misc to optional * ci: add publish script to releaseable branches * ci: more verbose cp command for windows build * ci: fix weird binary checksum logic in push script * ci: fix regex in push script for windows * ci: simplify gitlab caching * docs: align README with ci changes * ci: specify default cargo target dir * ci: print verbose environment * ci: proper naming of scripts * ci: restore docker files * ci: use docker hub file * ci: use cargo home instead of cargo target dir * ci: touch random rust file to trigger real builds * ci: set cargo target dir for audit script * ci: remove temp file * ci: don't export the cargo target dir in the audit script * ci: fix windows unbound variable * docs: fix gitlab badge path * rename deprecated gitlab ci variables https://docs.gitlab.com/ee/ci/variables/#9-0-renaming * ci: fix git compare for nightly builds * test: skip c++ example for all platforms but linux * ci: add random rust file to trigger tests * ci: remove random rust file * disable cpp lib test for mac, win and beta (#9686) * cleanup ci merge * parity: bump clib * ci: fix tests * ci: disable c++ example * Docker: run as parity user (#9689) * CI: Skip docs job for nightly (#9693) * ci: force-tag wiki changes * ci: force-tag wiki changes * ci: skip docs job for master and nightly * ci: revert docs job checking for nightly tag * ci: exclude docs job from nightly builds in gitlab script * fix (light/provider) : Make `read_only executions` read-only (#9591) * `ExecutionsRequest` from light-clients as read-only This changes so all `ExecutionRequests` from light-clients are executed as read-only which the `virtual``flag == true ensures. This boost up the current transaction to always succeed Note, this only affects `eth_estimateGas` and `eth_call` AFAIK. * grumbles(revert renaming) : TransactionProof * grumbles(trace) : remove incorrect trace * grumbles(state/prove_tx) : explicit `virt` Remove the boolean flag to determine that a `state::prove_transaction` whether it should be executed in a virtual context or not. Because of that also rename the function to `state::prove_transction_virtual` to make more clear * ethcore: fix detection of major import (#9552) * sync: set state to idle after sync is completed * sync: refactor sync reset * parity: revert clib bump and fix tests * Fix path to parity.h (#9274) * Fix path to parity.h * Fix other paths as well * ethcore-io retries failed work steal (#9651) * ethcore-io uses newer version of crossbeam && retries failed work steal * ethcore-io non-mio service uses newer crossbeam
This commit is contained in:
46
scripts/gitlab/build-unix.sh
Executable file
46
scripts/gitlab/build-unix.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
echo "__________Show ENVIROMENT__________"
|
||||
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
|
||||
echo "CARGO_HOME: " $CARGO_HOME
|
||||
echo "BUILD_TARGET: " $BUILD_TARGET
|
||||
echo "BUILD_ARCH: " $BUILD_ARCH
|
||||
echo "CARGO_TARGET: " $CARGO_TARGET
|
||||
echo "CC: " $CC
|
||||
echo "CXX: " $CXX
|
||||
|
||||
echo "__________CARGO CONFIG__________"
|
||||
mkdir -p .cargo
|
||||
rm -f .cargo/config
|
||||
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
|
||||
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
||||
|
||||
echo "_____ Post-processing binaries _____"
|
||||
rm -rf artifacts
|
||||
mkdir -p artifacts
|
||||
cd artifacts
|
||||
mkdir -p $CARGO_TARGET
|
||||
cd $CARGO_TARGET
|
||||
cp ../../target/$CARGO_TARGET/release/parity ./parity
|
||||
cp ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
|
||||
cp ../../target/$CARGO_TARGET/release/ethstore ./ethstore
|
||||
cp ../../target/$CARGO_TARGET/release/ethkey ./ethkey
|
||||
cp ../../target/$CARGO_TARGET/release/whisper ./whisper
|
||||
strip -v ./*
|
||||
echo "_____ Calculating checksums _____"
|
||||
for binary in $(ls)
|
||||
do
|
||||
rhash --sha256 $binary -o $binary.sha256
|
||||
./parity tools hash $binary > $binary.sha3
|
||||
done
|
||||
50
scripts/gitlab/build-windows.sh
Executable file
50
scripts/gitlab/build-windows.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/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"
|
||||
|
||||
rustup default stable-x86_64-pc-windows-msvc
|
||||
|
||||
echo "__________Show ENVIROMENT__________"
|
||||
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
|
||||
echo "CARGO_HOME: " $CARGO_HOME
|
||||
echo "BUILD_TARGET: " $BUILD_TARGET
|
||||
echo "BUILD_ARCH: " $BUILD_ARCH
|
||||
echo "CARGO_TARGET: " $CARGO_TARGET
|
||||
|
||||
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
|
||||
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
||||
|
||||
echo "__________Sign binaries__________"
|
||||
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
|
||||
scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe
|
||||
|
||||
echo "_____ Post-processing binaries _____"
|
||||
rm -rf artifacts
|
||||
mkdir -p artifacts
|
||||
cd artifacts
|
||||
mkdir -p $CARGO_TARGET
|
||||
cd $CARGO_TARGET
|
||||
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
|
||||
cp --verbose ../../target/$CARGO_TARGET/release/whisper.exe ./whisper.exe
|
||||
|
||||
echo "_____ Calculating checksums _____"
|
||||
for binary in $(ls)
|
||||
do
|
||||
rhash --sha256 $binary -o $binary.sha256
|
||||
./parity.exe tools hash $binary > $binary.sha3
|
||||
done
|
||||
cp parity.exe.sha256 parity.sha256
|
||||
cp parity.exe.sha3 parity.sha3
|
||||
7
scripts/gitlab/cargo-audit.sh
Executable file
7
scripts/gitlab/cargo-audit.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
CARGO_TARGET_DIR=./target cargo +stable install cargo-audit
|
||||
cargo +stable audit
|
||||
63
scripts/gitlab/docs-jsonrpc.sh
Executable file
63
scripts/gitlab/docs-jsonrpc.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
clone_repos() {
|
||||
echo "__________Clone repos__________"
|
||||
git clone https://github.com/parity-js/jsonrpc.git jsonrpc
|
||||
git clone https://github.com/paritytech/wiki.git wiki
|
||||
}
|
||||
|
||||
build_docs() {
|
||||
echo "__________Build docs__________"
|
||||
npm install
|
||||
npm run build:markdown
|
||||
}
|
||||
|
||||
update_wiki_docs() {
|
||||
echo "__________Update WIKI docs__________"
|
||||
for file in $(ls jsonrpc/docs); do
|
||||
module_name=${file:0:-3}
|
||||
mv jsonrpc/docs/$file wiki/JSONRPC-$module_name-module.md
|
||||
done
|
||||
}
|
||||
|
||||
setup_git() {
|
||||
echo "__________Set github__________"
|
||||
git config user.email "devops@parity.com"
|
||||
git config user.name "Devops Parity"
|
||||
}
|
||||
|
||||
set_remote_wiki() {
|
||||
git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/wiki.git"
|
||||
}
|
||||
|
||||
commit_files() {
|
||||
echo "__________Commit files__________"
|
||||
git checkout -b rpcdoc-update-${CI_COMMIT_REF_NAME}
|
||||
git add .
|
||||
git commit -m "Update docs to ${CI_COMMIT_REF_NAME}"
|
||||
git tag -a "${CI_COMMIT_REF_NAME}" -m "Update RPC docs to ${CI_COMMIT_REF_NAME}"
|
||||
}
|
||||
|
||||
upload_files() {
|
||||
echo "__________Upload files__________"
|
||||
git push origin HEAD
|
||||
git push --tags
|
||||
}
|
||||
|
||||
RPC_TRAITS_DIR="rpc/src/v1/traits"
|
||||
|
||||
setup_git
|
||||
clone_repos
|
||||
mkdir -p "jsonrpc/.parity/$RPC_TRAITS_DIR"
|
||||
cp $RPC_TRAITS_DIR/*.rs "jsonrpc/.parity/$RPC_TRAITS_DIR"
|
||||
cd jsonrpc
|
||||
build_docs
|
||||
cd ..
|
||||
update_wiki_docs
|
||||
cd wiki
|
||||
set_remote_wiki
|
||||
commit_files
|
||||
upload_files
|
||||
49
scripts/gitlab/publish-awss3.sh
Executable file
49
scripts/gitlab/publish-awss3.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
echo "__________Register Release__________"
|
||||
DATA="secret=$RELEASES_SECRET"
|
||||
|
||||
echo "Pushing release to Mainnet"
|
||||
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA"
|
||||
|
||||
echo "Pushing release to Kovan"
|
||||
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA"
|
||||
|
||||
cd artifacts
|
||||
ls -l | sort -k9
|
||||
filetest=( * )
|
||||
echo ${filetest[*]}
|
||||
for DIR in "${filetest[@]}";
|
||||
do
|
||||
cd $DIR
|
||||
if [[ $DIR =~ "windows" ]];
|
||||
then
|
||||
WIN=".exe";
|
||||
else
|
||||
WIN="";
|
||||
fi
|
||||
sha3=$(cat parity.sha3 | awk '{print $1}')
|
||||
case $DIR in
|
||||
x86_64* )
|
||||
DATA="commit=$CI_COMMIT_SHA&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
|
||||
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_COMMIT_REF_NAME/$DIR"
|
||||
# Kovan
|
||||
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_COMMIT_REF_NAME/$DIR"
|
||||
;;
|
||||
esac
|
||||
cd ..
|
||||
done
|
||||
|
||||
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_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" || "$CI_COMMIT_REF_NAME" = "nightly" ]];
|
||||
then
|
||||
export S3_BUCKET=builds-parity-published;
|
||||
else
|
||||
export S3_BUCKET=builds-parity;
|
||||
fi
|
||||
aws s3 sync ./ s3://$S3_BUCKET/$CI_COMMIT_REF_NAME/
|
||||
22
scripts/gitlab/publish-docker.sh
Executable file
22
scripts/gitlab/publish-docker.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
##ARGUMENTS: 1. Docker target
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
if [ "$CI_COMMIT_REF_NAME" == "master" ];
|
||||
then export DOCKER_BUILD_TAG="latest";
|
||||
else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME;
|
||||
fi
|
||||
docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
|
||||
|
||||
echo "__________Docker TAG__________"
|
||||
echo $DOCKER_BUILD_TAG
|
||||
|
||||
echo "__________Docker target__________"
|
||||
export DOCKER_TARGET=$1
|
||||
echo $DOCKER_TARGET
|
||||
|
||||
echo "__________Docker build and push__________"
|
||||
docker build --build-arg TARGET=$DOCKER_TARGET --no-cache=true --tag parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG -f scripts/docker/hub/Dockerfile .
|
||||
docker push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG
|
||||
docker logout
|
||||
19
scripts/gitlab/safe-curl.sh
Executable file
19
scripts/gitlab/safe-curl.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
DATA=$1
|
||||
ADDRESS=$2
|
||||
|
||||
CODE=$(curl -o out.txt -w '%{http_code}' --data $DATA $ADDRESS)
|
||||
cat out.txt && rm out.txt
|
||||
echo "\n"
|
||||
|
||||
if [[ $CODE -eq 200 ]]; then
|
||||
echo 'Pushed to updater service.';
|
||||
elif [[ $CODE -eq 202 ]]; then
|
||||
echo 'Updater service ignored request.';
|
||||
else
|
||||
echo 'Unable to push info to updater service.';
|
||||
exit 2
|
||||
fi
|
||||
1
scripts/gitlab/sign-win.cmd
Executable file
1
scripts/gitlab/sign-win.cmd
Executable file
@@ -0,0 +1 @@
|
||||
@signtool sign /f %1 /p %2 /tr http://timestamp.comodoca.com /du https://parity.io %3
|
||||
35
scripts/gitlab/test-all.sh
Executable file
35
scripts/gitlab/test-all.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# ARGUMENT $1 Rust flavor to test with (stable/beta/nightly)
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
git log --graph --oneline --all --decorate=short -n 10
|
||||
|
||||
case $CI_COMMIT_REF_NAME in
|
||||
(beta|stable)
|
||||
export GIT_COMPARE=$CI_COMMIT_REF_NAME~
|
||||
;;
|
||||
(master|nightly)
|
||||
export GIT_COMPARE=master~
|
||||
;;
|
||||
(*)
|
||||
export GIT_COMPARE=master
|
||||
;;
|
||||
esac
|
||||
|
||||
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^CHANGELOG.md -e ^test.sh -e ^scripts/ -e ^docs/ -e ^docker/ -e ^snap/ | wc -l | tr -d ' ')"
|
||||
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
|
||||
|
||||
if [ "${RUST_FILES_MODIFIED}" = "0" ]
|
||||
then
|
||||
echo "__________Skipping Rust tests since no Rust files modified__________";
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rustup default $1
|
||||
|
||||
git submodule update --init --recursive
|
||||
rustup show
|
||||
|
||||
exec ./test.sh
|
||||
Reference in New Issue
Block a user