Compare commits

...

4 Commits

Author SHA1 Message Date
Denis S. Soldatov aka General-Beck
514e4af452 fix download link for github 2018-06-02 05:24:43 +03:00
Denis S. Soldatov aka General-Beck
95a7b032d7 chmod +x scripts 2018-06-02 05:18:22 +03:00
Denis S. Soldatov aka General-Beck
8926b43d49 add missed scripts 2018-06-02 05:13:28 +03:00
Denis S. Soldatov aka General-Beck
ebc6b9cec9 Updating the CI system with the publication of releases and binary files on github
Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>
2018-06-02 04:22:02 +03:00
33 changed files with 913 additions and 538 deletions

View File

@@ -1,263 +1,364 @@
stages:
- test
- push-release
- build
- package
- publish
- push-release
image: parity/rust:gitlab-ci
variables:
RUST_BACKTRACE: "1"
RUSTFLAGS: ""
CARGOFLAGS: ""
CI_SERVER_NAME: "GitLab CI"
LIBSSL: "libssl1.0.0 (>=1.0.0)"
CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
BUILD_TARGET: ubuntu
BUILD_ARCH: amd64
CARGO_TARGET: x86_64-unknown-linux-gnu
LIBSSL: "libssl1.0.0 (>=1.0.0)"
cache:
key: "$CI_BUILD_STAGE-$CI_BUILD_REF_NAME"
key: "${CI_JOB_NAME}"
paths:
- target/
untracked: true
linux-ubuntu:
stage: build
image: parity/rust:gitlab-ci
only:
- ${CI_PROJECT_DIR}/target/
- ${CI_PROJECT_DIR}/cargo/
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches
- master
- stable
- beta
- tags
- stable
- nightly
- triggers
.publishable_branches: # list of git refs for publishing builds to the "production" locations
only: &publishable_branches
- nightly # Our nightly builds from schedule, on `master`
- "v*" # Our version tags
- triggers
.collect_artifacts: &collect_artifacts
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: on_success
expire_in: 1 mos
paths:
- artifacts/
.collect_packages: &collect_packages
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: on_success
expire_in: 1 mos
paths:
- packages/
.determine_version: &determine_version |
export VERSION=$(grep -m 1 "version =" Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")
echo "Version" $VERSION
#### stage: test
test:rust:stable: &test
stage: test
script:
- rustup default stable
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++ ubuntu
- scripts/gitlab/test.sh stable
tags:
- rust-stable
artifacts:
paths:
- parity.zip
name: "stable-x86_64-unknown-linux-gnu_parity"
linux-debian:
stage: build
image: parity/rust-debian:gitlab-ci
.optional_test: &optional_test
<<: *test
allow_failure: true
only:
- beta
- tags
- stable
- triggers
- master
- nightly
test:rust:beta:
<<: *optional_test
script:
- export LIBSSL="libssl1.1 (>=1.1.0)"
- scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++ debian
- scripts/gitlab/test.sh beta
allow_failure: true
test:rust:nightly:
<<: *optional_test
script:
- scripts/gitlab/test.sh nightly
allow_failure: true
#test:rustfmt:
# <<: *optional_test
# script:
# - scripts/gitlab/rustfmt.sh
#test:clippy:
# <<: *optional_test
# script:
# - scripts/gitlab/clippy.sh
test:coverage:
stage: test
only:
- master
- gitlab-next
script:
- scripts/gitlab/coverage.sh
tags:
- rust-debian
artifacts:
paths:
- parity.zip
name: "stable-x86_64-unknown-debian-gnu_parity"
linux-centos:
stage: build
image: parity/rust-centos:gitlab-ci
only:
- beta
- tags
- stable
- triggers
- shell
allow_failure: true
#### stage: build
build:linux:ubuntu:amd64: &build
stage: build
only: *releaseable_branches
variables:
CARGO_TARGET: x86_64-unknown-linux-gnu
script:
- scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++ centos
tags:
- rust-centos
artifacts:
paths:
- parity.zip
name: "x86_64-unknown-centos-gnu_parity"
linux-i686:
stage: build
image: parity/rust-i686:gitlab-ci
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ ubuntu
tags:
- rust-i686
artifacts:
paths:
- parity.zip
name: "i686-unknown-linux-gnu"
allow_failure: true
linux-armv7:
stage: build
image: parity/rust-armv7:gitlab-ci
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu
tags:
- rust-arm
artifacts:
paths:
- parity.zip
name: "armv7_unknown_linux_gnueabihf_parity"
allow_failure: true
linux-arm:
stage: build
image: parity/rust-arm:gitlab-ci
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu
tags:
- rust-arm
artifacts:
paths:
- parity.zip
name: "arm-unknown-linux-gnueabihf_parity"
allow_failure: true
linux-aarch64:
stage: build
image: parity/rust-arm64:gitlab-ci
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ ubuntu
tags:
- rust-arm
artifacts:
paths:
- parity.zip
name: "aarch64-unknown-linux-gnu_parity"
linux-snap:
stage: build
image: parity/snapcraft:gitlab-ci
only:
- stable
- beta
- tags
- triggers
script:
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++ snap
- scripts/gitlab/build-unix.sh
<<: *collect_artifacts
tags:
- rust-stable
artifacts:
paths:
- parity.zip
name: "stable-x86_64-unknown-snap-gnu_parity"
darwin:
stage: build
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ macos
build:linux:debian:amd64:
<<: *build
image: parity/rust-debian:gitlab-ci
variables:
LIBSSL: "libssl1.1 (>=1.1.0)"
CARGO_TARGET: x86_64-unknown-linux-gnu
build:linux:centos:x86_64:
<<: *build
image: parity/rust-centos:gitlab-ci
retry: 2 #if version `GLIBC_2.18' not found
build:linux:ubuntu:arm64:
<<: *build
image: parity/rust-arm64:gitlab-ci
variables:
CARGO_TARGET: aarch64-unknown-linux-gnu
build:linux:ubuntu:armhf:
<<: *build
image: parity/rust-armv7:gitlab-ci
variables:
CARGO_TARGET: armv7-unknown-linux-gnueabihf
build:linux:android:armhf:
<<: *build
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
build:macos:x86_64:
<<: *build
variables:
CARGO_TARGET: x86_64-apple-darwin
tags:
- osx
artifacts:
paths:
- parity.zip
name: "x86_64-apple-darwin_parity"
windows:
<<: *collect_artifacts
build-windows-x86_64:
stage: build
only: *releaseable_branches
cache:
key: "%CI_BUILD_STAGE%-%CI_BUILD_REF_NAME%"
untracked: true
stage: build
only:
- beta
- tags
- stable
- triggers
key: "%CI_JOB_NAME%"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
script:
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" windows
- sh scripts/gitlab/build-windows.sh
tags:
- rust-windows
artifacts:
paths:
- parity.zip
name: "x86_64-pc-windows-msvc_parity"
android-armv7:
stage: build
image: parity/parity-android:latest
only:
- beta
- tags
- stable
- triggers
script:
- cargo build --target=armv7-linux-androideabi
tags:
- rust-arm
allow_failure: true
artifacts:
paths:
- parity.zip
name: "armv7-linux-androideabi_parity"
docker-build:
stage: build
only:
- tags
- triggers
<<: *collect_artifacts
#### stage: package
package:ubuntu:deb:amd64: &package_unix
stage: package
only: *releaseable_branches
before_script:
- docker info
- *determine_version
variables:
BUILD_ARCH: amd64
IDENT: ubuntu
PKG: deb
LIBSSL: "libssl1.1 (>=1.1.0)"
dependencies:
- build:linux:ubuntu:amd64
script:
- if [ "$CI_BUILD_REF_NAME" == "master" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
- echo "Tag:" $DOCKER_TAG
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
- scripts/docker-build.sh $DOCKER_TAG
- docker logout
tags:
- docker
test-coverage:
stage: test
only:
- master
script:
- scripts/gitlab-test.sh test-coverage
tags:
- kcov
allow_failure: true
test-rust-stable:
stage: test
image: parity/rust:gitlab-ci
script:
- scripts/gitlab-test.sh stable
- scripts/gitlab/package-unix.sh
tags:
- rust-stable
test-rust-beta:
stage: test
only:
- triggers
- master
image: parity/rust:gitlab-ci
<<: *collect_packages
package:ubuntu:deb:arm64:
<<: *package_unix
variables:
BUILD_ARCH: arm64
IDENT: ubuntu
PKG: deb
dependencies:
- build:linux:ubuntu:arm64
package:ubuntu:deb:armhf:
<<: *package_unix
variables:
BUILD_ARCH: armhf
IDENT: ubuntu
PKG: deb
dependencies:
- build:linux:ubuntu:armhf
package:debian:deb:amd64:
<<: *package_unix
variables:
BUILD_ARCH: amd64
IDENT: debian
PKG: deb
dependencies:
- build:linux:debian:amd64
package:centos:rpm:x86_64:
<<: *package_unix
variables:
BUILD_ARCH: x86_64
IDENT: centos
PKG: rpm
LIBSSL: "libssl >= 1.0.0"
dependencies:
- build:linux:centos:x86_64
package:macos:pkg:x86_64:
<<: *package_unix
dependencies:
- build:macos:x86_64
script:
- scripts/gitlab-test.sh beta
- scripts/gitlab/package-macos.sh
tags:
- rust-beta
allow_failure: true
test-rust-nightly:
stage: test
only:
- triggers
- master
image: parity/rust:gitlab-ci
- osx
package:linux:snap:amd64: &package_snap
stage: package
only: *releaseable_branches
before_script:
- *determine_version
dependencies:
- build:linux:ubuntu:amd64
script:
- scripts/gitlab-test.sh nightly
- scripts/gitlab/package-snap.sh
tags:
- rust
- rust-nightly
allow_failure: true
push-release:
- rust-stable
<<: *collect_packages
package:linux:snap:arm64:
<<: *package_snap
variables:
BUILD_ARCH: arm64
dependencies:
- build:linux:ubuntu:arm64
package:linux:snap:armhf:
<<: *package_snap
variables:
BUILD_ARCH: armhf
dependencies:
- build:linux:ubuntu:armhf
package-windows-exe-x86_64:
stage: package
only: *releaseable_branches
dependencies:
- build-windows-x86_64
script:
- sh scripts/gitlab/package-windows.sh
<<: *collect_packages
tags:
- rust-windows
#### stage: publish
publish:linux:snap:amd64: &publish_snap
stage: publish
only: *publishable_branches
image: snapcore/snapcraft:stable
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:arm64:
<<: *publish_snap
before_script:
- *determine_version
- sleep 120
variables:
BUILD_ARCH: arm64
dependencies:
- package:linux:snap:arm64
publish:linux:snap:armhf:
<<: *publish_snap
before_script:
- *determine_version
- sleep 360
variables:
BUILD_ARCH: armhf
dependencies:
- package:linux:snap:armhf
publish:docker:parity:amd64: &publish_docker
stage: publish
only: *publishable_branches
dependencies:
- build:linux:ubuntu:amd64
tags:
- shell
script:
- scripts/gitlab/publish-docker.sh parity
publish:docker:parity-evm:amd64:
<<: *publish_docker
script:
- scripts/gitlab/publish-docker.sh parity-evm
publish:github:
stage: publish
only: *publishable_branches
dependencies:
- package:ubuntu:deb:amd64
- package:ubuntu:deb:armhf
- package:ubuntu:deb:arm64
- package:debian:deb:amd64
- package:centos:rpm:x86_64
- package:macos:pkg:x86_64
- package-windows-exe-x86_64
before_script:
- *determine_version
script:
- scripts/gitlab/push-github.sh
#### stage: push-release
push:release:
stage: push-release
only:
- tags
- triggers
image: parity/rust:gitlab-ci
script:
- scripts/gitlab-push-release.sh
- scripts/gitlab/push-release.sh
tags:
- curl

View File

@@ -1,66 +1,27 @@
FROM ubuntu:14.04
FROM ubuntu:xenial
MAINTAINER Parity Technologies <devops@parity.io>
WORKDIR /build
#ENV for build TAG
ARG BUILD_TAG
ENV BUILD_TAG ${BUILD_TAG:-master}
RUN echo "Build tag:" $BUILD_TAG
#set ENVIROMENT
ARG TARGET
ENV TARGET ${TARGET}
# install tools and dependencies
RUN apt-get update && \
apt-get install -y --force-yes --no-install-recommends \
# make
build-essential \
# add-apt-repository
software-properties-common \
make \
curl \
wget \
git \
g++ \
gcc \
libc6 \
libc6-dev \
binutils \
file \
openssl \
libssl-dev \
libudev-dev \
pkg-config \
dpkg-dev \
libudev-dev &&\
# install rustup
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
# rustup directory
PATH=/root/.cargo/bin:$PATH && \
RUN apt update && apt install -y --no-install-recommends openssl libudev-dev file
# show backtraces
RUST_BACKTRACE=1 && \
# build parity
cd /build&&git clone https://github.com/paritytech/parity && \
cd parity && \
git pull&& \
git checkout $BUILD_TAG && \
cargo build --verbose --release --features final && \
#ls /build/parity/target/release/parity && \
strip /build/parity/target/release/parity && \
file /build/parity/target/release/parity&&mkdir -p /parity&& cp /build/parity/target/release/parity /parity&&\
ENV RUST_BACKTRACE 1
#cleanup Docker image
rm -rf /root/.cargo&&rm -rf /root/.multirust&&rm -rf /root/.rustup&&rm -rf /build&&\
apt-get purge -y \
# make
build-essential \
# add-apt-repository
software-properties-common \
make \
curl \
wget \
git \
g++ \
gcc \
binutils \
file \
pkg-config \
dpkg-dev &&\
rm -rf /var/lib/apt/lists/*
RUN apt autoremove -y
RUN apt clean -y
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
#add TARGET to docker image
COPY artifacts/$TARGET /usr/bin/$TARGET
# Build a shell script because the ENTRYPOINT command doesn't like using ENV
RUN echo "#!/bin/bash \n ${TARGET} \$@" > ./entrypoint.sh
RUN chmod +x ./entrypoint.sh
# setup ENTRYPOINT
EXPOSE 8080 8545 8180
ENTRYPOINT ["/parity/parity"]
ENTRYPOINT ["./entrypoint.sh"]

View File

@@ -34,16 +34,16 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0A7A475C1E3D2CDD0093D1AB /* parity */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = parity; path = ../target/release/parity; sourceTree = "<group>"; };
0A7A475C1E3D2CDD0093D1AB /* parity */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = parity; path = ../artifacts/parity; sourceTree = "<group>"; };
0ACF9ABE1E30FAB600D5C935 /* Parity Ethereum.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Parity Ethereum.app"; sourceTree = BUILT_PRODUCTS_DIR; };
0ACF9AC11E30FAB600D5C935 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
0ACF9AC31E30FAB600D5C935 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
0ACF9AC61E30FAB600D5C935 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
0ACF9AC81E30FAB600D5C935 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0AE564F01E3CE42C00BD01F7 /* GetBSDProcessList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetBSDProcessList.swift; sourceTree = "<group>"; };
0AED4D9F1E3E22F800BF87C0 /* ethstore */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethstore; path = ../target/release/ethstore; sourceTree = "<group>"; };
84CF92B2200E559900AD6E78 /* parity-evm */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "parity-evm"; path = "../target/release/parity-evm"; sourceTree = "<group>"; };
84CF92B5200E56AE00AD6E78 /* ethkey */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethkey; path = ../target/release/ethkey; sourceTree = "<group>"; };
0AED4D9F1E3E22F800BF87C0 /* ethstore */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethstore; path = ../artifacts/ethstore; sourceTree = "<group>"; };
84CF92B2200E559900AD6E78 /* parity-evm */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = "parity-evm"; path = "../artifacts/parity-evm"; sourceTree = "<group>"; };
84CF92B5200E56AE00AD6E78 /* ethkey */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = ethkey; path = ../artifacts/ethkey; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */

View File

@@ -626,7 +626,7 @@
<key>BUILD_PATH</key>
<dict>
<key>PATH</key>
<string>../target/release</string>
<string>..</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>

View File

@@ -88,10 +88,10 @@ section "install"
!insertmacro TerminateApp
# Files added here should be removed by the uninstaller (see section "uninstall")
file /oname=parity.exe ..\target\x86_64-pc-windows-msvc\release\parity.exe
file /oname=parity-evm.exe ..\target\x86_64-pc-windows-msvc\release\parity-evm.exe
file /oname=ethstore.exe ..\target\x86_64-pc-windows-msvc\release\ethstore.exe
file /oname=ethkey.exe ..\target\x86_64-pc-windows-msvc\release\ethkey.exe
file /oname=parity.exe ..\artifacts\parity.exe
file /oname=parity-evm.exe ..\artifacts\parity-evm.exe
file /oname=ethstore.exe ..\artifacts\ethstore.exe
file /oname=ethkey.exe ..\artifacts\ethkey.exe
file /oname=ptray.exe ..\windows\ptray\x64\Release\ptray.exe
file "logo.ico"

View File

@@ -1,34 +0,0 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
rm -rf deb
#create DEBIAN files
mkdir -p deb/usr/bin/
mkdir -p deb/DEBIAN
#create copyright, docs, compat
cp LICENSE deb/DEBIAN/copyright
echo "https://github.com/paritytech/parity/wiki" >> deb/DEBIAN/docs
echo "8" >> deb/DEBIAN/compat
#create control file
control=deb/DEBIAN/control
echo "Package: parity" >> $control
version=`grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n"`
echo "Version: $version" >> $control
echo "Source: parity" >> $control
echo "Section: science" >> $control
echo "Priority: extra" >> $control
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control
echo "Build-Depends: debhelper (>=9)" >> $control
echo "Standards-Version: 3.9.5" >> $control
echo "Homepage: https://parity.io" >> $control
echo "Vcs-Git: git://github.com/paritytech/parity.git" >> $control
echo "Vcs-Browser: https://github.com/paritytech/parity" >> $control
echo "Architecture: $1" >> $control
echo "Depends: libssl1.0.0 (>=1.0.0)" >> $control
echo "Description: Ethereum network client by Parity Technologies" >> $control
size=`du deb/|awk 'END {print $1}'`
echo "Installed-Size: $size" >> $control
#build .deb package
exit

View File

@@ -1,7 +0,0 @@
#!/bin/bash
cd docker/hub
DOCKER_BUILD_TAG=$1
echo "Docker build tag: " $DOCKER_BUILD_TAG
docker build --build-arg BUILD_TAG=$DOCKER_BUILD_TAG --no-cache=true --tag parity/parity:$DOCKER_BUILD_TAG .
docker run -it parity/parity:$DOCKER_BUILD_TAG -v
docker push parity/parity:$DOCKER_BUILD_TAG

View File

@@ -1,47 +0,0 @@
#!/bin/bash
#ARGUMENT test for RUST and COVERAGE
set -e # fail on any error
set -u # treat unset variables as error
if [[ "$CI_COMMIT_REF_NAME" = "master" || "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
export GIT_COMPARE=$CI_COMMIT_REF_NAME~;
else
export GIT_COMPARE=master;
fi
git fetch -a
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ -e ^docs/ | wc -l)"
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
TEST_SWITCH=$1
rust_test () {
git submodule update --init --recursive
rustup show
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
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
}
coverage_test () {
git submodule update --init --recursive
rm -rf target/*
scripts/cov.sh
}
case $TEST_SWITCH in
stable )
rustup default stable
rust_test
;;
beta)
rustup default beta
rust_test
;;
nightly)
rustup default nightly
rust_test
;;
test-coverage)
coverage_test
;;
esac

32
scripts/gitlab/build-unix.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
echo "__________Show ENVIROMENT__________"
echo "CC: " $CC
echo "CXX: " $CXX
echo "__________CARGO CONFIG__________"
rm -rf .cargo
mkdir -p .cargo
echo "[target.$CARGO_TARGET]" >> .cargo/config
echo "linker= \"$CC\"" >> .cargo/config
cat .cargo/config
echo "_____ Building target: "$CARGO_TARGET" _____"
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 ethstore-cli
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
echo "_____ Post-processing binaries _____"
rm -rf artifacts
mkdir -p artifacts
cd artifacts
cp ../target/$CARGO_TARGET/release/{parity,parity-evm,ethstore,ethkey} .
strip -v ./*
echo "_____ Calculating checksums _____"
for binary in $(ls)
do
rhash --sha256 $binary -o $binary.sha256
done

25
scripts/gitlab/build-windows.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs2015\VC\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"
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
echo "_____ Building _____"
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 ethstore-cli
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
echo "_____ Post-processing binaries _____"
rm -rf artifacts
mkdir -p artifacts
cd artifacts
cp --verbose ../target/$CARGO_TARGET/release/{parity,parity-evm,ethstore,ethkey}.exe .
echo "_____ Calculating checksums _____"
for binary in $(ls)
do
rhash --sha256 $binary -o $binary.unsigned.sha256
done

View File

@@ -1,7 +1,5 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
#ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
BUILD_PLATFORM=$1
PLATFORM=$2
@@ -20,6 +18,7 @@ echo "Architecture: " $ARC
echo "Libssl version: " $LIBSSL
echo "Parity version: " $VER
echo "Branch: " $CI_BUILD_REF_NAME
echo "Protect? " $protect
echo "--------------------"
# NOTE for md5 and sha256 we want to display filename as well
@@ -28,7 +27,7 @@ MD5_BIN="rhash --md5"
SHA256_BIN="rhash --sha256"
set_env () {
echo "Set ENVIROMENT"
echo "__________Set ENVIROMENT__________"
export HOST_CC=gcc
export HOST_CXX=g++
rm -rf .cargo
@@ -48,42 +47,31 @@ set_env_win () {
echo "@ signtool sign /f "\%"1 /p "\%"2 /tr http://timestamp.comodoca.com /du https://parity.io "\%"3" > sign.cmd
}
build () {
if [[ "windows" = $IDENT ]]
then
# This is a nasty hack till we figure out the proper cargo caching strategy
echo "Remove index"
rm -rf cargo/registry/index/*.
fi
echo "Build parity:"
cargo build --target $PLATFORM --features final --release
echo "Build evmbin:"
cargo build --target $PLATFORM --release -p evmbin
echo "Build ethstore-cli:"
cargo build --target $PLATFORM --release -p ethstore-cli
echo "Build ethkey-cli:"
cargo build --target $PLATFORM --release -p ethkey-cli
echo "Build whisper-cli:"
cargo build --target $PLATFORM --release -p whisper-cli
echo "__________Build parity__________"
time cargo build --target $PLATFORM --features final --release
echo "__________Build evmbin__________"
time cargo build --target $PLATFORM --release -p evmbin
echo "__________Build ethstore-cli__________"
time cargo build --target $PLATFORM --release -p ethstore-cli
echo "__________Build ethkey-cli__________"
time cargo build --target $PLATFORM --release -p ethkey-cli
}
strip_binaries () {
echo "Strip binaries:"
echo "__________Strip binaries__________"
$STRIP_BIN -v target/$PLATFORM/release/parity
$STRIP_BIN -v target/$PLATFORM/release/parity-evm
$STRIP_BIN -v target/$PLATFORM/release/ethstore
$STRIP_BIN -v target/$PLATFORM/release/ethkey
$STRIP_BIN -v target/$PLATFORM/release/whisper;
$STRIP_BIN -v target/$PLATFORM/release/ethkey;
}
calculate_checksums () {
echo "Checksum calculation:"
echo "__________Checksum calculation__________"
rhash --version
rm -rf *.md5
rm -rf *.sha256
BIN="target/$PLATFORM/release/parity$S3WIN"
export SHA3="$($BIN tools hash $BIN)"
echo "Parity file SHA3: $SHA3"
echo "__________Parity file SHA3__________"
echo $SHA3
$MD5_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.md5
$SHA256_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.sha256
$MD5_BIN target/$PLATFORM/release/parity-evm$S3WIN > parity-evm$S3WIN.md5
@@ -92,12 +80,10 @@ calculate_checksums () {
$SHA256_BIN target/$PLATFORM/release/ethstore$S3WIN > ethstore$S3WIN.sha256
$MD5_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.md5
$SHA256_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.sha256
$MD5_BIN target/$PLATFORM/release/whisper$S3WIN > whisper$S3WIN.md5
$SHA256_BIN target/$PLATFORM/release/whisper$S3WIN > whisper$S3WIN.sha256
}
make_deb () {
rm -rf deb
echo "create DEBIAN files"
echo "__________Create DEBIAN files__________"
mkdir -p deb/usr/bin/
mkdir -p deb/DEBIAN
echo "create copyright, docs, compat"
@@ -122,24 +108,23 @@ make_deb () {
echo "Description: Ethereum network client by Parity Technologies" >> $control
size=`du deb/|awk 'END {print $1}'`
echo "Installed-Size: $size" >> $control
echo "build .deb package"
echo "__________Build .deb package__________"
cp target/$PLATFORM/release/parity deb/usr/bin/parity
cp target/$PLATFORM/release/parity-evm deb/usr/bin/parity-evm
cp target/$PLATFORM/release/ethstore deb/usr/bin/ethstore
cp target/$PLATFORM/release/ethkey deb/usr/bin/ethkey
cp target/$PLATFORM/release/whisper deb/usr/bin/whisper
dpkg-deb -b deb "parity_"$VER"_"$IDENT"_"$ARC".deb"
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC".deb" > "parity_"$VER"_"$IDENT"_"$ARC".deb.md5"
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC".deb" > "parity_"$VER"_"$IDENT"_"$ARC".deb.sha256"
}
make_rpm () {
rm -rf /install
echo "__________Create RPM package__________"
mkdir -p /install/usr/bin
cp target/$PLATFORM/release/parity /install/usr/bin
cp target/$PLATFORM/release/parity-evm /install/usr/bin/parity-evm
cp target/$PLATFORM/release/ethstore /install/usr/bin/ethstore
cp target/$PLATFORM/release/ethkey /install/usr/bin/ethkey
cp target/$PLATFORM/release/whisper /install/usr/bin/whisper
rm -rf "parity-"$VER"-1."$ARC".rpm" || true
fpm -s dir -t rpm -n parity -v $VER --epoch 1 --license GPLv3 -d openssl --provides parity --url https://parity.io --vendor "Parity Technologies" -a x86_64 -m "<devops@parity.io>" --description "Ethereum network client by Parity Technologies" -C /install/
@@ -148,12 +133,11 @@ make_rpm () {
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC".rpm" > "parity_"$VER"_"$IDENT"_"$ARC".rpm.sha256"
}
make_pkg () {
echo "make PKG"
echo "__________Make OSX PKG__________"
cp target/$PLATFORM/release/parity target/release/parity
cp target/$PLATFORM/release/parity-evm target/release/parity-evm
cp target/$PLATFORM/release/ethstore target/release/ethstore
cp target/$PLATFORM/release/ethkey target/release/ethkey
cp target/$PLATFORM/release/whisper target/release/whisper
cd mac
xcodebuild -configuration Release
cd ..
@@ -164,11 +148,13 @@ make_pkg () {
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT >> "parity_"$VER"_"$IDENT"_"$ARC".pkg.sha256"
}
sign_exe () {
if [[ -z "$protect" ]]; then echo "__________Skipping sign binaries__________"&&return; fi
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe"
./sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe
}
make_exe () {
./msbuild.cmd
./sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe
sign_exe
cd nsis
curl -sL --url "https://github.com/paritytech/win-build/raw/master/vc_redist.x64.exe" -o vc_redist.x64.exe
echo "makensis.exe installer.nsi" > nsis.cmd
@@ -179,8 +165,71 @@ make_exe () {
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"
}
push_snap () {
if [[ -z "$protect" ]]; then echo "__________Skipping push and release snap__________"&&return; fi
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"_"$ARC".snap" >> push.log
cat push.log
REVISION="$(grep -m 1 "Revision " push.log | awk '{print $2}')"
echo "__________Revision__________"
echo $REVISION
sleep 120
if [[ "$CI_BUILD_REF_NAME" = "beta" || "$VER" == *1.9* ]];
then
snapcraft release parity_"$VER"_"$ARC".snap $REVISION beta
snapcraft release parity_"$VER"_"$ARC".snap $REVISION candidate;
fi
if [[ "$CI_BUILD_REF_NAME" = "nightly" ]];
then
snapcraft release parity_"$VER"_"$ARC".snap $REVISION edge;
fi
if [[ "$CI_BUILD_REF_NAME" = "beta" || "$VER" == *1.8* ]];
then
snapcraft release parity_"$VER"_"$ARC".snap $REVISION stable;
fi
snapcraft status parity
snapcraft logout
}
make_snap () {
export HOST_CC=gcc
export HOST_CXX=g++
apt install -y expect zip rhash
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" = "beta" || "$VER" == *1.9* ]];
then
sed -i -e 's/grade: devel/grade: stable/' snap/snapcraft.yaml;
fi
if [[ "$ARC" = "i386" ]];
then
export ARCH=i686&&ln -s /usr/bin/gcc /usr/bin/i386-linux-gnu-gcc;
fi
mv -f snap/snapcraft.yaml snapcraft.yaml
snapcraft --target-arch=$ARC -d
echo "__________Build comlete__________"
push_snap
echo "__________Checksum calculation__________"
$MD5_BIN "parity_"$VER"_"$ARC".snap" > "parity_"$VER"_"$ARC".snap.md5"
$SHA256_BIN "parity_"$VER"_"$ARC".snap" > "parity_"$VER"_"$ARC".snap.sha256"
echo "__________Copy all artifacts to one place__________"
rm -rf artifacts
mkdir -p artifacts
cp "parity_"$VER"_"$ARC".snap" artifacts
cp "parity_"$VER"_"$ARC".snap.md5" artifacts
cp "parity_"$VER"_"$ARC".snap.sha256" artifacts
}
push_binaries () {
echo "Push binaries to AWS S3"
if [[ -z "$protect" ]]; then echo "__________Skipping push to S3__________"&&return; fi
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" = "master" || "$CI_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "nightly" ]];
@@ -202,54 +251,58 @@ push_binaries () {
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN --body target/$PLATFORM/release/ethkey$S3WIN
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.md5 --body ethkey$S3WIN.md5
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.sha256 --body ethkey$S3WIN.sha256
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN --body target/$PLATFORM/release/whisper$S3WIN
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN.md5 --body whisper$S3WIN.md5
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN.sha256 --body whisper$S3WIN.sha256
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"
}
make_archive () {
echo "add artifacts to archive"
rm -rf parity.zip
zip -r parity.zip target/$PLATFORM/release/parity$S3WIN target/$PLATFORM/release/parity-evm$S3WIN target/$PLATFORM/release/ethstore$S3WIN target/$PLATFORM/release/ethkey$S3WIN target/$PLATFORM/release/whisper$S3WIN parity$S3WIN.md5 parity-evm$S3WIN.md5 ethstore$S3WIN.md5 ethkey$S3WIN.md5 whisper$S3WIN.md5 parity$S3WIN.sha256 parity-evm$S3WIN.sha256 ethstore$S3WIN.sha256 ethkey$S3WIN.sha256 whisper$S3WIN.sha256
prepare_artifacts () {
echo "__________Copy all artifacts to one place__________"
rm -rf artifacts
mkdir -p artifacts
cp target/$PLATFORM/release/parity$S3WIN artifacts
cp target/$PLATFORM/release/parity-evm$S3WIN artifacts
cp target/$PLATFORM/release/ethstore$S3WIN artifacts
cp target/$PLATFORM/release/ethkey$S3WIN parity$S3WIN.md5 artifacts
cp parity-evm$S3WIN.md5 ethstore$S3WIN.md5 artifacts
cp ethkey$S3WIN.md5 artifacts
cp parity$S3WIN.sha256 artifacts
cp parity-evm$S3WIN.sha256 artifacts
cp ethstore$S3WIN.sha256 artifacts
cp ethkey$S3WIN.sha256 artifacts
}
updater_push_release () {
echo "push release"
echo "__________Build comlete__________"
if [[ -z "$protect" ]]; then echo "__________Skipping push release__________"&&return; fi
echo "__________Push release___________"
DATA="commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity$S3WIN&secret=$RELEASES_SECRET"
# Mainnet
source scripts/safe_curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$BUILD_PLATFORM"
# Kovan
source scripts/safe_curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$BUILD_PLATFORM"
}
build_and_push () {
build
strip_binaries
calculate_checksums
make_deb
prepare_artifacts
push_binaries
updater_push_release
}
case $BUILD_PLATFORM in
x86_64-unknown-linux-gnu)
#set strip bin
STRIP_BIN="strip"
#package extention
EXT="deb"
build
strip_binaries
calculate_checksums
make_deb
make_archive
push_binaries
updater_push_release
build_and_push
;;
x86_64-unknown-debian-gnu)
STRIP_BIN="strip"
EXT="deb"
LIBSSL="libssl1.1 (>=1.1.0)"
echo "Use libssl1.1 (>=1.1.0) for Debian builds"
build
strip_binaries
calculate_checksums
make_deb
make_archive
push_binaries
echo "__________Use libssl1.1 (>=1.1.0) for Debian builds__________"
build_and_push
;;
x86_64-unknown-centos-gnu)
STRIP_BIN="strip"
@@ -258,52 +311,33 @@ case $BUILD_PLATFORM in
strip_binaries
calculate_checksums
make_rpm
make_archive
prepare_artifacts
push_binaries
updater_push_release
;;
i686-unknown-linux-gnu)
STRIP_BIN="strip"
EXT="deb"
set_env
build
strip_binaries
calculate_checksums
make_deb
make_archive
push_binaries
build_and_push
;;
armv7-unknown-linux-gnueabihf)
STRIP_BIN="arm-linux-gnueabihf-strip"
EXT="deb"
set_env
build
strip_binaries
calculate_checksums
make_deb
make_archive
push_binaries
build_and_push
;;
arm-unknown-linux-gnueabihf)
STRIP_BIN="arm-linux-gnueabihf-strip"
EXT="deb"
set_env
build
strip_binaries
calculate_checksums
make_deb
make_archive
push_binaries
build_and_push
;;
aarch64-unknown-linux-gnu)
STRIP_BIN="aarch64-linux-gnu-strip"
EXT="deb"
set_env
build
strip_binaries
calculate_checksums
make_deb
make_archive
push_binaries
build_and_push
;;
x86_64-apple-darwin)
STRIP_BIN="strip"
@@ -313,41 +347,22 @@ case $BUILD_PLATFORM in
strip_binaries
calculate_checksums
make_pkg
make_archive
prepare_artifacts
push_binaries
updater_push_release
;;
x86_64-unknown-snap-gnu)
ARC="amd64"
EXT="snap"
apt update
apt install -y expect zip rhash
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" = "beta" || "$VER" == *1.11* ]];
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
$MD5_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5"
$SHA256_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.sha256"
echo "add artifacts to archive"
rm -rf parity.zip
zip -r parity.zip "parity_"$VER"_amd64.snap" "parity_"$VER"_amd64.snap.md5" "parity_"$VER"_amd64.snap.sha256"
make_snap
;;
i686-unknown-snap-gnu)
set_env
make_snap
;;
arm64-unknown-snap-gnu)
make_snap
;;
armhf-unknown-snap-gnu)
make_snap
;;
x86_64-pc-windows-msvc)
set_env_win
@@ -357,7 +372,7 @@ case $BUILD_PLATFORM in
sign_exe
calculate_checksums
make_exe
make_archive
prepare_artifacts
push_binaries
updater_push_release
esac

7
scripts/gitlab/clippy.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 install clippy
cargo clippy -- -D warnings

23
scripts/gitlab/coverage.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -x
git submodule update --init --recursive
rm -rf target/*
cargo test --all --exclude evmjit --no-run || exit $?
KCOV_TARGET="target/cov"
KCOV_FLAGS="--verify"
EXCLUDE="/usr/lib,/usr/include,$HOME/.cargo,$HOME/.multirust,rocksdb,secp256k1"
mkdir -p $KCOV_TARGET
echo "__________Cover RUST___________"
for FILE in `find target/debug/deps ! -name "*.*"`
do
timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE
done
timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
echo "Cover JS"
cd ../../js
npm install&&npm run test:coverage
cd ..
bash <(curl -s https://codecov.io/bash)&&
echo "Uploaded code coverage"
exit 0

View File

@@ -0,0 +1,8 @@
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."

1
scripts/gitlab/msbuild.cmd Executable file
View File

@@ -0,0 +1 @@
MsBuild.exe windows\ptray\ptray.vcxproj /p:Platform=x64 /p:Configuration=Release

19
scripts/gitlab/package-macos.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
OSX_PACKAGE="parity_"$VERSION"_macos_x86_64.pkg"
echo "__________Create MacOS package__________"
cd mac
xcodebuild -configuration Release
cd ..
packagesbuild -v mac/Parity.pkgproj
echo "__________Sign Package__________"
find . -name \*.pkg
productsign --sign 'Developer ID Installer: PARITY TECHNOLOGIES LIMITED (P2PX3JU8FT)' Parity\ Ethereum.pkg $OSX_PACKAGE
echo "__________Move package to artifacts__________"
mkdir -p packages
mv -v $OSX_PACKAGE packages/$OSX_PACKAGE
cd packages
echo "_____ Calculating checksums _____"
rhash --sha256 "parity_"$VERSION"_macos_x86_64.pkg" >> "parity_"$VERSION"_macos_x86_64.pkg.sha256"

25
scripts/gitlab/package-snap.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
case ${CI_COMMIT_REF_NAME} in
master|*v1.12*|gitlab-next) export GRADE="devel";;
beta|*v1.11*) export GRADE="stable";;
stable|*v1.10*) 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
snapcraft clean
echo $VERSION:$GRADE:$BUILD_ARCH
cat scripts/gitlab/templates/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH' > snapcraft.yaml
cat snapcraft.yaml
snapcraft --target-arch=$BUILD_ARCH
ls *.snap
echo "__________Post-processing snap package__________"
mkdir -p packages
mv -v $SNAP_PACKAGE "packages/"$SNAP_PACKAGE
echo "_____ Calculating checksums _____"
cd packages
rhash --sha256 $SNAP_PACKAGE -o $SNAP_PACKAGE".sha256"

35
scripts/gitlab/package-unix.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
rm -rf /install
mkdir -p packages
echo "__________Create "$PKG" package__________"
PACKAGE="parity_"$VERSION"_"$IDENT"_"$BUILD_ARCH"."$PKG
mkdir -p /install/usr/bin
cp artifacts/parity /install/usr/bin
cp artifacts/parity-evm /install/usr/bin/parity-evm
cp artifacts/ethstore /install/usr/bin/ethstore
cp artifacts/ethkey /install/usr/bin/ethkey
cp scripts/gitlab/uninstall-parity.sh /install/usr/bin/uninstall-parity.sh
fpm --input-type dir \
--output-type $PKG \
--name parity \
--version $VERSION \
--license GPLv3 \
--depends "$LIBSSL" \
--provides parity \
--url https://parity.io \
--vendor "Parity Technologies" \
--architecture $BUILD_ARCH \
--maintainer "<devops@parity.io>" \
--description "Ethereum network client by Parity Technologies" \
--before-install scripts/gitlab/install-readme.sh \
--before-upgrade scripts/gitlab/uninstall-parity.sh \
--after-remove scripts/gitlab/uninstall-parity.sh \
-C /install \
-p packages/$PACKAGE
echo "_____ Calculating checksums _____"
cd packages
rhash --sha256 $PACKAGE > $PACKAGE".sha256"

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
VERSION=$(grep -m 1 "version =" Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")
echo "__________Create Windows package__________"
scripts/gitlab/msbuild.cmd
echo "__________Sign binaries__________"
scripts/gitlab/sign.cmd $keyfile $certpass artifacts/parity.exe
scripts/gitlab/sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe
echo "__________Create Windows installer__________"
cd nsis
curl -sL --url "https://github.com/paritytech/win-build/raw/master/vc_redist.x64.exe" -o vc_redist.x64.exe
echo "makensis.exe installer.nsi" > nsis.cmd
./nsis.cmd
cd ..
echo "__________Move package to artifacts__________"
mkdir -p packages
cp nsis/installer.exe packages/"parity_"$VERSION"_windows_x86_64.exe"
echo "__________Sign installer__________"
scripts/gitlab/sign.cmd $keyfile $certpass packages/"parity_"$VERSION"_windows_x86_64.exe"
echo "_____ Calculating checksums _____"
cd packages
for binary in $(ls)
do
rhash --sha256 $binary -o $binary.sha256
done

View File

@@ -0,0 +1,22 @@
#!/bin/bash
##ARGUMENTS: 1. Docker target
set -e # fail on any error
set -u # treat unset variables as error
if [ "$CI_COMMIT_REF_NAME" == "beta" ];
then export DOCKER_BUILD_TAG="latest";
else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME;
fi
docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
echo "__________Docker TAG__________"
echo $DOCKER_BUILD_TAG
echo "__________Docker target__________"
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 push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG
docker logout

18
scripts/gitlab/publish-snap.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
case ${CI_COMMIT_REF_NAME} in
master|*v1.12*|gitlab-next) export CHANNEL="edge";;
beta|*v1.11*) export CHANNEL="beta";;
stable|*v1.10*) 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 "packages/parity_"$VERSION"_"$BUILD_ARCH".snap"
snapcraft status parity
snapcraft logout

25
scripts/gitlab/push-binaries.sh Executable file
View File

@@ -0,0 +1,25 @@
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" = "master" || "$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 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/$BUILD_PLATFORM
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN --body target/$PLATFORM/release/parity$S3WIN
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN.md5 --body parity$S3WIN.md5
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN.sha256 --body parity$S3WIN.sha256
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN --body target/$PLATFORM/release/parity-evm$S3WIN
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN.md5 --body parity-evm$S3WIN.md5
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN.sha256 --body parity-evm$S3WIN.sha256
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN --body target/$PLATFORM/release/ethstore$S3WIN
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN.md5 --body ethstore$S3WIN.md5
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN.sha256 --body ethstore$S3WIN.sha256
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN --body target/$PLATFORM/release/ethkey$S3WIN
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.md5 --body ethkey$S3WIN.md5
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.sha256 --body ethkey$S3WIN.sha256
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"

38
scripts/gitlab/push-github.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
echo "__________Set ENVIROMENT__________"
DOWNLOAD_PREFIX="https://github.com/paritytech/parity/releases/download/"$CI_COMMIT_REF_NAME"/"
DESCRIPTION="$(cat CHANGELOG.md)"
RELEASE_TABLE="$(cat scripts/gitlab/templates/release-table.md)"
RELEASE_TABLE="$(echo "${RELEASE_TABLE//\$VERSION/${VERSION}}")"
RELEASE_TABLE="$(echo "${RELEASE_TABLE//\$DOWNLOAD_PREFIX/${DOWNLOAD_PREFIX}}")"
#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
master|*v1.12*|nightly) NAME="Parity "$VERSION" nightly";;
beta|*v1.11*) NAME="Parity "$VERSION" beta";;
stable|*v1.10*) NAME="Parity "$VERSION" stable";;
*) echo "No release" exit 0;;
esac
cd packages
i=1
for binary in $(ls *.sha256)
do
sha256=$(cat $binary | awk '{ print $1}' )
RELEASE_TABLE="$(echo "${RELEASE_TABLE/sha${i}/${sha256}}")"
let ++i
done
#do not touch the following 3 lines. Features of output in Markdown
DESCRIPTION="$(echo "${DESCRIPTION/${REPLACE_TEXT}/${RELEASE_TABLE}
${REPLACE_TEXT}}")"
echo "__________Create release to Github____________"
github-release release --user "$GITHUB_USER" --repo parity --tag "$CI_COMMIT_REF_NAME" --draft --name "$NAME" --description "$DESCRIPTION"
echo "__________Upload files to Github____________"
for binary in $(ls -I "*.sha256")
do
github-release upload --user "$GITHUB_USER" --repo parity --tag "$CI_COMMIT_REF_NAME" --replace --name "$binary" --file $binary
done

7
scripts/gitlab/rustfmt.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 install rustfmt-nightly
cargo fmt -- --write-mode=diff

1
scripts/gitlab/sign.cmd Executable file
View File

@@ -0,0 +1 @@
@signtool sign /f %1 /p %2 /tr http://timestamp.comodoca.com /du https://parity.io %3

View File

@@ -0,0 +1,16 @@
| OS | Arch | Download | SHA256 Checksum |
|:---:|:---:|:---|:---|
| <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;"/> | x64 | [parity_$VERSION_centos_x86_64.rpm]($DOWNLOAD_PREFIXparity_$VERSION_centos_x86_64.rpm) | <sup>`sha1`</sup> |
| <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;"/> | x64 | [parity_$VERSION_debian_amd64.deb]($DOWNLOAD_PREFIXx86_64-unknown-debian-gnu/parity_$VERSION_debian_amd64.deb) | <sup>`sha2`</sup> |
| <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;"/> | x64 | [parity_$VERSION_macos_macos.pkg]($DOWNLOAD_PREFIXx86_64-apple-darwin/parity_$VERSION_macos_macos.pkg) | <sup>`sha3`</sup> |
| <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;"/> | x64 | [parity_$VERSION_ubuntu_amd64.deb]($DOWNLOAD_PREFIXx86_64-unknown-linux-gnu/parity_$VERSION_ubuntu_amd64.deb) | <sup>`sha4`</sup> |
| <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;"/> | arm64 | [parity_$VERSION_ubuntu_arm64.deb]($DOWNLOAD_PREFIXaarch64-unknown-linux-gnu/parity_$VERSION_ubuntu_arm64.deb) | <sup>`sha5`</sup> |
| <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;"/> | armv7 | [parity_$VERSION_ubuntu_armhf.deb]($DOWNLOAD_PREFIXarmv7-unknown-linux-gnueabihf/parity_$VERSION_ubuntu_armhf.deb) | <sup>`sha6`</sup> |
| <img src="https://gist.github.com/5chdn/1fce888fde1d773761f809b607757f76/raw/44c4f0fc63f1ea8e61a9513af5131ef65eaa6c75/windows.png" alt="Windows Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect" style="width: 32px;"/> | x64 | [parity_$VERSION_windows_x86_64.exe]($DOWNLOAD_PREFIXx86_64-pc-windows-msvc/parity_$VERSION_windows_x86_64.exe) | <sup>`sha7`</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

@@ -0,0 +1,54 @@
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]
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
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
stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6]
df:
plugin: nil
stage-packages: [coreutils]
stage: [bin/df]

10
scripts/gitlab/test-qemu.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
##ARGUMENTS: 1. Docker target
set -e # fail on any error
set -u # treat unset variables as error
docker pull parity/rust-qemu:armhf
echo "Test wasmi on armhf"
docker run -it --rm -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static parity/rust-qemu:armhf \
bash `git clone https://github.com/paritytech/parity.git&&\
cd parity&&./test.sh&&cd ..&&rm -rf parity/`

28
scripts/gitlab/test.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# ARGUMENT $1 Rust flavor to test with (stable/beta/nightly)
set -e # fail on any error
set -u # treat unset variables as error
rustup default $1
if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
export GIT_COMPARE=$CI_COMMIT_REF_NAME~;
else
export GIT_COMPARE=master;
fi
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | wc -l)"
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
git submodule update --init --recursive
rustup show
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
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

View File

@@ -0,0 +1,4 @@
#!/bin/bash
sudo killall -9 parity && sleep 5
sudo rm -f /usr/bin/parity /usr/bin/uninstall-parity.sh /usr/bin/ethstore /usr/bin/ethkey /usr/bin/parity-evm

View File

@@ -1,39 +0,0 @@
name: parity
version: git
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: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland]
desktop: usr/share/applications/parity.desktop
icon: snap/gui/icon.png
parts:
desktop-icon:
source: ./snap
plugin: nil
prepare: |
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: .
plugin: rust
build-attributes: [no-system-libraries]
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6]
df:
plugin: nil
stage-packages: [coreutils]
stage: [bin/df]