diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c8fe4e87..4c5baea3a 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 @@ -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: diff --git a/scripts/aura-test.sh b/scripts/aura-test.sh index bccd3ce6c..1cd6bf536 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-build.sh b/scripts/gitlab-build.sh index 600f2b39a..14742ab64 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" @@ -306,16 +306,34 @@ case $BUILD_PLATFORM in updater_push_release ;; x86_64-unknown-snap-gnu) - cd snap ARC="amd64" EXT="snap" - rm -rf *snap - sed -i 's/master/'"$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 + 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 + 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 diff --git a/scripts/gitlab-test.sh b/scripts/gitlab-test.sh index a4e633ea2..beafdfdf8 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -18,9 +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" ]]; - 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 diff --git a/scripts/snapcraft.yaml b/scripts/snapcraft.yaml deleted file mode 100644 index 3f4cf80ea..000000000 --- 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]