diff --git a/.editorconfig b/.editorconfig index 28b11218608..e47fd12f0cd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ trim_trailing_whitespace=true max_line_length=120 insert_final_newline=true -[.travis.yml] +[*.{yml,sh}] indent_style=space indent_size=2 tab_width=8 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab6a4a2abe7..7c32b97f695 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,14 +18,14 @@ linux-stable: stage: build image: parity/rust:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - rustup default stable - # ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags - - scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++ + # ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier + - scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++ ubuntu tags: - rust-stable artifacts: @@ -36,13 +36,13 @@ linux-stable-debian: stage: build image: parity/rust-debian:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - export LIBSSL="libssl1.1 (>=1.1.0)" - - scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++ + - scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++ debian tags: - rust-debian artifacts: @@ -53,12 +53,12 @@ linux-centos: stage: build image: parity/rust-centos:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - - scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++ + - scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++ centos tags: - rust-centos artifacts: @@ -69,12 +69,12 @@ linux-i686: stage: build image: parity/rust-i686:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - - scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ + - scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ ubuntu tags: - rust-i686 artifacts: @@ -85,12 +85,12 @@ linux-armv7: stage: build image: parity/rust-armv7:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - - scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ + - scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu tags: - rust-arm artifacts: @@ -101,12 +101,12 @@ linux-arm: stage: build image: parity/rust-arm:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - - scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ + - scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu tags: - rust-arm artifacts: @@ -117,12 +117,12 @@ linux-aarch64: stage: build image: parity/rust-arm64:gitlab-ci only: - - stable - beta - tags + - stable - triggers script: - - scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ + - scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ ubuntu tags: - rust-arm artifacts: @@ -131,30 +131,30 @@ linux-aarch64: name: "aarch64-unknown-linux-gnu_parity" linux-snap: stage: build - image: parity/snapcraft:gitlab-ci + image: snapcore/snapcraft:stable only: - stable - beta - tags - triggers script: - - scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++ + - scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++ snap tags: - rust-stable artifacts: paths: - - snap/parity.zip + - parity.zip name: "stable-x86_64-unknown-snap-gnu_parity" allow_failure: true darwin: stage: build only: - - stable - beta - tags + - stable - triggers script: - - scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ + - scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ macos tags: - osx artifacts: @@ -167,12 +167,12 @@ windows: untracked: true stage: build only: - - stable - beta - tags + - stable - triggers script: - - sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" "" + - sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" windows tags: - rust-windows artifacts: @@ -182,14 +182,12 @@ windows: docker-build: stage: build only: - - stable - - beta - tags - triggers before_script: - docker info script: - - DOCKER_TAG=$CI_BUILD_REF_NAME + - if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi - echo "Tag:" $DOCKER_TAG - docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity - scripts/docker-build.sh $DOCKER_TAG @@ -262,8 +260,6 @@ push-release: - triggers image: parity/rust:gitlab-ci script: - - rustup default stable - - curl --data "secret=$RELEASES_SECRET" http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF - - curl --data "secret=$RELEASES_SECRET" http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF + - scripts/gitlab-push-release.sh tags: - curl diff --git a/Cargo.lock b/Cargo.lock index 15879432933..6d5c2e5be63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -372,7 +372,7 @@ dependencies = [ "bloomable 0.1.0", "ethcore-bigint 0.1.3", "ethcore-bytes 0.1.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethjson 0.1.0", "hash 0.1.0", "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -586,7 +586,7 @@ dependencies = [ "ethcore-ipc-nano 1.8.0", "ethcore-logger 1.8.0", "ethcore-stratum 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethjson 0.1.0", "ethkey 0.2.0", "ethstore 0.1.0", @@ -682,7 +682,7 @@ version = "1.8.0" dependencies = [ "ethcore-bigint 0.1.3", "ethcore-devtools 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)", "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -732,7 +732,7 @@ dependencies = [ "ethcore-ipc 1.8.0", "ethcore-ipc-codegen 1.8.0", "ethcore-ipc-nano 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)", "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -751,7 +751,7 @@ dependencies = [ "ethcore-ipc 1.8.0", "ethcore-ipc-codegen 1.8.0", "ethcore-network 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "evm 0.1.0", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "hash 0.1.0", @@ -803,7 +803,7 @@ dependencies = [ "ethcore-devtools 1.8.0", "ethcore-io 1.8.0", "ethcore-logger 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethcrypto 0.1.0", "ethkey 0.2.0", "hash 0.1.0", @@ -840,7 +840,7 @@ dependencies = [ "ethcore-ipc-codegen 1.8.0", "ethcore-ipc-nano 1.8.0", "ethcore-logger 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethcrypto 0.1.0", "ethkey 0.2.0", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -876,7 +876,7 @@ dependencies = [ "ethcore-ipc-codegen 1.8.0", "ethcore-ipc-nano 1.8.0", "ethcore-logger 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "hash 0.1.0", "jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)", "jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)", @@ -889,7 +889,7 @@ dependencies = [ [[package]] name = "ethcore-util" -version = "1.8.9" +version = "1.8.10" dependencies = [ "clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1024,7 +1024,7 @@ dependencies = [ "ethcore-ipc-nano 1.8.0", "ethcore-light 1.8.0", "ethcore-network 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethkey 0.2.0", "hash 0.1.0", "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1051,7 +1051,7 @@ dependencies = [ "common-types 0.1.0", "ethcore-bigint 0.1.3", "ethcore-logger 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethjson 0.1.0", "evmjit 1.8.0", "hash 0.1.0", @@ -1073,7 +1073,7 @@ dependencies = [ "ethcore 1.8.0", "ethcore-bigint 0.1.3", "ethcore-bytes 0.1.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethjson 0.1.0", "evm 0.1.0", "panic_hook 0.1.0", @@ -1371,7 +1371,7 @@ dependencies = [ "ethcore-bigint 0.1.3", "ethcore-ipc 1.8.0", "ethcore-ipc-codegen 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1882,7 +1882,7 @@ dependencies = [ "ethcore-bytes 0.1.0", "ethcore-io 1.8.0", "ethcore-network 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2081,7 +2081,7 @@ dependencies = [ [[package]] name = "parity" -version = "1.8.9" +version = "1.8.10" dependencies = [ "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2105,7 +2105,7 @@ dependencies = [ "ethcore-network 1.8.0", "ethcore-secretstore 1.0.0", "ethcore-stratum 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethkey 0.2.0", "ethsync 1.8.0", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2163,7 +2163,7 @@ dependencies = [ "ethcore-bigint 0.1.3", "ethcore-bytes 0.1.0", "ethcore-devtools 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "fetch 0.1.0", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2225,7 +2225,7 @@ dependencies = [ "ethabi 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-bigint 0.1.3", "ethcore-bytes 0.1.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "fetch 0.1.0", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "hash 0.1.0", @@ -2247,7 +2247,7 @@ dependencies = [ "ethcore 1.8.0", "ethcore-bigint 0.1.3", "ethcore-bytes 0.1.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)", "jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)", "multihash 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2261,7 +2261,7 @@ version = "0.1.0" dependencies = [ "ethcore 1.8.0", "ethcore-io 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethkey 0.2.0", "kvdb 0.1.0", "kvdb-memorydb 0.1.0", @@ -2277,7 +2277,7 @@ name = "parity-machine" version = "0.1.0" dependencies = [ "ethcore-bigint 0.1.3", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", ] [[package]] @@ -2305,7 +2305,7 @@ dependencies = [ "ethcore-light 1.8.0", "ethcore-logger 1.8.0", "ethcore-network 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethcrypto 0.1.0", "ethjson 0.1.0", "ethkey 0.2.0", @@ -2416,7 +2416,7 @@ dependencies = [ "ethcore-bytes 0.1.0", "ethcore-ipc 1.8.0", "ethcore-ipc-codegen 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethsync 1.8.0", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-common-types 1.8.0", @@ -2880,7 +2880,7 @@ name = "rpc-cli" version = "1.4.0" dependencies = [ "bigint 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rpc 1.8.0", "parity-rpc-client 1.4.0", @@ -3604,7 +3604,7 @@ dependencies = [ "common-types 0.1.0", "ethcore-bigint 0.1.3", "ethcore-bytes 0.1.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "ethjson 0.1.0", "evmjit 1.8.0", "hash 0.1.0", @@ -3626,7 +3626,7 @@ dependencies = [ "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-bigint 0.1.3", "ethcore-logger 1.8.0", - "ethcore-util 1.8.9", + "ethcore-util 1.8.10", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", diff --git a/Cargo.toml b/Cargo.toml index 7df93532c0e..7b1833e1111 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Parity Ethereum client" name = "parity" -version = "1.8.9" +version = "1.8.10" license = "GPL-3.0" authors = ["Parity Technologies "] build = "build.rs" diff --git a/mac/Parity.pkgproj b/mac/Parity.pkgproj index d52778326a0..b388c28ed3f 100755 --- a/mac/Parity.pkgproj +++ b/mac/Parity.pkgproj @@ -462,7 +462,7 @@ OVERWRITE_PERMISSIONS VERSION - 1.8.9 + 1.8.10 UUID 2DCD5B81-7BAF-4DA1-9251-6274B089FD36 diff --git a/nsis/installer.nsi b/nsis/installer.nsi index b8f9fe0ba96..0619d4ead9f 100644 --- a/nsis/installer.nsi +++ b/nsis/installer.nsi @@ -10,7 +10,7 @@ !define DESCRIPTION "Fast, light, robust Ethereum implementation" !define VERSIONMAJOR 1 !define VERSIONMINOR 8 -!define VERSIONBUILD 9 +!define VERSIONBUILD 10 !define ARGS "" !define FIRST_START_ARGS "--mode=passive ui" diff --git a/scripts/aura-test.sh b/scripts/aura-test.sh index bb152beba79..1cd6bf53687 100755 --- a/scripts/aura-test.sh +++ b/scripts/aura-test.sh @@ -1,9 +1,12 @@ #!/bin/bash +set -e # fail on any error +set -u # treat unset variables as error + cargo build -j $(nproc) --release --features final $CARGOFLAGS git clone https://github.com/paritytech/parity-import-tests cp target/release/parity parity-import-tests/aura/parity cd parity-import-tests/aura echo "Start Aura test" -parity import blocks.rlp --chain chain.json -parity restore snap --chain chain.json +./parity import blocks.rlp --chain chain.json +./parity restore snap --chain chain.json echo "Aura test complete" diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index 10edd711e22..edbf7fa302f 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -2,16 +2,18 @@ set -e # fail on any error set -u # treat unset variables as error -#ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags +#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 PLATFORM=$2 ARC=$3 CC=$4 CXX=$5 -VER="$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")" +IDENT=$6 +VER="$(grep -m 1 "version =" Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")" S3WIN="" echo "--------------------" echo "Build for platform: " $BUILD_PLATFORM +echo "Build identifier: " $IDENT echo "Cargo target: " $PLATFORM echo "CC&CXX flags: " $CC ", " $CXX echo "Architecture: " $ARC @@ -20,6 +22,14 @@ echo "Parity version: " $VER echo "Branch: " $CI_BUILD_REF_NAME echo "--------------------" +echo "Rhash version:" +# NOTE for md5 and sha256 we want to display filename as well +# hence we use --* instead of -p * +MD5_BIN="rhash --md5" +SHA256_BIN="rhash --sha256" +# NOTE For SHA3 we need only hash (hence -p) +SHA3_BIN="rhash -p %{sha3-256}" + set_env () { echo "Set ENVIROMENT" export HOST_CC=gcc @@ -50,21 +60,34 @@ build () { echo "Build ethkey-cli:" cargo build --target $PLATFORM --release -p ethkey-cli } -strip_md5 () { +strip_binaries () { echo "Strip binaries:" $STRIP_BIN -v target/$PLATFORM/release/parity $STRIP_BIN -v target/$PLATFORM/release/parity-evm $STRIP_BIN -v target/$PLATFORM/release/ethstore $STRIP_BIN -v target/$PLATFORM/release/ethkey; - export SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity -p %h) +} +calculate_checksums () { echo "Checksum calculation:" + rhash --version rm -rf *.md5 - export SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity -p %h) - echo "Parity file SHA3:" $SHA3 - md5sum target/$PLATFORM/release/parity > parity.md5 - md5sum target/$PLATFORM/release/parity-evm > parity-evm.md5 - md5sum target/$PLATFORM/release/ethstore > ethstore.md5 - md5sum target/$PLATFORM/release/ethkey > ethkey.md5 + rm -rf *.sha256 + + export SHA3="$($SHA3_BIN target/$PLATFORM/release/parity$S3WIN)" + # NOTE rhash 1.3.1 doesnt support keccak, workaround + if [ "$SHA3" == "%{sha3-256}" ]; then + export SHA3="$(target/$PLATFORM/release/parity$S3WIN tools hash target/$PLATFORM/release/parity$S3WIN)" + fi + + echo "Parity file SHA3: $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 @@ -98,8 +121,9 @@ make_deb () { 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"_"$ARC".deb" - md5sum "parity_"$VER"_"$ARC".deb" > "parity_"$VER"_"$ARC".deb.md5" + 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 @@ -108,9 +132,12 @@ make_rpm () { 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 "" --description "Ethereum network client by Parity Technologies" -C /install/ - cp "parity-"$VER"-1."$ARC".rpm" "parity_"$VER"_"$ARC".rpm" - md5sum "parity_"$VER"_"$ARC".rpm" > "parity_"$VER"_"$ARC".rpm.md5" + 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 PKG" @@ -123,19 +150,14 @@ make_pkg () { 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"_"$ARC".pkg" - md5sum "parity_"$VER"_"$ARC"."$EXT >> "parity_"$VER"_"$ARC".pkg.md5" + 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" } -make_exe () { +sign_exe () { ./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe" - SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity.exe -p %h) - echo "Checksum calculation:" - rm -rf *.md5 - echo "Parity file SHA3:" $SHA3 - rhash --md5 target/$PLATFORM/release/parity.exe -p %h > parity.exe.md5 - rhash --md5 target/$PLATFORM/release/parity-evm.exe -p %h > parity-evm.exe.md5 - rhash --md5 target/$PLATFORM/release/ethstore.exe -p %h > ethstore.exe.md5 - rhash --md5 target/$PLATFORM/release/ethkey.exe -p %h > ethkey.exe.md5 +} +make_exe () { ./msbuild.cmd ./sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe cd nsis @@ -143,9 +165,10 @@ make_exe () { echo "makensis.exe installer.nsi" > nsis.cmd ./nsis.cmd cd .. - cp nsis/installer.exe "parity_"$VER"_"$ARC"."$EXT - ./sign.cmd $keyfile $certpass "parity_"$VER"_"$ARC"."$EXT - rhash --md5 "parity_"$VER"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$ARC"."$EXT".md5" + cp nsis/installer.exe "parity_"$VER"_"$IDENT"_"$ARC"."$EXT + ./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" } push_binaries () { echo "Push binaries to AWS S3" @@ -160,25 +183,36 @@ push_binaries () { 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/"parity_"$VER"_"$ARC"."$EXT --body "parity_"$VER"_"$ARC"."$EXT - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$ARC"."$EXT".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" } 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 parity$S3WIN.md5 parity-evm$S3WIN.md5 ethstore$S3WIN.md5 ethkey$S3WIN.md5 + 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 parity$S3WIN.md5 parity-evm$S3WIN.md5 ethstore$S3WIN.md5 ethkey$S3WIN.md5 parity$S3WIN.sha256 parity-evm$S3WIN.sha256 ethstore$S3WIN.sha256 ethkey$S3WIN.sha256 } -push_release () { + +updater_push_release () { echo "push release" - curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$PLATFORM - curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$PLATFORM + + DATA="commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity$S3WIN&secret=$RELEASES_SECRET" + # Mainnet + source scripts/safe_curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$BUILD_PLATFORM" + # Kovan + source scripts/safe_curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$BUILD_PLATFORM" } + case $BUILD_PLATFORM in x86_64-unknown-linux-gnu) #set strip bin @@ -186,11 +220,12 @@ case $BUILD_PLATFORM in #package extention EXT="deb" build - strip_md5 + strip_binaries + calculate_checksums make_deb make_archive push_binaries - push_release + updater_push_release ;; x86_64-unknown-debian-gnu) STRIP_BIN="strip" @@ -198,80 +233,82 @@ case $BUILD_PLATFORM in LIBSSL="libssl1.1 (>=1.1.0)" echo "Use libssl1.1 (>=1.1.0) for Debian builds" build - strip_md5 + strip_binaries + calculate_checksums make_deb make_archive push_binaries - push_release ;; x86_64-unknown-centos-gnu) STRIP_BIN="strip" EXT="rpm" build - strip_md5 + strip_binaries + calculate_checksums make_rpm make_archive push_binaries - push_release ;; i686-unknown-linux-gnu) STRIP_BIN="strip" EXT="deb" set_env build - strip_md5 + strip_binaries + calculate_checksums make_deb make_archive push_binaries - push_release ;; armv7-unknown-linux-gnueabihf) STRIP_BIN="arm-linux-gnueabihf-strip" EXT="deb" set_env build - strip_md5 + strip_binaries + calculate_checksums make_deb make_archive push_binaries - push_release ;; arm-unknown-linux-gnueabihf) STRIP_BIN="arm-linux-gnueabihf-strip" EXT="deb" set_env build - strip_md5 + strip_binaries + calculate_checksums make_deb make_archive push_binaries - push_release ;; aarch64-unknown-linux-gnu) STRIP_BIN="aarch64-linux-gnu-strip" EXT="deb" set_env build - strip_md5 + strip_binaries + calculate_checksums make_deb make_archive push_binaries - push_release ;; x86_64-apple-darwin) STRIP_BIN="strip" PLATFORM="x86_64-apple-darwin" EXT="pkg" build - strip_md5 + strip_binaries + calculate_checksums make_pkg make_archive push_binaries - push_release + updater_push_release ;; x86_64-unknown-snap-gnu) ARC="amd64" EXT="snap" + apt install -y expect zip snapcraft clean echo "Prepare snapcraft.yaml for build on Gitlab CI in Docker image" sed -i 's/git/'"$VER"'/g' snap/snapcraft.yaml @@ -293,18 +330,21 @@ case $BUILD_PLATFORM in snapcraft push "parity_"$VER"_amd64.snap" snapcraft status parity snapcraft logout - md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" + $MD5_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" + $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.md5" + zip -r parity.zip "parity_"$VER"_amd64.snap" "parity_"$VER"_amd64.snap.md5" "parity_"$VER"_amd64.snap.sha256" ;; x86_64-pc-windows-msvc) set_env_win EXT="exe" S3WIN=".exe" build + sign_exe + calculate_checksums make_exe make_archive push_binaries - push_release + updater_push_release esac diff --git a/scripts/gitlab-push-release.sh b/scripts/gitlab-push-release.sh new file mode 100755 index 00000000000..275576b91ec --- /dev/null +++ b/scripts/gitlab-push-release.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e # fail on any error +set -u # treat unset variables as error + +DATA="secret=$RELEASES_SECRET" + +echo "Pushing release to Mainnet" +./scripts/safe_curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF" + +echo "Pushing release to Kovan" +./scripts/safe_curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF" diff --git a/scripts/gitlab-test.sh b/scripts/gitlab-test.sh index f06879b00aa..c8a6af39187 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -23,11 +23,12 @@ rust_test () { rustup show if [[ "${RUST_FILES_MODIFIED}" == "0" ]]; then echo "Skipping Rust tests since no Rust files modified."; - else ./test.sh; - fi - if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; - then sh scripts/aura-test.sh; + 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 } js_test () { git submodule update --init --recursive diff --git a/scripts/safe_curl.sh b/scripts/safe_curl.sh new file mode 100755 index 00000000000..5990d1e24b3 --- /dev/null +++ b/scripts/safe_curl.sh @@ -0,0 +1,20 @@ +#!/bin/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 + diff --git a/util/Cargo.toml b/util/Cargo.toml index 0af7e5e355f..9fa5a367112 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore utility library" homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-util" -version = "1.8.9" +version = "1.8.10" authors = ["Parity Technologies "] build = "build.rs" diff --git a/util/version/Cargo.toml b/util/version/Cargo.toml new file mode 100644 index 00000000000..078bd696456 --- /dev/null +++ b/util/version/Cargo.toml @@ -0,0 +1,35 @@ +# NOTE This file is used by the auto-updater service. +# Make sure to update the service if it's moved or the structure is changed. +[package] +name = "parity-version" +# NOTE: this value is used for Parity version string (via env CARGO_PKG_VERSION) +version = "1.8.10" +authors = ["Parity Technologies "] +build = "build.rs" + +[package.metadata] +# This versions track. Should be changed to `stable` or `beta` when on respective branches. +# Used by auto-updater and for Parity version string. +track = "stable" + +# Indicates a critical release in this track (i.e. consensus issue) +critical = false + +# Latest supported fork blocks for various networks. Used ONLY by auto-updater. +[package.metadata.forks] +foundation = 4370000 +ropsten = 10 +kovan = 5067000 + +[dependencies] +ethcore-bytes = { path = "../bytes" } +rlp = { path = "../rlp" } +target_info = "0.1" + +[build-dependencies] +vergen = "0.1" +rustc_version = "0.2.0" +toml = "0.4" + +[features] +final = []