2016-07-28 17:34:32 +02:00
|
|
|
stages:
|
2016-11-04 06:45:26 +01:00
|
|
|
- test
|
2017-03-08 23:34:00 +01:00
|
|
|
- build
|
2018-08-26 00:44:08 +02:00
|
|
|
- publish
|
2018-08-24 18:14:07 +02:00
|
|
|
- docs
|
2018-08-26 00:44:08 +02:00
|
|
|
|
|
|
|
image: parity/rust:gitlab-ci
|
|
|
|
|
2016-07-28 17:34:32 +02:00
|
|
|
variables:
|
2018-08-26 00:44:08 +02:00
|
|
|
CI_SERVER_NAME: "GitLab CI"
|
|
|
|
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
|
|
|
|
BUILD_TARGET: ubuntu
|
|
|
|
BUILD_ARCH: amd64
|
|
|
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
|
|
|
|
2016-07-28 17:34:32 +02:00
|
|
|
cache:
|
2018-08-26 00:44:08 +02:00
|
|
|
key: "${CI_JOB_NAME}"
|
2018-01-15 06:20:04 +01:00
|
|
|
paths:
|
2018-08-26 00:44:08 +02:00
|
|
|
- ${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
|
2016-11-04 07:59:48 +01:00
|
|
|
- stable
|
2016-11-07 15:07:37 +01:00
|
|
|
- beta
|
|
|
|
- tags
|
2018-10-01 13:35:35 +02:00
|
|
|
- a5-gitlab-light ### @TODO remove
|
2018-08-26 00:44:08 +02:00
|
|
|
|
|
|
|
.collect_artifacts: &collect_artifacts
|
2016-11-07 15:07:37 +01:00
|
|
|
artifacts:
|
2018-08-26 00:44:08 +02:00
|
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
|
|
|
when: on_success
|
|
|
|
expire_in: 1 mos
|
2016-11-07 15:07:37 +01:00
|
|
|
paths:
|
2018-08-26 00:44:08 +02:00
|
|
|
- artifacts/
|
|
|
|
|
2018-09-12 16:46:56 +02:00
|
|
|
.determine_version: &determine_version
|
|
|
|
- VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)"
|
|
|
|
- DATE_STR="$(date +%Y%m%d)"
|
|
|
|
- ID_SHORT="$(echo ${CI_COMMIT_SHA} | cut -c 1-7)"
|
|
|
|
- test "${CI_COMMIT_REF_NAME}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}"
|
|
|
|
- export VERSION
|
|
|
|
- echo "Version = ${VERSION}"
|
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
#### stage: test
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
test-linux:
|
2018-08-26 00:44:08 +02:00
|
|
|
stage: test
|
2018-10-01 12:55:17 +02:00
|
|
|
variables:
|
|
|
|
RUN_TESTS: "true"
|
2016-11-04 07:59:48 +01:00
|
|
|
script:
|
2018-08-26 00:44:08 +02:00
|
|
|
- scripts/gitlab/test.sh stable
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
2018-08-26 00:44:08 +02:00
|
|
|
- rust-stable
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
test-darwin:
|
2018-09-14 15:55:14 +02:00
|
|
|
stage: test
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-apple-darwin
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
2018-10-01 12:55:17 +02:00
|
|
|
RUN_TESTS: "true"
|
2018-09-14 15:55:14 +02:00
|
|
|
script:
|
|
|
|
- scripts/gitlab/test.sh stable
|
|
|
|
tags:
|
|
|
|
- osx
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
test-windows:
|
2018-09-14 15:55:14 +02:00
|
|
|
stage: test
|
|
|
|
cache:
|
2018-09-28 19:52:15 +02:00
|
|
|
key: "${CI_JOB_NAME}"
|
2018-09-14 15:55:14 +02:00
|
|
|
paths:
|
|
|
|
- "%CI_PROJECT_DIR%/target/"
|
|
|
|
- "%CI_PROJECT_DIR%/cargo/"
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
2018-10-01 12:55:17 +02:00
|
|
|
RUN_TESTS: "true"
|
2018-09-14 15:55:14 +02:00
|
|
|
script:
|
|
|
|
- sh scripts/gitlab/test.sh stable
|
|
|
|
tags:
|
|
|
|
- rust-windows
|
2018-08-26 00:44:08 +02:00
|
|
|
|
|
|
|
#### stage: build
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
build-linux:
|
2018-08-26 00:44:08 +02:00
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
2018-01-10 03:58:12 +01:00
|
|
|
script:
|
2018-08-26 00:44:08 +02:00
|
|
|
- scripts/gitlab/build-unix.sh
|
|
|
|
<<: *collect_artifacts
|
2018-01-10 03:58:12 +01:00
|
|
|
tags:
|
|
|
|
- rust-stable
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
build-darwin:
|
ci: always run build pipelines for win, mac, linux, and android (#9537)
* ci: always run build pipelines for win, mac, linux, and android
* ci: always run build pipelines for win, mac, linux, and android
* ci: disallow failure for publish scripts
* ci: enable tests on master
* ci: run tests in debug mode to speed things up
* ci: only build windows, darwin, and android targets on PRs
* ci: reenable darwin and android pipelines on PR
* ci: revert tests to run in release mode
2018-09-13 13:15:15 +02:00
|
|
|
stage: build
|
2018-09-14 15:55:14 +02:00
|
|
|
only: *releaseable_branches
|
2018-08-26 00:44:08 +02:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-apple-darwin
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
ci: always run build pipelines for win, mac, linux, and android (#9537)
* ci: always run build pipelines for win, mac, linux, and android
* ci: always run build pipelines for win, mac, linux, and android
* ci: disallow failure for publish scripts
* ci: enable tests on master
* ci: run tests in debug mode to speed things up
* ci: only build windows, darwin, and android targets on PRs
* ci: reenable darwin and android pipelines on PR
* ci: revert tests to run in release mode
2018-09-13 13:15:15 +02:00
|
|
|
script:
|
|
|
|
- scripts/gitlab/build-unix.sh
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
|
|
|
- osx
|
2018-08-26 00:44:08 +02:00
|
|
|
<<: *collect_artifacts
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
build-windows:
|
2018-08-26 00:44:08 +02:00
|
|
|
stage: build
|
2018-09-14 15:55:14 +02:00
|
|
|
only: *releaseable_branches
|
2016-11-07 15:07:37 +01:00
|
|
|
cache:
|
2018-09-28 19:52:15 +02:00
|
|
|
key: "${CI_JOB_NAME}"
|
2018-08-26 00:44:08 +02:00
|
|
|
paths:
|
|
|
|
- "%CI_PROJECT_DIR%/target/"
|
|
|
|
- "%CI_PROJECT_DIR%/cargo/"
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
2016-11-04 07:59:48 +01:00
|
|
|
script:
|
2018-08-26 00:44:08 +02:00
|
|
|
- sh scripts/gitlab/build-windows.sh
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
|
|
|
- rust-windows
|
2018-08-26 00:44:08 +02:00
|
|
|
<<: *collect_artifacts
|
|
|
|
|
|
|
|
#### stage: publish
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
publish-docker:
|
2018-08-26 00:44:08 +02:00
|
|
|
stage: publish
|
2018-10-01 13:35:35 +02:00
|
|
|
only: *releaseable_branches
|
2018-08-26 00:44:08 +02:00
|
|
|
cache: {}
|
|
|
|
dependencies:
|
2018-10-01 13:33:46 +02:00
|
|
|
- build-linux
|
2017-03-10 10:12:16 +01:00
|
|
|
tags:
|
2018-08-26 00:44:08 +02:00
|
|
|
- shell
|
2016-10-31 19:51:29 +01:00
|
|
|
script:
|
2018-08-26 00:44:08 +02:00
|
|
|
- scripts/gitlab/publish-docker.sh parity
|
|
|
|
|
2018-10-01 13:33:46 +02:00
|
|
|
publish-awss3:
|
2018-08-26 00:44:08 +02:00
|
|
|
stage: publish
|
2018-10-01 13:33:46 +02:00
|
|
|
only:
|
|
|
|
- nightly
|
|
|
|
- /^v2.*$/
|
2018-10-01 13:35:35 +02:00
|
|
|
- a5-gitlab-light ### @TODO remove
|
2018-08-26 00:44:08 +02:00
|
|
|
cache: {}
|
|
|
|
dependencies:
|
2018-10-01 13:33:46 +02:00
|
|
|
- build-linux
|
|
|
|
- build-darwin
|
|
|
|
- build-windows
|
2018-09-10 17:22:34 +02:00
|
|
|
before_script: *determine_version
|
2016-11-07 17:16:34 +01:00
|
|
|
script:
|
2018-08-26 00:44:08 +02:00
|
|
|
- scripts/gitlab/push.sh
|
2016-11-07 17:16:34 +01:00
|
|
|
tags:
|
2018-08-26 00:44:08 +02:00
|
|
|
- shell
|
|
|
|
|
|
|
|
docs-rpc-json:
|
2018-08-24 18:14:07 +02:00
|
|
|
stage: docs
|
|
|
|
only:
|
|
|
|
- tags
|
2018-10-01 13:35:35 +02:00
|
|
|
- a5-gitlab-light ### @TODO remove
|
2018-08-26 00:44:08 +02:00
|
|
|
cache: {}
|
2016-12-20 17:54:09 +01:00
|
|
|
script:
|
2018-08-26 00:44:08 +02:00
|
|
|
- scripts/gitlab/rpc-docs.sh
|
2016-12-20 17:54:09 +01:00
|
|
|
tags:
|
2018-08-26 00:44:08 +02:00
|
|
|
- shell
|