Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix snapcraft nightly (#7884)
Browse files Browse the repository at this point in the history
* Fix snapcraft nightly

* Update gitlab-build.sh

* Update snapcraft.yaml

* Update gitlab-build.sh

* Update .gitlab-ci.yml

snap build switch to https://hub.docker.com/r/snapcore/snapcraft/

* skip aura-test.sh

#6078

* add snap artifacts

* Fix aura tests

* Fix macos build

* Allow aura test to fail

* Disable aura tests
  • Loading branch information
5chdn authored Feb 14, 2018
1 parent bf57eb8 commit 1cce3cf
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions scripts/aura-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
40 changes: 29 additions & 11 deletions scripts/gitlab-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions scripts/gitlab-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 0 additions & 22 deletions scripts/snapcraft.yaml

This file was deleted.

0 comments on commit 1cce3cf

Please sign in to comment.