clean .gitlab.yml and 2 scripts for test and build: gitlab-build.sh & gitlab-test.sh
This commit is contained in:
parent
0b91bd4b11
commit
fff6e037ab
@ -4,14 +4,11 @@ stages:
|
|||||||
- push-release
|
- push-release
|
||||||
- build
|
- build
|
||||||
variables:
|
variables:
|
||||||
SIMPLECOV: "true"
|
|
||||||
RUST_BACKTRACE: "1"
|
RUST_BACKTRACE: "1"
|
||||||
RUSTFLAGS: ""
|
RUSTFLAGS: ""
|
||||||
CARGOFLAGS: ""
|
CARGOFLAGS: ""
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
LIBSSL: "libssl1.0.0 (>=1.0.0)"
|
LIBSSL: "libssl1.0.0 (>=1.0.0)"
|
||||||
CC: gcc
|
|
||||||
CXX: g++
|
|
||||||
cache:
|
cache:
|
||||||
key: "$CI_BUILD_STAGE/$CI_BUILD_REF_NAME"
|
key: "$CI_BUILD_STAGE/$CI_BUILD_REF_NAME"
|
||||||
untracked: true
|
untracked: true
|
||||||
@ -26,7 +23,7 @@ linux-stable:
|
|||||||
script:
|
script:
|
||||||
- rustup default stable
|
- rustup default stable
|
||||||
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags
|
# 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:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -43,47 +40,13 @@ linux-stable-debian:
|
|||||||
- triggers
|
- triggers
|
||||||
script:
|
script:
|
||||||
- export LIBSSL="libssl1.1.0 (>=1.1.0)"
|
- 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:
|
tags:
|
||||||
- rust-debian
|
- rust-debian
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- parity.zip
|
- parity.zip
|
||||||
name: "stable-x86_64-unknown-debian-gnu_parity"
|
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:
|
linux-centos:
|
||||||
stage: build
|
stage: build
|
||||||
image: parity/rust-centos:gitlab-ci
|
image: parity/rust-centos:gitlab-ci
|
||||||
@ -93,7 +56,7 @@ linux-centos:
|
|||||||
- stable
|
- stable
|
||||||
- triggers
|
- triggers
|
||||||
script:
|
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:
|
tags:
|
||||||
- rust-centos
|
- rust-centos
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -109,7 +72,7 @@ linux-i686:
|
|||||||
- stable
|
- stable
|
||||||
- triggers
|
- triggers
|
||||||
script:
|
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:
|
tags:
|
||||||
- rust-i686
|
- rust-i686
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -168,13 +131,12 @@ linux-snap:
|
|||||||
stage: build
|
stage: build
|
||||||
image: parity/snapcraft:gitlab-ci
|
image: parity/snapcraft:gitlab-ci
|
||||||
only:
|
only:
|
||||||
- snap
|
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- tags
|
- tags
|
||||||
- triggers
|
- triggers
|
||||||
script:
|
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:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -190,7 +152,7 @@ darwin:
|
|||||||
- stable
|
- stable
|
||||||
- triggers
|
- triggers
|
||||||
script:
|
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:
|
tags:
|
||||||
- osx
|
- osx
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -208,7 +170,7 @@ windows:
|
|||||||
- stable
|
- stable
|
||||||
- triggers
|
- triggers
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab-build.sh x86_64-pc-windows-msvc "" "" "" "" ""
|
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc "" "" "" "" ""
|
||||||
tags:
|
tags:
|
||||||
- rust-windows
|
- rust-windows
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -8,7 +8,6 @@ PLATFORM=$2
|
|||||||
ARC=$3
|
ARC=$3
|
||||||
CC=$4
|
CC=$4
|
||||||
CXX=$5
|
CXX=$5
|
||||||
EXT=deb
|
|
||||||
VER="$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")"
|
VER="$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")"
|
||||||
echo "--------------------"
|
echo "--------------------"
|
||||||
echo "Build for platform: " $BUILD_PLATFORM
|
echo "Build for platform: " $BUILD_PLATFORM
|
||||||
@ -16,19 +15,14 @@ echo "Cargo target: " $PLATFORM
|
|||||||
echo "CC&CXX flags: " $CC ", " $CXX
|
echo "CC&CXX flags: " $CC ", " $CXX
|
||||||
echo "Architecture: " $ARC
|
echo "Architecture: " $ARC
|
||||||
echo "Libssl version: " $LIBSSL
|
echo "Libssl version: " $LIBSSL
|
||||||
echo "Package: " $EXT
|
|
||||||
echo "Parity version: " $VER
|
echo "Parity version: " $VER
|
||||||
echo "Branch: " $CI_BUILD_REF_NAME
|
echo "Branch: " $CI_BUILD_REF_NAME
|
||||||
echo "--------------------"
|
echo "--------------------"
|
||||||
echo "RUST:" rustup show
|
|
||||||
echo "Cargo:" cargo -V
|
|
||||||
echo "NODEJS:" nodejs -v
|
|
||||||
echo "NPM:" npm -v
|
|
||||||
|
|
||||||
set_env () {
|
set_env () {
|
||||||
echo "Set ENVIROMENT"
|
echo "Set ENVIROMENT"
|
||||||
HOST_CC=gcc
|
export HOST_CC=gcc
|
||||||
HOST_CXX=g++
|
export HOST_CXX=g++
|
||||||
rm -rf .cargo
|
rm -rf .cargo
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
echo "[target.$PLATFORM]" >> .cargo/config
|
echo "[target.$PLATFORM]" >> .cargo/config
|
||||||
@ -51,7 +45,7 @@ build () {
|
|||||||
$STRIP_BIN -v target/$PLATFORM/release/ethkey
|
$STRIP_BIN -v target/$PLATFORM/release/ethkey
|
||||||
echo "Checksum calculation:"
|
echo "Checksum calculation:"
|
||||||
rm -rf *.md5
|
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
|
echo "Parity file SHA3:" $SHA3
|
||||||
md5sum target/$PLATFORM/release/parity > parity.md5
|
md5sum target/$PLATFORM/release/parity > parity.md5
|
||||||
md5sum target/$PLATFORM/release/parity-evm > parity-evm.md5
|
md5sum target/$PLATFORM/release/parity-evm > parity-evm.md5
|
||||||
@ -95,12 +89,13 @@ make_deb () {
|
|||||||
}
|
}
|
||||||
make_pkg () {
|
make_pkg () {
|
||||||
echo "make PKG"
|
echo "make PKG"
|
||||||
|
cp target/$PLATFORM/release/parity target/release/parity
|
||||||
cd mac
|
cd mac
|
||||||
xcodebuild -configuration Release
|
xcodebuild -configuration Release
|
||||||
cd ..
|
cd ..
|
||||||
packagesbuild -v mac/Parity.pkgproj
|
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
|
productsign --sign 'Developer ID Installer: PARITY TECHNOLOGIES LIMITED (P2PX3JU8FT)' target/release/Parity\ Ethereum.pkg target/release/Parity\ Ethereum-signed.pkg
|
||||||
mv target/$PLATFORM/release/Parity\ Ethereum-signed.pkg "parity-"$VER"_"$ARC".pkg"
|
mv target/release/Parity\ Ethereum-signed.pkg "parity-"$VER"_"$ARC".pkg"
|
||||||
md5sum "parity-"$VER"_"$ARC"."$EXT >> "parity-"$VER"_"$ARC".pkg.md5"
|
md5sum "parity-"$VER"_"$ARC"."$EXT >> "parity-"$VER"_"$ARC".pkg.md5"
|
||||||
}
|
}
|
||||||
push_binaries () {
|
push_binaries () {
|
||||||
@ -188,6 +183,8 @@ case $BUILD_PLATFORM in
|
|||||||
x86_64-unknown-linux-gnu)
|
x86_64-unknown-linux-gnu)
|
||||||
#set strip bin
|
#set strip bin
|
||||||
STRIP_BIN="strip"
|
STRIP_BIN="strip"
|
||||||
|
#package extention
|
||||||
|
EXT="deb"
|
||||||
build
|
build
|
||||||
make_deb
|
make_deb
|
||||||
make_archive
|
make_archive
|
||||||
@ -196,7 +193,8 @@ case $BUILD_PLATFORM in
|
|||||||
;;
|
;;
|
||||||
x86_64-unknown-debian-gnu)
|
x86_64-unknown-debian-gnu)
|
||||||
STRIP_BIN="strip"
|
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"
|
echo "Use libssl1.1.0 (>=1.1.0) for Debian builds"
|
||||||
build
|
build
|
||||||
make_deb
|
make_deb
|
||||||
@ -206,6 +204,7 @@ case $BUILD_PLATFORM in
|
|||||||
;;
|
;;
|
||||||
x86_64-unknown-centos-gnu)
|
x86_64-unknown-centos-gnu)
|
||||||
STRIP_BIN="strip"
|
STRIP_BIN="strip"
|
||||||
|
EXT="deb"
|
||||||
build
|
build
|
||||||
make_archive
|
make_archive
|
||||||
push_binaries
|
push_binaries
|
||||||
@ -213,6 +212,7 @@ case $BUILD_PLATFORM in
|
|||||||
;;
|
;;
|
||||||
i686-unknown-linux-gnu)
|
i686-unknown-linux-gnu)
|
||||||
STRIP_BIN="strip"
|
STRIP_BIN="strip"
|
||||||
|
EXT="deb"
|
||||||
set_env
|
set_env
|
||||||
build
|
build
|
||||||
make_deb
|
make_deb
|
||||||
@ -222,6 +222,7 @@ case $BUILD_PLATFORM in
|
|||||||
;;
|
;;
|
||||||
armv7-unknown-linux-gnueabihf)
|
armv7-unknown-linux-gnueabihf)
|
||||||
STRIP_BIN="arm-linux-gnueabihf-strip"
|
STRIP_BIN="arm-linux-gnueabihf-strip"
|
||||||
|
EXT="deb"
|
||||||
set_env
|
set_env
|
||||||
build
|
build
|
||||||
make_deb
|
make_deb
|
||||||
@ -231,6 +232,7 @@ case $BUILD_PLATFORM in
|
|||||||
;;
|
;;
|
||||||
arm-unknown-linux-gnueabihf)
|
arm-unknown-linux-gnueabihf)
|
||||||
STRIP_BIN="arm-linux-gnueabihf-strip"
|
STRIP_BIN="arm-linux-gnueabihf-strip"
|
||||||
|
EXT="deb"
|
||||||
set_env
|
set_env
|
||||||
build
|
build
|
||||||
make_deb
|
make_deb
|
||||||
@ -240,6 +242,7 @@ case $BUILD_PLATFORM in
|
|||||||
;;
|
;;
|
||||||
aarch64-unknown-linux-gnu)
|
aarch64-unknown-linux-gnu)
|
||||||
STRIP_BIN="aarch64-linux-gnu-strip"
|
STRIP_BIN="aarch64-linux-gnu-strip"
|
||||||
|
EXT="deb"
|
||||||
set_env
|
set_env
|
||||||
build
|
build
|
||||||
make_deb
|
make_deb
|
||||||
@ -268,18 +271,6 @@ case $BUILD_PLATFORM in
|
|||||||
md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5"
|
md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5"
|
||||||
push_binaries
|
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)
|
x86_64-pc-windows-msvc)
|
||||||
windows
|
windows
|
||||||
push_release
|
push_release
|
||||||
|
@ -17,6 +17,6 @@ apps:
|
|||||||
|
|
||||||
parts:
|
parts:
|
||||||
parity:
|
parity:
|
||||||
source: ..
|
source: .
|
||||||
plugin: rust
|
plugin: rust
|
||||||
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
|
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
|
||||||
|
Loading…
Reference in New Issue
Block a user