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-10-01 13:58:12 +02:00
|
|
|
image: ${REGISTRY}/parity-ci-linux:latest
|
2019-10-02 22:01:20 +02:00
|
|
|
|
2016-07-28 17:34:32 +02:00
|
|
|
variables:
|
2019-02-07 18:49:50 +01:00
|
|
|
GIT_STRATEGY: fetch
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2019-12-02 18:16:14 +01:00
|
|
|
GIT_DEPTH: 3
|
2018-08-26 00:44:08 +02:00
|
|
|
CI_SERVER_NAME: "GitLab CI"
|
2019-05-24 11:15:41 +02:00
|
|
|
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
|
2018-08-26 00:44:08 +02:00
|
|
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
2019-12-19 16:57:00 +01:00
|
|
|
CARGO_INCREMENTAL: 0
|
2019-10-01 13:58:12 +02:00
|
|
|
REGISTRY: registry.parity.io/parity/infrastructure/scripts
|
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
|
|
|
|
- tags
|
|
|
|
- schedules
|
2018-10-09 15:32:07 +02:00
|
|
|
|
2019-03-11 15:26:35 +01: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-21 21:06:49 +01:00
|
|
|
- artifacts/
|
2019-05-31 13:27:00 +02:00
|
|
|
- tools/
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-03-19 01:14:59 +01:00
|
|
|
.docker-cache-status: &docker-cache-status
|
2019-04-12 18:51:01 +02:00
|
|
|
dependencies: []
|
2019-12-02 18:16:14 +01:00
|
|
|
interruptible: true
|
2019-03-11 15:26:35 +01:00
|
|
|
before_script:
|
2019-05-31 13:27:00 +02:00
|
|
|
- rustup show
|
|
|
|
- cargo --version
|
2019-10-30 19:16:18 +01:00
|
|
|
retry:
|
|
|
|
max: 2
|
2019-12-19 16:57:00 +01:00
|
|
|
when:
|
2019-10-30 19:16:18 +01:00
|
|
|
- runner_system_failure
|
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
2018-09-15 13:43:19 +02:00
|
|
|
tags:
|
2019-02-07 18:49:50 +01:00
|
|
|
- linux-docker
|
2018-09-15 13:43:19 +02:00
|
|
|
|
2019-04-12 18:51:01 +02:00
|
|
|
.build-on-linux: &build-on-linux
|
|
|
|
stage: build
|
|
|
|
<<: *docker-cache-status
|
|
|
|
<<: *collect_artifacts
|
|
|
|
script:
|
|
|
|
- scripts/gitlab/build-linux.sh
|
2019-05-31 13:27:00 +02:00
|
|
|
after_script:
|
|
|
|
- mkdir -p tools
|
|
|
|
- cp -r scripts/docker/hub/* ./tools
|
|
|
|
- cp scripts/gitlab/publish-snap.sh ./tools
|
|
|
|
- cp scripts/gitlab/publish-onchain.sh ./tools
|
|
|
|
- cp scripts/gitlab/safe-curl.sh ./tools
|
|
|
|
- echo v"$(sed -r -n '1,/^version/s/^version\s*=\s*"([^"]+)".*$/\1/p' Cargo.toml)" |
|
|
|
|
tee ./tools/VERSION
|
|
|
|
- echo "$(sed -r -n '1,/^track/s/^track\s*=\s*"([^"]+)".*$/\1/p' ./util/version/Cargo.toml)" |
|
|
|
|
tee ./tools/TRACK
|
2019-04-12 18:51:01 +02:00
|
|
|
|
2019-03-11 15:26:35 +01:00
|
|
|
|
|
|
|
cargo-check 0 3:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
2019-04-12 18:51:01 +02:00
|
|
|
- time cargo check --target $CARGO_TARGET --locked --no-default-features --verbose --color=always
|
2019-10-08 20:58:34 +02:00
|
|
|
- sccache --show-stats
|
2019-03-11 15:26:35 +01:00
|
|
|
|
|
|
|
cargo-check 1 3:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
2019-04-12 18:51:01 +02:00
|
|
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features --verbose --color=always
|
2019-10-08 20:58:34 +02:00
|
|
|
- sccache --show-stats
|
2019-03-11 15:26:35 +01:00
|
|
|
|
|
|
|
cargo-check 2 3:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
2019-04-12 18:51:01 +02:00
|
|
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio" --verbose --color=always
|
2019-10-08 20:58:34 +02:00
|
|
|
- sccache --show-stats
|
2019-03-11 15:26:35 +01:00
|
|
|
|
2019-09-27 23:29:25 +02:00
|
|
|
cargo-check-evmbin:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- time cargo check -p evmbin --target $CARGO_TARGET --locked --verbose --color=always
|
2019-10-08 20:58:34 +02:00
|
|
|
- sccache --show-stats
|
2019-09-27 23:29:25 +02:00
|
|
|
|
2019-09-05 19:28:01 +02:00
|
|
|
cargo-check-benches:
|
2019-08-15 16:28:25 +02:00
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
2019-09-24 11:45:28 +02:00
|
|
|
- time cargo check --all --benches --target $CARGO_TARGET --locked --verbose --color=always
|
2019-10-08 20:58:34 +02:00
|
|
|
- sccache --show-stats
|
2019-08-15 16:28:25 +02:00
|
|
|
|
2019-03-11 15:26:35 +01:00
|
|
|
cargo-audit:
|
2018-11-27 12:51:27 +01:00
|
|
|
stage: test
|
2019-03-19 01:14:59 +01:00
|
|
|
<<: *docker-cache-status
|
2018-11-27 12:51:27 +01:00
|
|
|
script:
|
2019-02-07 18:49:50 +01:00
|
|
|
- cargo audit
|
2019-05-20 11:59:35 +02:00
|
|
|
allow_failure: true # failed cargo audit shouldn't prevent a PR from being merged
|
2018-11-27 12:51:27 +01:00
|
|
|
|
2019-03-11 15:26:35 +01:00
|
|
|
validate-chainspecs:
|
|
|
|
stage: test
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
|
|
|
- ./scripts/gitlab/validate-chainspecs.sh
|
|
|
|
|
|
|
|
test-linux:
|
|
|
|
stage: build
|
|
|
|
<<: *docker-cache-status
|
|
|
|
script:
|
2019-04-12 18:51:01 +02:00
|
|
|
- ./scripts/gitlab/test-linux.sh stable
|
2019-03-19 01:14:59 +01:00
|
|
|
|
2019-04-12 18:51:01 +02:00
|
|
|
test-linux-beta:
|
2019-03-19 01:14:59 +01:00
|
|
|
stage: build
|
2019-04-12 18:51:01 +02:00
|
|
|
only: *releaseable_branches
|
2019-03-30 20:29:08 +01:00
|
|
|
<<: *docker-cache-status
|
2019-03-19 01:14:59 +01:00
|
|
|
script:
|
2019-04-12 18:51:01 +02:00
|
|
|
- ./scripts/gitlab/test-linux.sh beta
|
2019-03-11 15:26:35 +01:00
|
|
|
|
2019-04-12 18:51:01 +02:00
|
|
|
test-linux-nightly:
|
2018-10-02 01:03:58 +02:00
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
2019-03-11 15:26:35 +01:00
|
|
|
<<: *docker-cache-status
|
2018-09-15 13:43:19 +02:00
|
|
|
script:
|
2019-04-12 18:51:01 +02:00
|
|
|
- ./scripts/gitlab/test-linux.sh nightly
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
build-linux:
|
|
|
|
<<: *build-on-linux
|
2019-06-28 11:23:58 +02:00
|
|
|
only: *releaseable_branches
|
2018-09-15 13:43:19 +02:00
|
|
|
|
2019-02-25 12:56:38 +01:00
|
|
|
build-linux-i386:
|
2019-04-12 18:51:01 +02:00
|
|
|
<<: *build-on-linux
|
|
|
|
only: *releaseable_branches
|
2019-10-01 13:58:12 +02:00
|
|
|
image: ${REGISTRY}/parity-ci-i386:latest
|
2019-02-25 12:56:38 +01:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: i686-unknown-linux-gnu
|
|
|
|
|
|
|
|
build-linux-arm64:
|
2019-04-12 18:51:01 +02:00
|
|
|
<<: *build-on-linux
|
|
|
|
only: *releaseable_branches
|
2019-10-01 13:58:12 +02:00
|
|
|
image: ${REGISTRY}/parity-ci-arm64:latest
|
2019-02-25 12:56:38 +01:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
|
|
|
|
|
|
build-linux-armhf:
|
2019-04-12 18:51:01 +02:00
|
|
|
<<: *build-on-linux
|
|
|
|
only: *releaseable_branches
|
2019-10-01 13:58:12 +02:00
|
|
|
image: ${REGISTRY}/parity-ci-armhf:latest
|
2019-02-25 12:56:38 +01:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
build-darwin:
|
|
|
|
stage: build
|
2019-03-27 14:47:08 +01:00
|
|
|
<<: *collect_artifacts
|
2020-01-20 14:30:11 +01:00
|
|
|
only: *releaseable_branches
|
2018-09-14 15:55:14 +02:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-apple-darwin
|
2019-04-12 18:51:01 +02:00
|
|
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
2018-09-14 15:55:14 +02:00
|
|
|
script:
|
2019-03-11 15:26:35 +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
|
2018-09-14 15:55:14 +02:00
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
build-windows:
|
|
|
|
stage: build
|
2019-03-27 14:47:08 +01:00
|
|
|
<<: *collect_artifacts
|
2020-01-20 14:30:11 +01:00
|
|
|
only: *releaseable_branches
|
2018-09-14 15:55:14 +02:00
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
2019-03-30 20:29:08 +01:00
|
|
|
CARGO_HOME: "C:/ci-cache/parity-ethereum/cargo/$CI_JOB_NAME"
|
|
|
|
GIT_SUBMODULE_STRATEGY: none
|
2018-09-14 15:55:14 +02:00
|
|
|
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-05 18:33:10 +01:00
|
|
|
- rust-windows
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2018-10-02 01:03:58 +02:00
|
|
|
publish-docker:
|
|
|
|
stage: publish
|
|
|
|
only: *releaseable_branches
|
2019-05-31 13:27:00 +02:00
|
|
|
except:
|
2019-08-16 12:59:36 +02:00
|
|
|
- nightly
|
|
|
|
when: manual
|
2018-10-02 01:03:58 +02:00
|
|
|
dependencies:
|
|
|
|
- build-linux
|
2019-05-31 13:27:00 +02:00
|
|
|
environment:
|
|
|
|
name: parity-build
|
|
|
|
cache: {}
|
|
|
|
image: docker:stable
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
variables:
|
2019-08-16 12:59:36 +02:00
|
|
|
GIT_STRATEGY: none
|
2019-05-31 13:27:00 +02:00
|
|
|
DOCKER_HOST: tcp://localhost:2375
|
|
|
|
DOCKER_DRIVER: overlay2
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
# DOCKERFILE: tools/Dockerfile
|
2019-08-15 16:28:25 +02:00
|
|
|
# CONTAINER_IMAGE: parity/parity
|
2018-08-26 00:44:08 +02:00
|
|
|
script:
|
2019-05-31 13:27:00 +02:00
|
|
|
- ./tools/publish-docker.sh
|
|
|
|
tags:
|
|
|
|
- kubernetes-parity-build
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-snap-nightly: &publish-snap
|
2019-02-21 19:14:59 +01:00
|
|
|
stage: publish
|
2019-08-16 12:59:36 +02:00
|
|
|
only:
|
|
|
|
- nightly
|
2019-02-12 15:37:54 +01:00
|
|
|
image: snapcore/snapcraft
|
2019-01-09 14:39:21 +01:00
|
|
|
variables:
|
2019-08-16 12:59:36 +02:00
|
|
|
GIT_STRATEGY: none
|
2019-02-21 19:14:59 +01:00
|
|
|
BUILD_ARCH: amd64
|
2019-03-19 01:14:59 +01:00
|
|
|
cache: {}
|
2019-01-09 14:39:21 +01:00
|
|
|
dependencies:
|
|
|
|
- build-linux
|
|
|
|
tags:
|
2019-02-25 12:56:38 +01:00
|
|
|
- linux-docker
|
2019-01-09 14:39:21 +01:00
|
|
|
script:
|
2019-05-31 13:27:00 +02:00
|
|
|
- ./tools/publish-snap.sh
|
2019-01-09 14:39:21 +01:00
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-snap-manually:
|
|
|
|
<<: *publish-snap
|
|
|
|
only: *releaseable_branches
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
publish-snap-i386-nightly: &publish-snap-i386
|
2019-02-25 12:56:38 +01:00
|
|
|
<<: *publish-snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: i386
|
2019-05-31 13:27:00 +02:00
|
|
|
CARGO_TARGET: i686-unknown-linux-gnu
|
2019-02-25 12:56:38 +01:00
|
|
|
dependencies:
|
|
|
|
- build-linux-i386
|
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-snap-i386-manually:
|
|
|
|
<<: *publish-snap-i386
|
|
|
|
only: *releaseable_branches
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
publish-snap-arm64-nightly: &publish-snap-arm64
|
2019-02-25 12:56:38 +01:00
|
|
|
<<: *publish-snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: arm64
|
2019-05-31 13:27:00 +02:00
|
|
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
2019-02-25 12:56:38 +01:00
|
|
|
dependencies:
|
|
|
|
- build-linux-arm64
|
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-snap-arm64-manually:
|
|
|
|
<<: *publish-snap-arm64
|
|
|
|
only: *releaseable_branches
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
publish-snap-armhf-nightly: &publish-snap-armhf
|
2019-02-25 12:56:38 +01:00
|
|
|
<<: *publish-snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: armhf
|
2019-05-31 13:27:00 +02:00
|
|
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
2019-02-25 12:56:38 +01:00
|
|
|
dependencies:
|
|
|
|
- build-linux-armhf
|
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-snap-armhf-manually:
|
|
|
|
<<: *publish-snap-armhf
|
2018-10-02 01:03:58 +02:00
|
|
|
only: *releaseable_branches
|
2019-08-16 12:59:36 +02:00
|
|
|
when: manual
|
|
|
|
|
|
|
|
publish-onchain-nightly: &publish-onchain
|
|
|
|
stage: publish
|
|
|
|
only:
|
|
|
|
- nightly
|
2019-02-07 18:49:50 +01:00
|
|
|
cache: {}
|
2019-08-16 12:59:36 +02:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
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-05-31 13:27:00 +02:00
|
|
|
- ./tools/publish-onchain.sh
|
2018-10-02 01:03:58 +02:00
|
|
|
tags:
|
2019-02-07 18:49:50 +01:00
|
|
|
- linux-docker
|
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-onchain-manually:
|
|
|
|
<<: *publish-onchain
|
|
|
|
only: *releaseable_branches
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
publish-release-awss3-nightly: &publish-release-awss3
|
2019-10-01 13:58:12 +02:00
|
|
|
image: ${REGISTRY}/awscli:latest
|
2019-02-07 18:49:50 +01:00
|
|
|
stage: publish
|
2019-08-16 12:59:36 +02:00
|
|
|
only:
|
|
|
|
- nightly
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2019-02-07 18:49:50 +01:00
|
|
|
cache: {}
|
|
|
|
dependencies:
|
|
|
|
- build-linux
|
|
|
|
- build-darwin
|
|
|
|
- build-windows
|
|
|
|
script:
|
2019-03-07 12:45:35 +01:00
|
|
|
- echo "__________Push binaries to AWS S3____________"
|
|
|
|
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
|
2020-01-22 17:34:34 +01:00
|
|
|
(stable|nightly)
|
2019-03-07 12:45:35 +01:00
|
|
|
export BUCKET=releases.parity.io/ethereum;
|
|
|
|
;;
|
|
|
|
(*)
|
|
|
|
export BUCKET=builds-parity;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
|
|
|
|
- echo "__________Read from S3____________"
|
|
|
|
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize
|
2019-02-07 18:49:50 +01:00
|
|
|
tags:
|
2019-02-21 21:06:49 +01:00
|
|
|
- linux-docker
|
2018-08-26 00:44:08 +02:00
|
|
|
|
2019-08-16 12:59:36 +02:00
|
|
|
publish-release-awss3-manually:
|
2019-09-24 11:45:28 +02:00
|
|
|
<<: *publish-release-awss3
|
2019-08-16 12:59:36 +02:00
|
|
|
only: *releaseable_branches
|
|
|
|
when: manual
|
|
|
|
|
2018-11-27 12:51:27 +01:00
|
|
|
publish-docs:
|
2019-07-11 15:31:48 +02:00
|
|
|
stage: publish
|
2019-10-01 13:58:12 +02:00
|
|
|
image: ${REGISTRY}/parity-ci-docs:latest
|
2018-10-02 01:03:58 +02:00
|
|
|
only:
|
|
|
|
- tags
|
2018-10-09 12:50:31 +02:00
|
|
|
except:
|
|
|
|
- nightly
|
2019-08-16 12:59:36 +02:00
|
|
|
when: manual
|
2019-07-11 15:31:48 +02:00
|
|
|
cache: {}
|
|
|
|
dependencies: []
|
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
|
2019-05-08 17:58:51 +02:00
|
|
|
allow_failure: true
|
2019-07-21 15:03:31 +02:00
|
|
|
|
|
|
|
publish-av-whitelist:
|
|
|
|
stage: publish
|
2019-08-16 12:59:36 +02:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2019-07-29 16:44:19 +02:00
|
|
|
only: *releaseable_branches
|
2019-07-21 15:03:31 +02:00
|
|
|
except:
|
2019-08-16 12:59:36 +02:00
|
|
|
- nightly
|
|
|
|
when: manual
|
2019-07-21 15:03:31 +02:00
|
|
|
cache: {}
|
|
|
|
dependencies:
|
|
|
|
- build-windows
|
|
|
|
script:
|
|
|
|
- scripts/gitlab/publish-av-whitelists.sh
|
|
|
|
tags:
|
|
|
|
- linux-docker
|