From cda38941b402926b3129ef979efb95456da04fe4 Mon Sep 17 00:00:00 2001 From: 5chdn <5chdn@users.noreply.github.com> Date: Tue, 13 Feb 2018 22:06:32 +0100 Subject: [PATCH 01/11] Fix snapcraft nightly --- scripts/gitlab-build.sh | 2 +- scripts/snapcraft.yaml | 22 ---------------------- snap/snapcraft.yaml | 4 ++-- 3 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 scripts/snapcraft.yaml diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index 600f2b39a0b..a12347593ec 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -310,7 +310,7 @@ case $BUILD_PLATFORM in ARC="amd64" EXT="snap" rm -rf *snap - sed -i 's/master/'"$VER"'/g' snapcraft.yaml + sed -i 's/git/'"$VER"'/g' snapcraft.yaml snapcraft cp "parity_"$CI_BUILD_REF_NAME"_amd64.snap" "parity_"$VER"_amd64.snap" $MD5_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" diff --git a/scripts/snapcraft.yaml b/scripts/snapcraft.yaml deleted file mode 100644 index 3f4cf80ea5e..00000000000 --- a/scripts/snapcraft.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: parity -version: master -summary: Fast, light, robust Ethereum implementation -description: | - Parity's goal is to be the fastest, lightest, and most secure Ethereum - client. We are developing Parity using the sophisticated and cutting-edge - Rust programming language. Parity is licensed under the GPLv3, and can be - used for all your Ethereum needs. - -grade: devel -confinement: strict - -apps: - parity: - command: parity - plugs: [network, network-bind] - -parts: - parity: - source: . - plugin: rust - build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config] diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c0ca5507bec..4cf423f2612 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -16,11 +16,11 @@ apps: plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland] desktop: usr/share/applications/parity.desktop -icon: snap/gui/icon.png +icon: ./gui/icon.png parts: desktop-icon: - source: ./snap + source: ../snap plugin: nil prepare: | mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications From ee52302eb99041eab4054d78421134c6bf750d8d Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 02:39:29 +0300 Subject: [PATCH 02/11] Update gitlab-build.sh --- scripts/gitlab-build.sh | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index a12347593ec..b1c9355f753 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -306,16 +306,33 @@ case $BUILD_PLATFORM in updater_push_release ;; x86_64-unknown-snap-gnu) - cd snap ARC="amd64" EXT="snap" - rm -rf *snap - sed -i 's/git/'"$VER"'/g' snapcraft.yaml - snapcraft - cp "parity_"$CI_BUILD_REF_NAME"_amd64.snap" "parity_"$VER"_amd64.snap" - $MD5_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" - $SHA256_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.sha256" - push_binaries + 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" || "$VER" == *1.8* ]]; + 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 + md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5" + echo "add artifacts to archive" + rm -rf parity.zip + zip -r parity.zip "parity_"$VER"_amd64.snap" "parity_"$VER"_amd64.snap.md5" ;; x86_64-pc-windows-msvc) set_env_win From fb3b54367238757220ce511cea59ab93a5a31a62 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 02:40:46 +0300 Subject: [PATCH 03/11] Update snapcraft.yaml --- snap/snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 4cf423f2612..c0ca5507bec 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -16,11 +16,11 @@ apps: plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland] desktop: usr/share/applications/parity.desktop -icon: ./gui/icon.png +icon: snap/gui/icon.png parts: desktop-icon: - source: ../snap + source: ./snap plugin: nil prepare: | mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications From f564d6f806a1fe96de5d83cdd83e3c7d8409d888 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 03:46:57 +0300 Subject: [PATCH 04/11] Update gitlab-build.sh --- scripts/gitlab-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index b1c9355f753..412bd7b5b9a 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -308,6 +308,7 @@ case $BUILD_PLATFORM in 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 From fe72a3215888bc62d63af0abbf6debb79fd3474d Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 03:56:54 +0300 Subject: [PATCH 05/11] Update .gitlab-ci.yml snap build switch to https://hub.docker.com/r/snapcore/snapcraft/ --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c8fe4e8707..599e4164b52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,7 @@ linux-aarch64: name: "aarch64-unknown-linux-gnu_parity" linux-snap: stage: build - image: parity/snapcraft:gitlab-ci + image: snapcore/snapcraft:stable only: - stable - beta From 623d75d276bb5cd500cc4282417970ab85812ae7 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 04:13:04 +0300 Subject: [PATCH 06/11] skip aura-test.sh https://github.com/paritytech/parity/pull/6078 --- scripts/gitlab-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gitlab-test.sh b/scripts/gitlab-test.sh index a4e633ea2cd..0afec4e57e2 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -18,9 +18,9 @@ rust_test () { then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh || exit $?; fi - if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; - then sh scripts/aura-test.sh || exit $?; - fi +# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; +# then sh scripts/aura-test.sh || exit $?; +# fi } coverage_test () { git submodule update --init --recursive From 1024b4bcfd3d6284f5425283b41a85549acc8c32 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Wed, 14 Feb 2018 04:59:42 +0300 Subject: [PATCH 07/11] add snap artifacts --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 599e4164b52..4c5baea3ab0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,7 +142,7 @@ linux-snap: - rust-stable artifacts: paths: - - scripts/parity_*_amd64.snap + - parity.zip name: "stable-x86_64-unknown-snap-gnu_parity" allow_failure: true darwin: From 43ffaf21fdc3786d75a092f5ead5f03d0d99b061 Mon Sep 17 00:00:00 2001 From: 5chdn <5chdn@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:26:46 +0100 Subject: [PATCH 08/11] Fix aura tests --- scripts/aura-test.sh | 4 ++-- scripts/gitlab-test.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/aura-test.sh b/scripts/aura-test.sh index bccd3ce6c7d..1cd6bf53687 100755 --- a/scripts/aura-test.sh +++ b/scripts/aura-test.sh @@ -7,6 +7,6 @@ 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-test.sh b/scripts/gitlab-test.sh index 0afec4e57e2..a4e633ea2cd 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -18,9 +18,9 @@ rust_test () { then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh || exit $?; fi -# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; -# then sh scripts/aura-test.sh || exit $?; -# fi + if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; + then sh scripts/aura-test.sh || exit $?; + fi } coverage_test () { git submodule update --init --recursive From 626090f762f422eca4c283668719d9cd2062dc48 Mon Sep 17 00:00:00 2001 From: 5chdn <5chdn@users.noreply.github.com> Date: Wed, 14 Feb 2018 09:29:24 +0100 Subject: [PATCH 09/11] Fix macos build --- scripts/gitlab-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index 412bd7b5b9a..14742ab6448 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -150,9 +150,9 @@ 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" - $MD5_BIN "parity_"$VER"_"$ARC"."$EXT >> "parity_"$VER"_"$ARC".pkg.md5" - $SHA256_BIN "parity_"$VER"_"$ARC"."$EXT >> "parity_"$VER"_"$ARC".pkg.sha256" + 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" } sign_exe () { ./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe" From 42a2fdcdd81c58554325bcde6332681594adc716 Mon Sep 17 00:00:00 2001 From: 5chdn <5chdn@users.noreply.github.com> Date: Wed, 14 Feb 2018 09:31:05 +0100 Subject: [PATCH 10/11] Allow aura test to fail --- scripts/gitlab-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gitlab-test.sh b/scripts/gitlab-test.sh index a4e633ea2cd..5307edf7089 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -19,7 +19,8 @@ rust_test () { else ./test.sh || exit $?; fi if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; - then sh scripts/aura-test.sh || exit $?; + ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3 + then sh scripts/aura-test.sh; # || exit $?; fi } coverage_test () { From 8fb00fa11895720af2b551c380feb18b6585d0d1 Mon Sep 17 00:00:00 2001 From: 5chdn <5chdn@users.noreply.github.com> Date: Wed, 14 Feb 2018 10:03:56 +0100 Subject: [PATCH 11/11] Disable aura tests --- scripts/gitlab-test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/gitlab-test.sh b/scripts/gitlab-test.sh index 5307edf7089..beafdfdf8de 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -18,10 +18,10 @@ rust_test () { 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 + # 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