2017-05-10 12:53:23 -07:00
stages :
2017-05-12 06:49:18 -07:00
- test
2017-05-10 12:53:23 -07:00
- build
variables :
GIT_DEPTH : "3"
SIMPLECOV : "true"
RUST_BACKTRACE : "1"
RUSTFLAGS : ""
CARGOFLAGS : ""
cache :
2018-03-20 07:08:46 -07:00
key : "$CI_BUILD_STAGE-$CI_BUILD_REF_NAME"
2017-05-10 12:53:23 -07:00
untracked : true
2017-05-12 06:49:18 -07:00
linux-stable-test :
stage : test
2017-05-10 12:53:23 -07:00
image : parity/rust:gitlab-ci
only :
- beta
- tags
- stable
- triggers
- master
script :
2017-05-12 06:49:18 -07:00
- rustup default stable
2017-05-12 05:18:57 -07:00
- echo 'Running tests from /tools/test.sh' && echo -en 'gitlab_fold:start:tests'
- ./tools/test.sh
- echo -en 'gitlab_fold:end:tests'
2017-05-12 06:49:18 -07:00
tags :
- rust
linux-beta-test :
stage : test
image : parity/rust:gitlab-ci
only :
- beta
- tags
- stable
- triggers
- master
script :
- rustup default beta
- echo 'Running check'
- cargo check -j $(nproc)
- echo 'End check'
tags :
- rust
2017-05-12 07:57:00 -07:00
allow_failure : true
linux-nightly-test :
2017-05-12 06:49:18 -07:00
stage : test
image : parity/rust:gitlab-ci
only :
- beta
- tags
- stable
- triggers
- master
script :
2017-05-12 07:57:00 -07:00
- rustup default nightly
2017-05-12 06:49:18 -07:00
- echo 'Running check'
- cargo check -j $(nproc)
- echo 'End check'
tags :
- rust
2017-05-12 07:57:00 -07:00
allow_failure : true
2017-05-12 06:49:18 -07:00
linux-stable :
stage : build
image : parity/rust:gitlab-ci
only :
- beta
- tags
- stable
- triggers
- master
script :
- git submodule update --init
2017-05-12 05:18:57 -07:00
- echo 'Building in release mode' && echo -en 'gitlab_fold:start:build.release'
2017-05-10 12:53:23 -07:00
- rustup default stable
- cargo build -j $(nproc) -p pbtc --release
2017-05-12 05:10:21 -07:00
- strip target/release/pbtc
2017-05-12 05:32:33 -07:00
#- export SHA3=$(target/release/pbtc tools hash target/release/pbtc)
2017-05-12 06:49:18 -07:00
- md5sum target/release/pbtc > pbtc.md5
2017-05-12 07:31:20 -07:00
- echo -en 'gitlab_fold:end:build.release'
2017-08-29 07:09:24 -07:00
- echo 'Running regtests from ./tools/regtests.sh' && echo -en 'gitlab_fold:start:regtests'
2017-05-12 05:25:43 -07:00
- ./tools/regtests.sh
2017-05-12 07:31:20 -07:00
- echo -en 'gitlab_fold:end:regtests'
2017-08-29 07:09:24 -07:00
- echo 'Running bench from ./tools/bench.sh' && echo -en 'gitlab_fold:start:bench'
2017-05-12 05:39:57 -07:00
- ./tools/bench.sh
- echo -en 'gitlab_fold:end:bench'
2017-05-12 07:49:54 -07:00
- sh tools/deb_build.sh amd64
- cp target/release/pbtc deb/usr/bin/pbtc
- export VER=$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")
- dpkg-deb -b deb "pbtc_"$VER"_amd64.deb"
- md5sum "pbtc_"$VER"_amd64.deb" > "pbtc_"$VER"_amd64.deb.md5"
- aws configure set aws_access_key_id $s3_key
- aws configure set aws_secret_access_key $s3_secret
- if [[ $CI_BUILD_REF_NAME =~ ^(master|beta|stable|nightly)$ ]]; then export S3_BUCKET=parity-bitcoin-published; else export S3_BUCKET=parity-bitcoin-builds; fi
- aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/pbtc --body target/release/pbtc
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/pbtc.md5 --body pbtc.md5
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/"pbtc_"$VER"_amd64.deb" --body "pbtc_"$VER"_amd64.deb"
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/"pbtc_"$VER"_amd64.deb.md5" --body "pbtc_"$VER"_amd64.deb.md5"
2017-05-10 12:53:23 -07:00
tags :
- rust
artifacts :
paths :
- target/release/pbtc
2017-05-12 07:49:54 -07:00
- pbtc.md5
2017-05-10 12:53:23 -07:00
name : "stable-x86_64-unknown-linux-gnu_parity_bitcoin"
docker-build :
stage : build
only :
2017-05-12 07:31:20 -07:00
- master
2017-05-10 12:53:23 -07:00
- tags
- triggers
before_script :
- docker info
script :
- if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
2017-05-12 07:49:54 -07:00
- sh tools/docker_build.sh $DOCKER_TAG parity
2017-05-10 12:53:23 -07:00
- docker logout
tags :
- docker