Compare commits

..

16 Commits

Author SHA1 Message Date
5chdn
0e8263b90d ci: specify default cargo target dir 2018-10-01 18:10:15 +01:00
5chdn
9da093aa9d docs: align README with ci changes 2018-10-01 17:50:51 +01:00
5chdn
01908764f1 ci: simplify gitlab caching 2018-10-01 17:49:08 +01:00
5chdn
a86d0052f0 ci: fix regex in push script for windows 2018-10-01 17:32:18 +01:00
5chdn
ab6172261e ci: fix weird binary checksum logic in push script 2018-10-01 16:58:16 +01:00
5chdn
8eb65a911a ci: more verbose cp command for windows build 2018-10-01 16:43:21 +01:00
5chdn
d41e3bc5bf ci: add publish script to releaseable branches 2018-10-01 16:38:47 +01:00
5chdn
597bbfc8a7 ci: rename misc to optional 2018-10-01 14:59:28 +01:00
5chdn
f0f123c823 ci: simplify audit script 2018-10-01 14:58:25 +01:00
5chdn
269d7c10eb ci: ignore snap and docker files for rust check 2018-10-01 14:44:57 +01:00
5chdn
ab9c371edb ci: make audit script executable 2018-10-01 14:41:59 +01:00
5chdn
244528e4bb ci: add cargo audit job 2018-10-01 13:58:01 +01:00
5chdn
88b6169489 ci: clarify job names 2018-10-01 13:30:46 +01:00
5chdn
e18270f33e ci: (re)move dockerfiles 2018-10-01 13:28:06 +01:00
5chdn
bc3c1117a4 ci: remove snap artifacts 2018-10-01 13:24:09 +01:00
5chdn
99e8652d8a ci: add wind and mac to the end of the pipe 2018-10-01 13:17:36 +01:00
17 changed files with 67 additions and 348 deletions

View File

@@ -2,13 +2,14 @@ stages:
- test
- build
- publish
- misc
- optional
image: parity/rust:gitlab-ci
variables:
CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
CARGO_TARGET_DIR: "${CI_PROJECT_DIR}/.cargo"
BUILD_TARGET: ubuntu
BUILD_ARCH: amd64
CARGO_TARGET: x86_64-unknown-linux-gnu
@@ -16,8 +17,8 @@ variables:
cache:
key: "${CI_JOB_NAME}"
paths:
- ${CI_PROJECT_DIR}/target/
- ${CI_PROJECT_DIR}/cargo/
- ./target
- ./.cargo
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches
@@ -50,33 +51,6 @@ test-linux:
tags:
- rust-stable
test-darwin:
stage: test
variables:
CARGO_TARGET: x86_64-apple-darwin
CC: gcc
CXX: g++
RUN_TESTS: "true"
script:
- scripts/gitlab/test.sh stable
tags:
- rust-osx
test-windows:
stage: test
cache:
key: "${CI_JOB_NAME}"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
RUN_TESTS: "true"
script:
- sh scripts/gitlab/test.sh stable
tags:
- rust-windows
build-linux:
stage: build
only: *releaseable_branches
@@ -104,11 +78,6 @@ build-darwin:
build-windows:
stage: build
only: *releaseable_branches
cache:
key: "${CI_JOB_NAME}"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
script:
@@ -130,9 +99,7 @@ publish-docker:
publish-awss3:
stage: publish
only:
- nightly
- /^v2.*$/
only: *releaseable_branches
cache: {}
dependencies:
- build-linux
@@ -144,8 +111,8 @@ publish-awss3:
tags:
- shell
misc-docs:
stage: misc
docs-jsonrpc:
stage: optional
only:
- tags
cache: {}
@@ -154,8 +121,15 @@ misc-docs:
tags:
- shell
misc-android:
stage: misc
cargo-audit:
stage: optional
script:
- scripts/gitlab/audit.sh
tags:
- rust-stable
test-android:
stage: optional
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
@@ -164,8 +138,30 @@ misc-android:
tags:
- rust-arm
misc-beta:
stage: misc
test-darwin:
stage: optional
variables:
CARGO_TARGET: x86_64-apple-darwin
CC: gcc
CXX: g++
RUN_TESTS: "true"
script:
- scripts/gitlab/test.sh stable
tags:
- rust-osx
test-windows:
stage: optional
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
RUN_TESTS: "true"
script:
- sh scripts/gitlab/test.sh stable
tags:
- rust-windows
test-beta:
stage: optional
variables:
RUN_TESTS: "true"
script:
@@ -173,8 +169,8 @@ misc-beta:
tags:
- rust-beta
misc-nightly:
stage: misc
test-nightly:
stage: optional
variables:
RUN_TESTS: "true"
script:

View File

@@ -5,8 +5,6 @@
<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>
<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>
**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.
## 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
```bash

View File

@@ -1,40 +0,0 @@
## Usage
```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .```
## Usage - CentOS
Builds a lightweight non-root Parity docker image:
```
git clone https://github.com/paritytech/parity-ethereum.git
cd parity-ethereum
./docker/centos/build.sh
```
Fully customised build:
```
PARITY_IMAGE_REPO=my-personal/parity \
PARITY_BUILDER_IMAGE_TAG=build-latest \
PARITY_RUNNER_IMAGE_TAG=centos-parity-experimental \
./docker/centos/build.sh
```
Default values:
```
# The image name
PARITY_IMAGE_REPO - parity/parity
# The tag to be used for builder image, git commit sha will be appended
PARITY_BUILDER_IMAGE_TAG - build
# The tag to be used for runner image
PARITY_RUNNER_IMAGE_TAG - latest
```
All default ports you might use will be exposed:
```
# secret
# ipfs store ui rpc ws listener discovery
# ↓ ↓ ↓ ↓ ↓ ↓ ↓
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp
```

View File

@@ -1,43 +0,0 @@
FROM alpine:edge AS builder
# show backtraces
ENV RUST_BACKTRACE 1
RUN apk add --no-cache \
build-base \
cargo \
cmake \
eudev-dev \
linux-headers \
perl \
rust
WORKDIR /parity
COPY . /parity
RUN cargo build --release --target x86_64-alpine-linux-musl --verbose
RUN strip target/x86_64-alpine-linux-musl/release/parity
FROM alpine:edge
# show backtraces
ENV RUST_BACKTRACE 1
RUN apk add --no-cache \
libstdc++ \
eudev-libs \
libgcc
RUN addgroup -g 1000 parity \
&& adduser -u 1000 -G parity -s /bin/sh -D parity
USER parity
EXPOSE 8080 8545 8180
WORKDIR /home/parity
RUN mkdir -p /home/parity/.local/share/io.parity.ethereum/
COPY --chown=parity:parity --from=builder /parity/target/x86_64-alpine-linux-musl/release/parity ./
ENTRYPOINT ["./parity"]

View File

@@ -1,28 +0,0 @@
FROM centos:latest
RUN mkdir -p /opt/parity/data && \
chmod g+rwX /opt/parity/data && \
mkdir -p /opt/parity/release
COPY parity/parity /opt/parity/release
WORKDIR /opt/parity/data
# exposing default ports
#
# secret
# ipfs store ui rpc ws listener discovery
# ↓ ↓ ↓ ↓ ↓ ↓ ↓
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp
# switch to non-root user
USER 1001
#if no base path provided, assume it's current workdir
CMD ["--base-path","."]
ENTRYPOINT ["/opt/parity/release/parity"]

View File

@@ -1,25 +0,0 @@
FROM centos:latest
WORKDIR /build
ADD . /build/parity-ethereum
RUN yum -y update && \
yum install -y systemd-devel git make gcc-c++ gcc file binutils && \
curl -L "https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz" -o cmake.tar.gz && \
tar -xzf cmake.tar.gz && \
cp -r cmake-3.12.0-Linux-x86_64/* /usr/ && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
PATH=/root/.cargo/bin:$PATH && \
RUST_BACKTRACE=1 && \
rustc -vV && \
cargo -V && \
gcc -v && \
g++ -v && \
cmake --version && \
cd parity-ethereum && \
cargo build --verbose --release --features final && \
strip /build/parity-ethereum/target/release/parity && \
file /build/parity-ethereum/target/release/parity

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env sh
# The image name
PARITY_IMAGE_REPO=${PARITY_IMAGE_REPO:-parity/parity}
# The tag to be used for builder image
PARITY_BUILDER_IMAGE_TAG=${PARITY_BUILDER_IMAGE_TAG:-build}
# The tag to be used for runner image
PARITY_RUNNER_IMAGE_TAG=${PARITY_RUNNER_IMAGE_TAG:-latest}
echo Building $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H") . -f docker/centos/Dockerfile.build
echo Creating $PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H"), extracting binary
docker create --name extract $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
mkdir docker/centos/parity
docker cp extract:/build/parity-ethereum/target/release/parity docker/centos/parity
echo Building $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG docker/centos/ -f docker/centos/Dockerfile
echo Cleaning up ...
rm -rf docker/centos/parity
docker rm -f extract
docker rmi -f $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
echo Echoing Parity version:
docker run $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG --version
echo Done.

View File

@@ -1,45 +0,0 @@
FROM ubuntu:14.04
WORKDIR /build
# install tools and dependencies
RUN apt-get -y update && \
apt-get install -y --force-yes --no-install-recommends \
curl git make g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
libc6-arm64-cross libc6-dev-arm64-cross wget file ca-certificates \
binutils-aarch64-linux-gnu cmake3 libudev-dev \
&& \
apt-get clean
# install rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# rustup directory
ENV PATH /root/.cargo/bin:$PATH
ENV RUST_TARGETS="aarch64-unknown-linux-gnu"
# multirust add arm--linux-gnuabhf toolchain
RUN rustup target add aarch64-unknown-linux-gnu
# show backtraces
ENV RUST_BACKTRACE 1
# show tools
RUN rustc -vV && cargo -V
# build parity
ADD . /build/parity
RUN cd parity && \
mkdir -p .cargo && \
echo '[target.aarch64-unknown-linux-gnu]\n\
linker = "aarch64-linux-gnu-gcc"\n'\
>>.cargo/config && \
cat .cargo/config && \
cargo build --target aarch64-unknown-linux-gnu --release --verbose && \
ls /build/parity/target/aarch64-unknown-linux-gnu/release/parity && \
/usr/bin/aarch64-linux-gnu-strip /build/parity/target/aarch64-unknown-linux-gnu/release/parity
RUN file /build/parity/target/aarch64-unknown-linux-gnu/release/parity
EXPOSE 8080 8545 8180
ENTRYPOINT ["/build/parity/target/aarch64-unknown-linux-gnu/release/parity"]

View File

@@ -1,45 +0,0 @@
FROM ubuntu:14.04
WORKDIR /build
# install tools and dependencies
RUN apt-get -y update && \
apt-get install -y --force-yes --no-install-recommends \
curl git make g++ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross wget file ca-certificates \
binutils-arm-linux-gnueabihf cmake3 libudev-dev \
&& \
apt-get clean
# install rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# rustup directory
ENV PATH /root/.cargo/bin:$PATH
ENV RUST_TARGETS="arm-unknown-linux-gnueabihf"
# multirust add arm--linux-gnuabhf toolchain
RUN rustup target add armv7-unknown-linux-gnueabihf
# show backtraces
ENV RUST_BACKTRACE 1
# show tools
RUN rustc -vV && cargo -V
# build parity
ADD . /build/parity
RUN cd parity && \
mkdir -p .cargo && \
echo '[target.armv7-unknown-linux-gnueabihf]\n\
linker = "arm-linux-gnueabihf-gcc"\n'\
>>.cargo/config && \
cat .cargo/config && \
cargo build --target armv7-unknown-linux-gnueabihf --release --verbose && \
ls /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity && \
/usr/bin/arm-linux-gnueabihf-strip /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
RUN file /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
EXPOSE 8080 8545 8180
ENTRYPOINT ["/build/parity/target/armv7-unknown-linux-gnueabihf/release/parity"]

7
scripts/gitlab/audit.sh Executable file
View File

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

View File

@@ -25,7 +25,11 @@ mkdir -p artifacts
cd artifacts
mkdir -p $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 _____"
for binary in $(ls)

View File

@@ -19,24 +19,21 @@ echo ${filetest[*]}
for DIR in "${filetest[@]}";
do
cd $DIR
if [[ $DIR == "*windows*" ]];
if [[ $DIR =~ "windows" ]];
then
WIN=".exe";
else
WIN="";
fi
for binary in $(ls parity.sha3)
do
sha3=$(cat ${binary/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
done
sha3=$(cat parity.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
cd ..
done

View File

@@ -17,6 +17,6 @@ export DOCKER_TARGET=$1
echo $DOCKER_TARGET
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/gitlab/hub-docker.file .
docker push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG
docker logout

View File

@@ -15,7 +15,7 @@ case $CI_COMMIT_REF_NAME in
;;
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/ | 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/ -e ^docker/ -e ^snap/ | wc -l | tr -d ' ')"
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
if [ "${RUST_FILES_MODIFIED}" = "0" ]

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