2016-07-28 17:34:32 +02:00
stages :
2016-11-04 06:45:26 +01:00
- test
2016-11-04 09:59:17 +01:00
- js-build
2017-03-06 22:56:19 +01:00
- push-release
2017-03-08 23:34:00 +01:00
- build
2016-07-28 17:34:32 +02:00
variables :
2016-10-30 09:55:46 +01:00
SIMPLECOV : "true"
2016-07-28 17:34:32 +02:00
RUST_BACKTRACE : "1"
2016-10-31 09:47:47 +01:00
RUSTFLAGS : ""
2016-12-01 01:15:35 +01:00
CARGOFLAGS : ""
2017-06-13 00:37:03 +02:00
CI_SERVER_NAME : "GitLab CI"
2018-01-10 03:58:12 +01:00
LIBSSL : "libssl1.0.0 (>=1.0.0)"
CC : gcc
CXX : g++
2016-07-28 17:34:32 +02:00
cache :
2016-11-07 15:07:37 +01:00
key : "$CI_BUILD_STAGE/$CI_BUILD_REF_NAME"
2016-07-28 17:34:32 +02:00
untracked : true
2016-11-04 07:59:48 +01:00
linux-stable :
stage : build
2017-04-05 20:35:53 +02:00
image : parity/rust:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2017-04-05 20:35:53 +02:00
- rustup default stable
2018-01-10 03:58:12 +01:00
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags
- sh scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64
2016-11-04 07:59:48 +01:00
tags :
- rust-stable
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "stable-x86_64-unknown-linux-gnu_parity"
2017-01-19 20:32:52 +01:00
linux-stable-debian :
stage : build
2017-05-02 19:45:19 +02:00
image : parity/rust-debian:gitlab-ci
2017-01-19 20:32:52 +01:00
only :
- beta
- tags
- stable
- triggers
script :
2018-01-10 03:58:12 +01:00
- export LIBSSL="libssl1.1.0 (>=1.1.0)"
- sh scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64
2017-01-19 20:32:52 +01:00
tags :
- rust-debian
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2017-01-19 20:32:52 +01:00
name : "stable-x86_64-unknown-debian-gnu_parity"
2016-11-04 07:59:48 +01:00
linux-beta :
stage : build
2017-04-05 20:35:53 +02:00
image : parity/rust:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh rust-beta x86_64-unknown-linux-gnu
2016-11-04 07:59:48 +01:00
tags :
- rust-beta
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "beta-x86_64-unknown-linux-gnu_parity"
allow_failure : true
linux-nightly :
stage : build
2017-04-05 20:35:53 +02:00
image : parity/rust:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh rust-nightly x86_64-unknown-linux-gnu
2016-11-04 07:59:48 +01:00
tags :
- rust-nightly
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "nigthly-x86_64-unknown-linux-gnu_parity"
allow_failure : true
linux-centos :
stage : build
2017-05-02 19:45:19 +02:00
image : parity/rust-centos:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu
2016-11-04 07:59:48 +01:00
tags :
- rust-centos
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "x86_64-unknown-centos-gnu_parity"
2016-12-09 00:58:53 +01:00
linux-i686 :
stage : build
2017-05-02 19:45:19 +02:00
image : parity/rust-i686:gitlab-ci
2016-11-07 15:07:37 +01:00
only :
- beta
- tags
- stable
- triggers
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386
2016-11-07 15:07:37 +01:00
tags :
- rust-i686
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-07 15:07:37 +01:00
name : "i686-unknown-linux-gnu"
2016-11-04 07:59:48 +01:00
linux-armv7 :
stage : build
2017-05-02 19:45:19 +02:00
image : parity/rust-armv7:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++
2016-11-04 07:59:48 +01:00
tags :
- rust-arm
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "armv7_unknown_linux_gnueabihf_parity"
linux-arm :
stage : build
2017-05-02 19:45:19 +02:00
image : parity/rust-arm:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++
2016-11-04 07:59:48 +01:00
tags :
- rust-arm
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "arm-unknown-linux-gnueabihf_parity"
linux-aarch64 :
stage : build
2017-05-03 02:12:45 +02:00
image : parity/rust-arm64:gitlab-ci
2016-11-04 07:59:48 +01:00
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- sh scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++
2016-11-04 07:59:48 +01:00
tags :
- rust-arm
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "aarch64-unknown-linux-gnu_parity"
2018-01-10 03:58:12 +01:00
linux-snap :
stage : build
image : parity/snapcraft:gitlab-ci
only :
- snap
- stable
- beta
- tags
- triggers
script :
- sh scripts/gitlab-build.sh x86_64-unknown-snap-gnu
tags :
- rust-stable
artifacts :
paths :
- scripts/parity_*_amd64.snap
name : "stable-x86_64-unknown-snap-gnu_parity"
2016-11-04 07:59:48 +01:00
allow_failure : true
darwin :
stage : build
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2018-01-10 03:58:12 +01:00
script :
- sh scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos
2016-11-04 07:59:48 +01:00
tags :
- osx
artifacts :
paths :
2018-01-10 03:58:12 +01:00
- parity.zip
2016-11-04 07:59:48 +01:00
name : "x86_64-apple-darwin_parity"
windows :
2016-11-07 15:07:37 +01:00
cache :
key : "%CI_BUILD_STAGE%/%CI_BUILD_REF_NAME%"
untracked : true
2016-11-04 07:59:48 +01:00
stage : build
only :
- beta
- tags
- stable
2016-11-07 15:07:37 +01:00
- triggers
2016-11-04 07:59:48 +01:00
script :
2018-01-10 03:58:12 +01:00
- scripts/gitlab-build.sh x86_64-pc-windows-msvc
2016-11-04 07:59:48 +01:00
tags :
- rust-windows
artifacts :
paths :
- target/release/parity.exe
- nsis/InstallParity.exe
name : "x86_64-pc-windows-msvc_parity"
2017-01-25 20:01:28 +01:00
docker-build :
2017-01-25 19:48:36 +01:00
stage : build
only :
- tags
2017-02-24 20:54:41 +01:00
- triggers
2017-01-25 19:48:36 +01:00
before_script :
- docker info
script :
2017-03-01 12:57:06 +01:00
- if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
2017-07-17 11:06:32 +02:00
- echo "Tag:" $DOCKER_TAG
2017-05-03 16:31:56 +02:00
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
2017-07-18 15:17:33 +02:00
- sh scripts/docker-build.sh $DOCKER_TAG
2017-05-03 16:31:56 +02:00
- docker logout
2017-01-25 19:48:36 +01:00
tags :
- docker
2017-03-29 15:17:27 +02:00
test-coverage :
2017-03-10 10:12:16 +01:00
stage : test
only :
2017-03-15 23:24:23 +01:00
- master
2017-03-10 10:12:16 +01:00
script :
- git submodule update --init --recursive
2017-03-15 23:24:23 +01:00
- rm -rf target/*
- rm -rf js/.coverage
2017-03-10 10:12:16 +01:00
- scripts/cov.sh
tags :
- kcov
2017-03-19 17:10:18 +01:00
allow_failure : true
2016-11-04 08:29:16 +01:00
test-rust-stable :
2016-11-24 00:05:07 +01:00
stage : test
2017-04-05 20:40:12 +02:00
image : parity/rust:gitlab-ci
2018-01-08 19:23:56 +01:00
variables :
RUST_BACKTRACE : 1
2016-10-31 19:51:29 +01:00
script :
2018-01-08 19:23:56 +01:00
- git submodule update --init --recursive
2017-04-05 20:40:12 +02:00
- rustup show
2017-03-07 19:33:08 +01:00
- if [ $RUST_FILES_MODIFIED -eq 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi
2017-07-18 15:44:34 +02:00
- if [ "$CI_BUILD_REF_NAME" == "nightly" ]; then sh scripts/aura-test.sh; fi
2016-10-31 19:51:29 +01:00
tags :
2016-11-25 19:57:58 +01:00
- rust-stable
2016-11-07 17:16:34 +01:00
test-rust-beta :
2016-11-24 00:05:07 +01:00
stage : test
2016-11-07 17:16:34 +01:00
only :
- triggers
2017-06-05 14:44:37 +02:00
- master
2017-05-02 19:45:19 +02:00
image : parity/rust:gitlab-ci
2018-01-08 19:23:56 +01:00
variables :
RUST_BACKTRACE : 1
2016-11-07 17:16:34 +01:00
script :
2018-01-08 19:23:56 +01:00
- git submodule update --init --recursive
2017-05-02 19:45:19 +02:00
- rustup default beta
2016-12-13 20:49:26 +01:00
- if [ $RUST_FILES_MODIFIED -eq 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi
2016-11-07 17:16:34 +01:00
tags :
- rust-beta
allow_failure : true
test-rust-nightly :
2016-11-24 00:05:07 +01:00
stage : test
2016-11-07 17:16:34 +01:00
only :
- triggers
2017-06-05 14:44:37 +02:00
- master
2017-05-02 19:45:19 +02:00
image : parity/rust:gitlab-ci
2018-01-08 19:23:56 +01:00
variables :
RUST_BACKTRACE : 1
2016-11-07 17:16:34 +01:00
script :
2018-01-08 19:23:56 +01:00
- git submodule update --init --recursive
2017-05-03 16:56:10 +02:00
- rustup default nightly
2016-12-13 20:49:26 +01:00
- if [ $RUST_FILES_MODIFIED -eq 0 ]; then echo "Skipping Rust tests since no Rust files modified."; else ./test.sh $CARGOFLAGS; fi
2016-11-07 17:16:34 +01:00
tags :
- rust
- rust-nightly
allow_failure : true
2018-01-10 03:58:12 +01:00
js-test :
stage : test
image : parity/rust:gitlab-ci
script :
- git submodule update --init --recursive
- if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi
- if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) deps install since no JS files modified."; else ./js-old/scripts/install-deps.sh;fi
- if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS lint since no JS files modified."; else ./js/scripts/lint.sh && ./js/scripts/test.sh && ./js/scripts/build.sh; fi
- if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) lint since no JS files modified."; else ./js-old/scripts/lint.sh && ./js-old/scripts/test.sh && ./js-old/scripts/build.sh; fi
tags :
- rust-stable
2016-11-04 09:46:27 +01:00
js-release :
2016-11-24 00:05:07 +01:00
stage : js-build
2016-11-04 09:59:17 +01:00
only :
- master
- beta
- stable
2017-01-31 17:39:11 +01:00
- tags
2017-06-05 14:44:37 +02:00
- triggers
2017-05-02 19:45:19 +02:00
image : parity/rust:gitlab-ci
2016-11-04 07:59:48 +01:00
script :
2017-05-02 19:45:19 +02:00
- rustup default stable
2016-11-25 00:27:07 +01:00
- echo $JS_FILES_MODIFIED
2018-01-08 19:23:56 +01:00
- if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS deps install since no JS files modified."; else ./js/scripts/install-deps.sh;fi
2017-11-13 11:52:34 +01:00
- if [ $JS_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS rebuild since no JS files modified."; else ./js/scripts/build.sh && ./js/scripts/push-precompiled.sh; fi
2017-10-18 16:38:11 +02:00
- echo $JS_OLD_FILES_MODIFIED
2018-01-08 19:23:56 +01:00
- if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) deps install since no JS files modified."; else ./js-old/scripts/install-deps.sh;fi
2017-11-13 11:52:34 +01:00
- if [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping JS (old) rebuild since no JS files modified."; else ./js-old/scripts/build.sh && ./js-old/scripts/push-precompiled.sh; fi
2018-01-08 19:23:56 +01:00
- if [ $JS_FILES_MODIFIED -eq 0 ] && [ $JS_OLD_FILES_MODIFIED -eq 0 ]; then echo "Skipping Cargo update since no JS files modified."; else ./js/scripts/push-cargo.sh; fi
2016-11-04 07:59:48 +01:00
tags :
2016-11-04 09:46:27 +01:00
- javascript
2016-12-20 17:54:09 +01:00
push-release :
stage : push-release
only :
- tags
2017-06-05 14:44:37 +02:00
- triggers
2017-05-02 19:45:19 +02:00
image : parity/rust:gitlab-ci
2016-12-20 17:54:09 +01:00
script :
2017-05-02 19:45:19 +02:00
- rustup default stable
2017-01-19 23:28:04 +01:00
- curl --data "secret=$RELEASES_SECRET" http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF
2017-01-09 11:16:21 +01:00
- curl --data "secret=$RELEASES_SECRET" http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF
2016-12-20 17:54:09 +01:00
tags :
- curl
2018-01-08 19:23:56 +01:00
# ---------------------------------------------------------------------------
.functions : &functions |
2018-01-10 03:58:12 +01:00
JS_FILES_MODIFIED=$(git --no-pager diff --name-only master...$CI_BUILD_REF | grep ^js/ | wc -l)
JS_OLD_FILES_MODIFIED=$(git --no-pager diff --name-only master...$CI_BUILD_REF | grep ^js-old/ | wc -l)
RUST_FILES_MODIFIED=$(git --no-pager diff --name-only master...$CI_BUILD_REF | grep -v -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e^mac/ -e ^nsis/ | wc -l)
2018-01-08 19:23:56 +01:00
before_script :
- *functions