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-10-02 01:03:58 +02:00
|
|
|
- optional
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-02-25 15:24:44 +01:00
|
|
|
image: parity/rust-parity-ethereum-build:xenial
|
2016-07-28 17:34:32 +02:00
|
|
|
variables:
|
2019-02-13 11:00:41 +01:00
|
|
|
GIT_STRATEGY: fetch
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2018-08-26 00:44:08 +02:00
|
|
|
CI_SERVER_NAME: "GitLab CI"
|
2018-10-02 01:03:58 +02:00
|
|
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
2018-08-26 00:44:08 +02:00
|
|
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
|
|
|
|
2019-03-19 09:10:24 +01:00
|
|
|
.no_git: &no_git #disable git strategy
|
2019-02-25 15:24:44 +01:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
|
|
|
|
only: &releaseable_branches
|
2018-10-10 14:51:36 +02:00
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- tags
|
|
|
|
- schedules
|
2018-10-09 15:32:07 +02:00
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
.collect_artifacts: &collect_artifacts
|
2016-11-07 15:07:37 +01:00
|
|
|
artifacts:
|
2018-10-09 15:32:07 +02:00
|
|
|
name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
|
2018-08-26 00:44:08 +02:00
|
|
|
when: on_success
|
|
|
|
expire_in: 1 mos
|
2016-11-07 15:07:37 +01:00
|
|
|
paths:
|
2019-02-27 16:33:20 +01:00
|
|
|
- artifacts/
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-03-19 09:10:24 +01:00
|
|
|
.docker-cache-status: &docker-cache-status
|
|
|
|
dependencies: []
|
|
|
|
before_script:
|
|
|
|
- sccache -s
|
|
|
|
after_script:
|
2019-02-13 11:00:41 +01:00
|
|
|
- sccache -s
|
2018-09-15 13:43:19 +02:00
|
|
|
tags:
|
2019-02-13 11:00:41 +01:00
|
|
|
- linux-docker
|
2018-09-15 13:43:19 +02:00
|
|
|
|
2019-03-19 09:10:24 +01:00
|
|
|
|
|
|
|
cargo-check 0 3:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- time cargo check --target $CARGO_TARGET --locked --no-default-features
|
|
|
|
|
|
|
|
cargo-check 1 3:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features
|
|
|
|
|
|
|
|
cargo-check 2 3:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"
|
|
|
|
|
|
|
|
cargo-audit:
|
2018-11-27 12:51:27 +01:00
|
|
|
stage: test
|
|
|
|
script:
|
2019-02-13 11:00:41 +01:00
|
|
|
- cargo audit
|
2018-11-27 12:51:27 +01:00
|
|
|
tags:
|
2019-02-13 11:00:41 +01:00
|
|
|
- linux-docker
|
2018-11-27 12:51:27 +01:00
|
|
|
|
2019-03-19 09:10:24 +01:00
|
|
|
validate-chainspecs:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- ./scripts/gitlab/validate-chainspecs.sh
|
|
|
|
|
|
|
|
test-cpp:
|
|
|
|
stage: build
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- ./scripts/gitlab/test-cpp.sh
|
|
|
|
|
|
|
|
test-linux:
|
|
|
|
stage: build
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- ./scripts/gitlab/test-linux.sh
|
|
|
|
|
2019-02-25 15:24:44 +01:00
|
|
|
build-linux: &build-linux
|
2018-10-02 01:03:58 +02:00
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
2019-03-19 09:10:24 +01:00
|
|
|
<<: *docker-cache-status
|
2018-09-15 13:43:19 +02:00
|
|
|
script:
|
2019-03-19 09:10:24 +01:00
|
|
|
- scripts/gitlab/build-linux.sh
|
2018-10-02 01:03:58 +02:00
|
|
|
<<: *collect_artifacts
|
2018-09-15 13:43:19 +02:00
|
|
|
|
2019-02-25 15:24:44 +01:00
|
|
|
build-linux-i386:
|
|
|
|
<<: *build-linux
|
|
|
|
image: parity/rust-parity-ethereum-build:i386
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: i686-unknown-linux-gnu
|
|
|
|
|
|
|
|
build-linux-arm64:
|
|
|
|
<<: *build-linux
|
|
|
|
image: parity/rust-parity-ethereum-build:arm64
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
|
|
|
|
|
|
build-linux-armhf:
|
|
|
|
<<: *build-linux
|
|
|
|
image: parity/rust-parity-ethereum-build:armhf
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
build-darwin:
|
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
2018-09-14 15:55:14 +02:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-apple-darwin
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
|
|
|
script:
|
2019-03-19 09:10:24 +01:00
|
|
|
- scripts/gitlab/build-linux.sh
|
2018-09-14 15:55:14 +02:00
|
|
|
tags:
|
2018-10-02 01:03:58 +02:00
|
|
|
- rust-osx
|
|
|
|
<<: *collect_artifacts
|
2018-09-14 15:55:14 +02:00
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
build-windows:
|
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
2018-09-14 15:55:14 +02:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
|
|
|
script:
|
2018-10-02 01:03:58 +02:00
|
|
|
- sh scripts/gitlab/build-windows.sh
|
2018-09-14 15:55:14 +02:00
|
|
|
tags:
|
2019-03-19 09:10:24 +01:00
|
|
|
- rust-windows
|
2018-10-02 01:03:58 +02:00
|
|
|
<<: *collect_artifacts
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
publish-docker:
|
|
|
|
stage: publish
|
|
|
|
only: *releaseable_branches
|
|
|
|
cache: {}
|
|
|
|
dependencies:
|
|
|
|
- build-linux
|
|
|
|
tags:
|
|
|
|
- shell
|
2018-08-26 00:44:08 +02:00
|
|
|
script:
|
2018-10-02 01:03:58 +02:00
|
|
|
- scripts/gitlab/publish-docker.sh parity
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-02-25 15:24:44 +01:00
|
|
|
publish-snap: &publish-snap
|
|
|
|
stage: publish
|
2019-01-09 14:39:21 +01:00
|
|
|
only: *releaseable_branches
|
2019-02-13 11:00:41 +01:00
|
|
|
image: snapcore/snapcraft
|
2019-01-09 14:39:21 +01:00
|
|
|
variables:
|
2019-02-25 15:24:44 +01:00
|
|
|
BUILD_ARCH: amd64
|
2019-01-09 14:39:21 +01:00
|
|
|
cache: {}
|
|
|
|
dependencies:
|
|
|
|
- build-linux
|
|
|
|
tags:
|
2019-02-25 15:24:44 +01:00
|
|
|
- linux-docker
|
2019-01-09 14:39:21 +01:00
|
|
|
script:
|
|
|
|
- scripts/gitlab/publish-snap.sh
|
|
|
|
<<: *collect_artifacts
|
|
|
|
|
2019-02-25 15:24:44 +01:00
|
|
|
publish-snap-i386:
|
|
|
|
<<: *publish-snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: i386
|
|
|
|
dependencies:
|
|
|
|
- build-linux-i386
|
|
|
|
|
|
|
|
publish-snap-arm64:
|
|
|
|
<<: *publish-snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: arm64
|
|
|
|
dependencies:
|
|
|
|
- build-linux-arm64
|
|
|
|
|
|
|
|
publish-snap-armhf:
|
|
|
|
<<: *publish-snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: armhf
|
|
|
|
dependencies:
|
|
|
|
- build-linux-armhf
|
|
|
|
|
|
|
|
publish-onchain:
|
|
|
|
stage: publish
|
2018-10-02 01:03:58 +02:00
|
|
|
only: *releaseable_branches
|
2019-02-13 11:00:41 +01:00
|
|
|
cache: {}
|
2018-10-02 01:03:58 +02:00
|
|
|
dependencies:
|
|
|
|
- build-linux
|
|
|
|
- build-darwin
|
|
|
|
- build-windows
|
2018-08-26 00:44:08 +02:00
|
|
|
script:
|
2019-02-25 15:24:44 +01:00
|
|
|
- scripts/gitlab/publish-onchain.sh
|
2018-10-02 01:03:58 +02:00
|
|
|
tags:
|
2019-02-13 11:00:41 +01:00
|
|
|
- linux-docker
|
|
|
|
|
|
|
|
publish-awss3-release:
|
|
|
|
image: parity/awscli:latest
|
|
|
|
stage: publish
|
|
|
|
only: *releaseable_branches
|
2019-02-25 15:24:44 +01:00
|
|
|
<<: *no_git
|
2019-02-13 11:00:41 +01:00
|
|
|
cache: {}
|
|
|
|
dependencies:
|
|
|
|
- build-linux
|
|
|
|
- build-darwin
|
|
|
|
- build-windows
|
|
|
|
script:
|
|
|
|
- echo "__________Push binaries to AWS S3____________"
|
|
|
|
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
|
2019-03-19 09:10:24 +01:00
|
|
|
(beta|stable|nightly)
|
|
|
|
export BUCKET=releases.parity.io/ethereum;
|
|
|
|
;;
|
|
|
|
(*)
|
|
|
|
export BUCKET=builds-parity;
|
|
|
|
;;
|
|
|
|
esac
|
2019-02-13 11:00:41 +01:00
|
|
|
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
|
2019-03-19 09:10:24 +01:00
|
|
|
- echo "__________Read from S3____________"
|
|
|
|
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize
|
2019-02-13 11:00:41 +01:00
|
|
|
tags:
|
2019-02-27 16:33:20 +01:00
|
|
|
- linux-docker
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2018-11-27 12:51:27 +01:00
|
|
|
publish-docs:
|
|
|
|
stage: publish
|
2018-10-02 01:03:58 +02:00
|
|
|
only:
|
|
|
|
- tags
|
2018-10-09 12:50:31 +02:00
|
|
|
except:
|
|
|
|
- nightly
|
2018-10-02 01:03:58 +02:00
|
|
|
cache: {}
|
2016-11-04 07:59:48 +01:00
|
|
|
script:
|
2018-11-27 12:51:27 +01:00
|
|
|
- scripts/gitlab/publish-docs.sh
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
2019-01-07 14:47:28 +01:00
|
|
|
- linux-docker
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2018-11-01 11:06:24 +01:00
|
|
|
build-android:
|
2019-03-19 09:10:24 +01:00
|
|
|
stage: build
|
2018-08-26 00:44:08 +02:00
|
|
|
image: parity/rust-android:gitlab-ci
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: armv7-linux-androideabi
|
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:
|
2019-03-19 09:10:24 +01:00
|
|
|
- scripts/gitlab/build-linux.sh
|
2018-08-31 16:41:21 +02:00
|
|
|
tags:
|
2019-01-22 12:33:45 +01:00
|
|
|
- linux-docker
|
|
|
|
<<: *collect_artifacts
|