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)
This commit is contained in:
Afri Schoedon 2018-10-02 00:03:58 +01:00 committed by GitHub
parent f3b806b471
commit 7781cbbc57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 197 additions and 575 deletions

View File

@ -1,16 +1,14 @@
stages: stages:
- test - test
- build - build
- package
- publish - publish
- docs - optional
image: parity/rust:gitlab-ci image: parity/rust:gitlab-ci
variables: variables:
CI_SERVER_NAME: "GitLab CI" CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/cargo" CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
BUILD_TARGET: ubuntu BUILD_TARGET: ubuntu
BUILD_ARCH: amd64 BUILD_ARCH: amd64
CARGO_TARGET: x86_64-unknown-linux-gnu CARGO_TARGET: x86_64-unknown-linux-gnu
@ -18,21 +16,15 @@ variables:
cache: cache:
key: "${CI_JOB_NAME}" key: "${CI_JOB_NAME}"
paths: paths:
- ${CI_PROJECT_DIR}/target/ - ./target
- ${CI_PROJECT_DIR}/cargo/ - ./.cargo
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches only: &releaseable_branches
- master
- stable - stable
- beta - beta
- tags - tags
.publishable_branches: # list of git refs for publishing builds to the "production" locations
only: &publishable_branches
- nightly # Our nightly builds from schedule, on `master`
- /^v2.*$/ # Our version tags
.collect_artifacts: &collect_artifacts .collect_artifacts: &collect_artifacts
artifacts: artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
@ -49,104 +41,16 @@ cache:
- export VERSION - export VERSION
- echo "Version = ${VERSION}" - echo "Version = ${VERSION}"
#### stage: test test-linux:
test-linux-rust-stable: &test
stage: test stage: test
variables: variables:
RUN_TESTS: "true" RUN_TESTS: all
script: script:
- scripts/gitlab/test.sh stable - scripts/gitlab/test-all.sh stable
tags: tags:
- rust-stable - rust-stable
test-linux-rust-beta: build-linux:
stage: test
variables:
RUN_TESTS: "true"
script:
- scripts/gitlab/test.sh beta
tags:
- rust-stable
allow_failure: true
test-linux-rust-nightly:
stage: test
variables:
RUN_TESTS: "true"
script:
- scripts/gitlab/test.sh nightly
tags:
- rust-stable
allow_failure: true
test-darwin-rust-stable:
stage: test
variables:
CARGO_TARGET: x86_64-apple-darwin
CC: gcc
CXX: g++
RUN_TESTS: "true"
script:
- scripts/gitlab/test.sh stable
tags:
- osx
allow_failure: true
test-android-rust-stable:
stage: test
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
script:
- scripts/gitlab/test.sh stable
tags:
- rust-arm
allow_failure: true
test-windows-rust-stable:
stage: test
cache:
key: "${CI_JOB_NAME}"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
# No cargo caching, since fetch-locking on Windows gets stuck
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
RUN_TESTS: "true"
script:
- sh scripts/gitlab/test.sh stable
tags:
- rust-windows
allow_failure: true
.optional_test: &optional_test
<<: *test
allow_failure: true
only:
- master
test-lint-rustfmt:
<<: *optional_test
script:
- scripts/gitlab/rustfmt.sh
test-lint-clippy:
<<: *optional_test
script:
- scripts/gitlab/clippy.sh
test-coverage-kcov:
<<: *optional_test
script:
- scripts/gitlab/coverage.sh
tags:
- shell
#### stage: build
build-linux-ubuntu-amd64: &build
stage: build stage: build
only: *releaseable_branches only: *releaseable_branches
variables: variables:
@ -157,49 +61,7 @@ build-linux-ubuntu-amd64: &build
tags: tags:
- rust-stable - rust-stable
build-linux-ubuntu-i386: build-darwin:
<<: *build
only: *releaseable_branches
image: parity/rust-i686:gitlab-ci
variables:
CARGO_TARGET: i686-unknown-linux-gnu
tags:
- rust-i686
allow_failure: true
build-linux-ubuntu-arm64:
<<: *build
only: *releaseable_branches
image: parity/rust-arm64:gitlab-ci
variables:
CARGO_TARGET: aarch64-unknown-linux-gnu
tags:
- rust-arm
allow_failure: true
build-linux-ubuntu-armhf:
<<: *build
only: *releaseable_branches
image: parity/rust-armv7:gitlab-ci
variables:
CARGO_TARGET: armv7-unknown-linux-gnueabihf
tags:
- rust-arm
allow_failure: true
build-linux-android-armhf:
stage: build
only: *releaseable_branches
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
script:
- scripts/gitlab/build-unix.sh
tags:
- rust-arm
allow_failure: true
build-darwin-macos-x86_64:
stage: build stage: build
only: *releaseable_branches only: *releaseable_branches
variables: variables:
@ -209,18 +71,12 @@ build-darwin-macos-x86_64:
script: script:
- scripts/gitlab/build-unix.sh - scripts/gitlab/build-unix.sh
tags: tags:
- osx - rust-osx
<<: *collect_artifacts <<: *collect_artifacts
build-windows-msvc-x86_64: build-windows:
stage: build stage: build
only: *releaseable_branches only: *releaseable_branches
cache:
key: "${CI_JOB_NAME}"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
# No cargo caching, since fetch-locking on Windows gets stuck
variables: variables:
CARGO_TARGET: x86_64-pc-windows-msvc CARGO_TARGET: x86_64-pc-windows-msvc
script: script:
@ -229,129 +85,94 @@ build-windows-msvc-x86_64:
- rust-windows - rust-windows
<<: *collect_artifacts <<: *collect_artifacts
#### stage: package publish-docker:
package-linux-snap-amd64: &package_snap
stage: package
only: *releaseable_branches
except:
- master
image: parity/snapcraft:gitlab-ci
cache: {}
before_script: *determine_version
variables:
CARGO_TARGET: x86_64-unknown-linux-gnu
dependencies:
- build-linux-ubuntu-amd64
script:
- scripts/gitlab/package-snap.sh
tags:
- rust-stable
<<: *collect_artifacts
package-linux-snap-i386:
<<: *package_snap
variables:
BUILD_ARCH: i386
CARGO_TARGET: i686-unknown-linux-gnu
dependencies:
- build-linux-ubuntu-i386
package-linux-snap-arm64:
<<: *package_snap
variables:
BUILD_ARCH: arm64
CARGO_TARGET: aarch64-unknown-linux-gnu
dependencies:
- build-linux-ubuntu-arm64
package-linux-snap-armhf:
<<: *package_snap
variables:
BUILD_ARCH: armhf
CARGO_TARGET: armv7-unknown-linux-gnueabihf
dependencies:
- build-linux-ubuntu-armhf
#### stage: publish
publish-linux-snap-amd64: &publish_snap
stage: publish
only: *publishable_branches
image: parity/snapcraft:gitlab-ci
cache: {}
before_script: *determine_version
variables:
BUILD_ARCH: amd64
dependencies:
- package-linux-snap-amd64
script:
- scripts/gitlab/publish-snap.sh
tags:
- rust-stable
publish-linux-snap-i386:
<<: *publish_snap
variables:
BUILD_ARCH: i386
dependencies:
- package-linux-snap-i386
publish-linux-snap-arm64:
<<: *publish_snap
variables:
BUILD_ARCH: arm64
dependencies:
- package-linux-snap-arm64
publish-linux-snap-armhf:
<<: *publish_snap
variables:
BUILD_ARCH: armhf
dependencies:
- package-linux-snap-armhf
publish-docker-parity-amd64: &publish_docker
stage: publish stage: publish
only: *releaseable_branches only: *releaseable_branches
cache: {} cache: {}
dependencies: dependencies:
- build-linux-ubuntu-amd64 - build-linux
tags: tags:
- shell - shell
script: script:
- scripts/gitlab/publish-docker.sh parity - scripts/gitlab/publish-docker.sh parity
publish-docker-parityevm-amd64: publish-awss3:
<<: *publish_docker
script:
- scripts/gitlab/publish-docker.sh parity-evm
publish-github-and-s3:
stage: publish stage: publish
only: *publishable_branches only: *releaseable_branches
cache: {} cache: {}
dependencies: dependencies:
- build-linux-ubuntu-amd64 - build-linux
- build-linux-ubuntu-i386 - build-darwin
- build-linux-ubuntu-armhf - build-windows
- build-linux-ubuntu-arm64
- build-darwin-macos-x86_64
- build-windows-msvc-x86_64
before_script: *determine_version before_script: *determine_version
script: script:
- scripts/gitlab/push.sh - scripts/gitlab/publish-awss3.sh
tags: tags:
- shell - shell
####stage: docs docs-jsonrpc:
stage: optional
docs-rpc-json:
stage: docs
only: only:
- tags - tags
cache: {} cache: {}
script: script:
- scripts/gitlab/rpc-docs.sh - scripts/gitlab/docs-jsonrpc.sh
tags: tags:
- shell - shell
cargo-audit:
stage: optional
script:
- scripts/gitlab/cargo-audit.sh
tags:
- rust-stable
test-android:
stage: optional
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
script:
- scripts/gitlab/test-all.sh stable
tags:
- rust-arm
test-darwin:
stage: optional
variables:
CARGO_TARGET: x86_64-apple-darwin
CC: gcc
CXX: g++
RUN_TESTS: cargo
script:
- scripts/gitlab/test-all.sh stable
tags:
- rust-osx
test-windows:
stage: optional
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
RUN_TESTS: cargo
script:
- sh scripts/gitlab/test-all.sh stable
tags:
- rust-windows
test-beta:
stage: optional
variables:
RUN_TESTS: cargo
script:
- scripts/gitlab/test-all.sh beta
tags:
- rust-beta
test-nightly:
stage: optional
variables:
RUN_TESTS: all
script:
- scripts/gitlab/test-all.sh nightly
tags:
- rust-nightly

View File

@ -4,9 +4,7 @@
<p align="center"><strong><a href="https://github.com/paritytech/parity-ethereum/releases/latest">» Download the latest release «</a></strong></p> <p align="center"><strong><a href="https://github.com/paritytech/parity-ethereum/releases/latest">» Download the latest release «</a></strong></p>
<p align="center"><a href="https://gitlab.parity.io/parity/parity/commits/master" target="_blank"><img src="https://gitlab.parity.io/parity/parity/badges/master/build.svg" /></a> <p align="center"><a href="https://gitlab.parity.io/parity/parity-ethereum/commits/master" target="_blank"><img src="https://gitlab.parity.io/parity/parity-ethereum/badges/master/build.svg" /></a>
<a href="https://codecov.io/gh/paritytech/parity-ethereum" target="_blank"><img src="https://codecov.io/gh/paritytech/parity-ethereum/branch/master/graph/badge.svg" /></a>
<a href="https://build.snapcraft.io/user/paritytech/parity" target="_blank"><img src="https://build.snapcraft.io/badge/paritytech/parity.svg" /></a>
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank"><img src="https://img.shields.io/badge/license-GPL%20v3-green.svg" /></a></p> <a href="https://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank"><img src="https://img.shields.io/badge/license-GPL%20v3-green.svg" /></a></p>
**Built for mission-critical use**: Miners, service providers, and exchanges need fast synchronisation and maximum uptime. Parity Ethereum provides the core infrastructure essential for speedy and reliable services. **Built for mission-critical use**: Miners, service providers, and exchanges need fast synchronisation and maximum uptime. Parity Ethereum provides the core infrastructure essential for speedy and reliable services.
@ -60,26 +58,6 @@ Once you have `rustup` installed, then you need to install:
Make sure that these binaries are in your `PATH`. After that, you should be able to build Parity Ethereum from source. Make sure that these binaries are in your `PATH`. After that, you should be able to build Parity Ethereum from source.
## Install from the Snapcraft Store
In any of the [supported Linux distros](https://snapcraft.io/docs/core/install):
```bash
sudo snap install parity
```
Alternatively, if you want to contribute testing the upcoming release:
```bash
sudo snap install parity --beta
```
Moreover, to test the latest code from the master branch:
```bash
sudo snap install parity --edge
```
## Build from Source Code ## Build from Source Code
```bash ```bash

View File

@ -1,12 +0,0 @@
#!/usr/bin/env 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
echo "Aura test complete"

View File

@ -2,13 +2,19 @@
set -e # fail on any error set -e # fail on any error
set -u # treat unset variables as error set -u # treat unset variables as error
echo "__________Show ENVIROMENT__________" echo "__________Show ENVIROMENT__________"
echo "CC: " $CC echo "CI_SERVER_NAME: " $CI_SERVER_NAME
echo "CXX: " $CXX 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__________" echo "__________CARGO CONFIG__________"
rm -rf .cargo
mkdir -p .cargo mkdir -p .cargo
rm -f .cargo/config
echo "[target.$CARGO_TARGET]" >> .cargo/config echo "[target.$CARGO_TARGET]" >> .cargo/config
echo "linker= \"$CC\"" >> .cargo/config echo "linker= \"$CC\"" >> .cargo/config
cat .cargo/config cat .cargo/config

View File

@ -6,18 +6,27 @@ set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs20
set LIB="C:\vs2015\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" 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 rustup default stable-x86_64-pc-windows-msvc
echo "_____ Building _____"
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 --features final
time cargo build --target $CARGO_TARGET --release -p evmbin 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 ethstore-cli
time cargo build --target $CARGO_TARGET --release -p ethkey-cli time cargo build --target $CARGO_TARGET --release -p ethkey-cli
time cargo build --target $CARGO_TARGET --release -p whisper-cli time cargo build --target $CARGO_TARGET --release -p whisper-cli
echo "__________Sign binaries__________" echo "__________Sign binaries__________"
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe
scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe
echo "_____ Post-processing binaries _____" echo "_____ Post-processing binaries _____"
rm -rf artifacts rm -rf artifacts
@ -25,7 +34,11 @@ mkdir -p artifacts
cd artifacts cd artifacts
mkdir -p $CARGO_TARGET mkdir -p $CARGO_TARGET
cd $CARGO_TARGET cd $CARGO_TARGET
cp --verbose ../../target/$CARGO_TARGET/release/{parity.exe,parity-evm.exe,ethstore.exe,ethkey.exe,whisper.exe} . 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 _____" echo "_____ Calculating checksums _____"
for binary in $(ls) for binary in $(ls)

View File

@ -3,5 +3,5 @@
set -e # fail on any error set -e # fail on any error
set -u # treat unset variables as error set -u # treat unset variables as error
cargo install rustfmt-nightly CARGO_TARGET_DIR=./target cargo +stable install cargo-audit
cargo fmt -- --write-mode=diff cargo +stable audit

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
cargo install clippy
cargo clippy -- -D warnings

View File

@ -1,20 +0,0 @@
#!/bin/bash
set -x
git submodule update --init --recursive
rm -rf target/*
cargo test --all --exclude evmjit --no-run -- --test-threads 8|| exit $?
KCOV_TARGET="target/cov"
KCOV_FLAGS="--verify"
mkdir -p $KCOV_TARGET
echo "__________Cover RUST___________"
for FILE in `find target/debug/deps ! -name "*.*" -type f`
do
timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET $FILE
done
timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
bash <(curl -s https://codecov.io/bash) &&
echo "Uploaded code coverage"
exit 0

View File

@ -1,8 +0,0 @@
echo "Parity Wallet
=============
Welcome to Parity Wallet, your all-in-one Ethereum node and wallet.
If you continue, Parity will be installed as a user service. You will be able to use the Parity Wallet through your browser by using the menu bar icon, following the shortcut in the Launchpad or navigating to http://localhost:8180/ in your browser.
Parity is distributed under the terms of the GPL."

View File

@ -1,24 +0,0 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
case ${CI_COMMIT_REF_NAME} in
nightly|*v2.2*) export GRADE="devel";;
beta|*v2.1*) export GRADE="stable";;
stable|*v2.0*) export GRADE="stable";;
*) echo "No release" exit 0;;
esac
SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
echo "__________Create snap package__________"
echo "Release channel :" $GRADE " Branch/tag: " $CI_COMMIT_REF_NAME
echo $VERSION:$GRADE:$BUILD_ARCH
cat scripts/gitlab/templates/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET' > snapcraft.yaml
cat snapcraft.yaml
snapcraft --target-arch=$BUILD_ARCH
ls *.snap
echo "__________Post-processing snap package__________"
mkdir -p artifacts
mv -v $SNAP_PACKAGE "artifacts/"$SNAP_PACKAGE
echo "_____ Calculating checksums _____"
cd artifacts
rhash --sha256 $SNAP_PACKAGE -o $SNAP_PACKAGE".sha256"

49
scripts/gitlab/publish-awss3.sh Executable file
View 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/

View File

@ -4,8 +4,8 @@ set -e # fail on any error
set -u # treat unset variables as error set -u # treat unset variables as error
if [ "$CI_COMMIT_REF_NAME" == "master" ]; if [ "$CI_COMMIT_REF_NAME" == "master" ];
then export DOCKER_BUILD_TAG="latest"; then export DOCKER_BUILD_TAG="latest";
else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME; else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME;
fi fi
docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
@ -17,6 +17,6 @@ export DOCKER_TARGET=$1
echo $DOCKER_TARGET echo $DOCKER_TARGET
echo "__________Docker build and push__________" echo "__________Docker build and push__________"
docker build --build-arg TARGET=$DOCKER_TARGET --no-cache=true --tag parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG -f docker/hub/Dockerfile . 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 push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG
docker logout docker logout

View File

@ -1,18 +0,0 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
case ${CI_COMMIT_REF_NAME} in
nightly|*v2.2*) export CHANNEL="edge";;
beta|*v2.1*) export CHANNEL="beta";;
stable|*v2.0*) export CHANNEL="stable";;
*) echo "No release" exit 0;;
esac
echo "Release channel :" $CHANNEL " Branch/tag: " $CI_COMMIT_REF_NAME
echo $SNAPCRAFT_LOGIN_PARITY_BASE64 | base64 --decode > snapcraft.login
snapcraft login --with snapcraft.login
snapcraft push --release $CHANNEL "artifacts/parity_"$VERSION"_"$BUILD_ARCH".snap"
snapcraft status parity
snapcraft logout

View File

@ -1,74 +0,0 @@
#!/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_BUILD_REF_NAME/$CI_BUILD_REF"
echo "Pushing release to Kovan"
./scripts/gitlab/safe_curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF"
echo "__________Set ENVIROMENT__________"
DESCRIPTION="$(cat CHANGELOG.md)"
RELEASE_TABLE="$(cat scripts/gitlab/templates/release-table.md)"
RELEASE_TABLE="$(echo "${RELEASE_TABLE//\$VERSION/${VERSION}}")"
#The text in the file CANGELOG.md before which the table with links is inserted. Must be present in this file necessarily
REPLACE_TEXT="The full list of included changes:"
case ${CI_COMMIT_REF_NAME} in
nightly|*v2.2*) NAME="Parity "$VERSION" nightly";;
beta|*v2.1*) NAME="Parity "$VERSION" beta";;
stable|*v2.0*) NAME="Parity "$VERSION" stable";;
*) echo "No release" exit 0;;
esac
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
for binary in $(ls parity.sha256)
do
sha256=$(cat $binary | awk '{ print $1}' )
sha3=$(cat ${binary/sha256/sha3} | awk '{ print $1}' )
case $DIR in
x86_64* )
DATA="commit=$CI_BUILD_REF&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
../../scripts/gitlab/safe_curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$DIR"
# Kovan
../../scripts/gitlab/safe_curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$DIR"
;;
esac
RELEASE_TABLE="$(echo "${RELEASE_TABLE/sha$DIR/${sha256}}")"
done
cd ..
done
#do not touch the following 3 lines. Features of output in Markdown
DESCRIPTION="$(echo "${DESCRIPTION/${REPLACE_TEXT}/${RELEASE_TABLE}
${REPLACE_TEXT}}")"
echo "$DESCRIPTION"
if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; then DESCRIPTION=""; fi #TODO in the future, we need to prepare a script that will do changelog
echo "__________Create release to Github____________"
github-release release --user devops-parity --repo parity-ethereum --tag "$CI_COMMIT_REF_NAME" --draft --name "$NAME" --description "$DESCRIPTION"
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_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "nightly" ]];
then
export S3_BUCKET=builds-parity-published;
else
export S3_BUCKET=builds-parity;
fi
aws s3 sync ./ s3://$S3_BUCKET/$CI_BUILD_REF_NAME/

View File

@ -1,16 +0,0 @@
| OS | Arch | Download | SHA256 Checksum |
|:---:|:---:|:---|:---|
| linux | arm64 | [parity](https://releases.parity.io/$VERSION/aarch64-unknown-linux-gnu/parity) | <sup>`shaaarch64-unknown-linux-gnu`</sup> |
| android | armv7 | [parity](https://releases.parity.io/$VERSION/armv7-linux-androideabi/parity) | <sup>`shaarmv7-linux-androideabi`</sup> |
| linux | armv7 | [parity](https://releases.parity.io/$VERSION/armv7-unknown-linux-gnueabihf/parity) | <sup>`shaarmv7-unknown-linux-gnueabihf`</sup> |
| linux | i686 | [parity](https://releases.parity.io/$VERSION/i686-unknown-linux-gnu/parity) | <sup>`shai686-unknown-linux-gnu`</sup> |
| osx | x64 | [parity](https://releases.parity.io/$VERSION/x86_64-apple-darwin/parity) | <sup>`shax86_64-apple-darwin`</sup> |
| windows | x64 | [parity.exe](https://releases.parity.io/$VERSION/x86_64-pc-windows-msvc/parity.exe) | <sup>`shax86_64-pc-windows-msvc`</sup> |
| linux | x64 | [parity](https://releases.parity.io/$VERSION/x86_64-unknown-linux-gnu/parity) | <sup>`shax86_64-unknown-linux-gnu`</sup> |
| OS | Alternative | Link |
|:---:|:---:|:---|
| <img src="https://gist.github.com/5chdn/1fce888fde1d773761f809b607757f76/raw/44c4f0fc63f1ea8e61a9513af5131ef65eaa6c75/apple.png" alt="Apple Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect" style="width: 32px;"/> | Homebrew |[github.com/paritytech/homebrew-paritytech/blob/master/README.md](https://github.com/paritytech/homebrew-paritytech/blob/master/README.md) |
| <img src="https://gist.github.com/5chdn/1fce888fde1d773761f809b607757f76/raw/44c4f0fc63f1ea8e61a9513af5131ef65eaa6c75/linux.png" alt="Linux Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect" style="width: 32px;"/> | Snapcraft | [snapcraft.io/parity](https://snapcraft.io/parity/) |
| <img src="https://gist.github.com/5chdn/1fce888fde1d773761f809b607757f76/raw/44c4f0fc63f1ea8e61a9513af5131ef65eaa6c75/settings.png" alt="Settings Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect" style="width: 32px;"/> | Docker | [hub.docker.com/r/parity/parity](https://hub.docker.com/r/parity/parity) |
| <img src="https://gist.github.com/5chdn/1fce888fde1d773761f809b607757f76/raw/44c4f0fc63f1ea8e61a9513af5131ef65eaa6c75/settings.png" alt="Settings Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect" style="width: 32px;"/> | Other binaries | [vanity-service.parity.io/parity-binaries?format=markdown&version=$VERSION](https://vanity-service.parity.io/parity-binaries?format=markdown&version=$VERSION) |

View File

@ -1,58 +0,0 @@
name: parity
version: $VERSION
architectures: [$BUILD_ARCH]
grade: $GRADE
confinement: strict
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.
apps:
parity:
command: parity
plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland]
desktop: usr/share/applications/parity.desktop
parity-evm:
command: parity-evm
plugs: [home, network, network-bind]
ethkey:
command: ethkey
plugs: [home]
ethstore:
command: ethstore
plugs: [home]
whisper:
command: whisper
plugs: [home]
icon: snap/gui/icon.png
parts:
desktop-icon:
source: ./snap
plugin: nil
override-build: |
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
cp -v gui/parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/
cp -v gui/icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/
parity:
source: ./artifacts/$CARGO_TARGET
plugin: nil
override-build: |
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin
cp -v parity $SNAPCRAFT_PART_INSTALL/usr/bin/parity
cp -v parity-evm $SNAPCRAFT_PART_INSTALL/usr/bin/parity-evm
cp -v ethkey $SNAPCRAFT_PART_INSTALL/usr/bin/ethkey
cp -v ethstore $SNAPCRAFT_PART_INSTALL/usr/bin/ethstore
cp -v whisper $SNAPCRAFT_PART_INSTALL/usr/bin/whisper
stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6, cmake]
df:
plugin: nil
stage-packages: [coreutils]
stage: [bin/df]

View File

@ -4,41 +4,32 @@
set -e # fail on any error set -e # fail on any error
set -u # treat unset variables as error set -u # treat unset variables as error
set -x # full command output for development
git log --graph --oneline --all --decorate=short -n 10 git log --graph --oneline --all --decorate=short -n 10
case $CI_COMMIT_REF_NAME in case $CI_COMMIT_REF_NAME in
(master|beta|stable) (beta|stable)
export GIT_COMPARE=$CI_COMMIT_REF_NAME~ export GIT_COMPARE=$CI_COMMIT_REF_NAME~
;; ;;
(master|nightly)
export GIT_COMPARE=master~
;;
(*) (*)
export GIT_COMPARE=master export GIT_COMPARE=master
;; ;;
esac 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 ' ')"
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/ | wc -l | tr -d ' ')"
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED" echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
if [ "${RUST_FILES_MODIFIED}" = "0" ] if [ "${RUST_FILES_MODIFIED}" = "0" ]
then then
echo "__________Skipping Rust tests since no Rust files modified__________"; echo "__________Skipping Rust tests since no Rust files modified__________";
exit 0 exit 0
fi fi
rustup default $1 rustup default $1
git submodule update --init --recursive git submodule update --init --recursive
rustup show rustup show
exec ./test.sh exec ./test.sh
# 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Parity Ethereum
Comment=The fastest and most advanced Ethereum client.
Exec=parity
Icon=/usr/share/pixmaps/icon.png
Terminal=true

45
test.sh
View File

@ -48,17 +48,24 @@ validate () {
} }
cpp_test () { cpp_test () {
# Running the C++ example case $CARGO_TARGET in
echo "________Running the C++ example________" (x86_64-unknown-linux-gnu)
cd parity-clib-examples/cpp && \ # Running the C++ example
mkdir -p build && \ echo "________Running the C++ example________"
cd build && \ cd parity-clib-examples/cpp && \
cmake .. && \ mkdir -p build && \
make -j $THREADS && \ cd build && \
./parity-example && \ cmake .. && \
cd .. && \ make -j $THREADS && \
rm -rf build && \ ./parity-example && \
cd ../.. cd .. && \
rm -rf build && \
cd ../..
;;
(*)
echo "________Skipping the C++ example________"
;;
esac
} }
cargo_test () { cargo_test () {
@ -75,17 +82,19 @@ else
validate validate
fi fi
test "${RUN_TESTS}" = "true" && cpp_test test "${RUN_TESTS}" = "all" && cpp_test
if [ "$CARGO_TARGET" ] if [ "$CARGO_TARGET" ]
then then
if [ "${RUN_TESTS}" = "true" ] case "${RUN_TESTS}" in
then (cargo|all)
cargo_test --target $CARGO_TARGET $@ cargo_test --target $CARGO_TARGET $@
else ;;
cargo_test --no-run --target $CARGO_TARGET $@ ('')
fi cargo_test --no-run --target $CARGO_TARGET $@
;;
esac
else else
cargo_test $@ cargo_test $@
fi fi