clean .gitlab.yml and 2 scripts for test and build: gitlab-build.sh & gitlab-test.sh

This commit is contained in:
Denis S. Soldatov aka General-Beck 2018-01-10 11:44:36 +03:00
parent 0b91bd4b11
commit fff6e037ab
3 changed files with 24 additions and 71 deletions

View File

@ -4,14 +4,11 @@ stages:
- push-release
- build
variables:
SIMPLECOV: "true"
RUST_BACKTRACE: "1"
RUSTFLAGS: ""
CARGOFLAGS: ""
CI_SERVER_NAME: "GitLab CI"
LIBSSL: "libssl1.0.0 (>=1.0.0)"
CC: gcc
CXX: g++
cache:
key: "$CI_BUILD_STAGE/$CI_BUILD_REF_NAME"
untracked: true
@ -26,7 +23,7 @@ linux-stable:
script:
- rustup default stable
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 "" ""
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++
tags:
- rust-stable
artifacts:
@ -43,47 +40,13 @@ linux-stable-debian:
- triggers
script:
- export LIBSSL="libssl1.1.0 (>=1.1.0)"
- scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 "" ""
- scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++
tags:
- rust-debian
artifacts:
paths:
- parity.zip
name: "stable-x86_64-unknown-debian-gnu_parity"
linux-beta:
stage: build
image: parity/rust:gitlab-ci
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh rust-beta x86_64-unknown-linux-gnu "" "" ""
tags:
- rust-beta
artifacts:
paths:
- parity.zip
name: "beta-x86_64-unknown-linux-gnu_parity"
allow_failure: true
linux-nightly:
stage: build
image: parity/rust:gitlab-ci
only:
- beta
- tags
- stable
- triggers
script:
- scripts/gitlab-build.sh rust-nightly x86_64-unknown-linux-gnu "" "" ""
tags:
- rust-nightly
artifacts:
paths:
- parity.zip
name: "nigthly-x86_64-unknown-linux-gnu_parity"
allow_failure: true
linux-centos:
stage: build
image: parity/rust-centos:gitlab-ci
@ -93,7 +56,7 @@ linux-centos:
- stable
- triggers
script:
- scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu "" "" ""
- scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu amd64 gcc g++
tags:
- rust-centos
artifacts:
@ -109,7 +72,7 @@ linux-i686:
- stable
- triggers
script:
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 "" ""
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++
tags:
- rust-i686
artifacts:
@ -168,13 +131,12 @@ linux-snap:
stage: build
image: parity/snapcraft:gitlab-ci
only:
- snap
- stable
- beta
- tags
- triggers
script:
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu "" "" "" ""
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++
tags:
- rust-stable
artifacts:
@ -190,7 +152,7 @@ darwin:
- stable
- triggers
script:
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos "" ""
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++
tags:
- osx
artifacts:
@ -208,7 +170,7 @@ windows:
- stable
- triggers
script:
- scripts/gitlab-build.sh x86_64-pc-windows-msvc "" "" "" "" ""
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc "" "" "" "" ""
tags:
- rust-windows
artifacts:

View File

@ -8,7 +8,6 @@ PLATFORM=$2
ARC=$3
CC=$4
CXX=$5
EXT=deb
VER="$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")"
echo "--------------------"
echo "Build for platform: " $BUILD_PLATFORM
@ -16,19 +15,14 @@ echo "Cargo target: " $PLATFORM
echo "CC&CXX flags: " $CC ", " $CXX
echo "Architecture: " $ARC
echo "Libssl version: " $LIBSSL
echo "Package: " $EXT
echo "Parity version: " $VER
echo "Branch: " $CI_BUILD_REF_NAME
echo "--------------------"
echo "RUST:" rustup show
echo "Cargo:" cargo -V
echo "NODEJS:" nodejs -v
echo "NPM:" npm -v
set_env () {
echo "Set ENVIROMENT"
HOST_CC=gcc
HOST_CXX=g++
export HOST_CC=gcc
export HOST_CXX=g++
rm -rf .cargo
mkdir -p .cargo
echo "[target.$PLATFORM]" >> .cargo/config
@ -51,7 +45,7 @@ build () {
$STRIP_BIN -v target/$PLATFORM/release/ethkey
echo "Checksum calculation:"
rm -rf *.md5
export SHA3=$(target/$PLATFORM/release/parity tools hash target/$PLATFORM/release/parity)
export SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity -p %h)
echo "Parity file SHA3:" $SHA3
md5sum target/$PLATFORM/release/parity > parity.md5
md5sum target/$PLATFORM/release/parity-evm > parity-evm.md5
@ -95,12 +89,13 @@ make_deb () {
}
make_pkg () {
echo "make PKG"
cp target/$PLATFORM/release/parity target/release/parity
cd mac
xcodebuild -configuration Release
cd ..
packagesbuild -v mac/Parity.pkgproj
productsign --sign 'Developer ID Installer: PARITY TECHNOLOGIES LIMITED (P2PX3JU8FT)' target/$PLATFORM/release/Parity\ Ethereum.pkg target/$PLATFORM/release/Parity\ Ethereum-signed.pkg
mv target/$PLATFORM/release/Parity\ Ethereum-signed.pkg "parity-"$VER"_"$ARC".pkg"
productsign --sign 'Developer ID Installer: PARITY TECHNOLOGIES LIMITED (P2PX3JU8FT)' target/release/Parity\ Ethereum.pkg target/release/Parity\ Ethereum-signed.pkg
mv target/release/Parity\ Ethereum-signed.pkg "parity-"$VER"_"$ARC".pkg"
md5sum "parity-"$VER"_"$ARC"."$EXT >> "parity-"$VER"_"$ARC".pkg.md5"
}
push_binaries () {
@ -188,6 +183,8 @@ case $BUILD_PLATFORM in
x86_64-unknown-linux-gnu)
#set strip bin
STRIP_BIN="strip"
#package extention
EXT="deb"
build
make_deb
make_archive
@ -196,7 +193,8 @@ case $BUILD_PLATFORM in
;;
x86_64-unknown-debian-gnu)
STRIP_BIN="strip"
LIBSSL: "libssl1.1.0 (>=1.1.0)"
EXT="deb"
LIBSSL="libssl1.1.0 (>=1.1.0)"
echo "Use libssl1.1.0 (>=1.1.0) for Debian builds"
build
make_deb
@ -206,6 +204,7 @@ case $BUILD_PLATFORM in
;;
x86_64-unknown-centos-gnu)
STRIP_BIN="strip"
EXT="deb"
build
make_archive
push_binaries
@ -213,6 +212,7 @@ case $BUILD_PLATFORM in
;;
i686-unknown-linux-gnu)
STRIP_BIN="strip"
EXT="deb"
set_env
build
make_deb
@ -222,6 +222,7 @@ case $BUILD_PLATFORM in
;;
armv7-unknown-linux-gnueabihf)
STRIP_BIN="arm-linux-gnueabihf-strip"
EXT="deb"
set_env
build
make_deb
@ -231,6 +232,7 @@ case $BUILD_PLATFORM in
;;
arm-unknown-linux-gnueabihf)
STRIP_BIN="arm-linux-gnueabihf-strip"
EXT="deb"
set_env
build
make_deb
@ -240,6 +242,7 @@ case $BUILD_PLATFORM in
;;
aarch64-unknown-linux-gnu)
STRIP_BIN="aarch64-linux-gnu-strip"
EXT="deb"
set_env
build
make_deb
@ -268,18 +271,6 @@ case $BUILD_PLATFORM in
md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5"
push_binaries
;;
rust_beta)
rustup default beta
export STRIP_BIN="strip"
build
make_archive
;;
rust_nightly)
rustup default nightly
export STRIP_BIN="strip"
build
make_archive
;;
x86_64-pc-windows-msvc)
windows
push_release

View File

@ -17,6 +17,6 @@ apps:
parts:
parity:
source: ..
source: .
plugin: rust
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]