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-06-02 03:22:02 +02:00
|
|
|
- package
|
|
|
|
- publish
|
|
|
|
- push-release
|
|
|
|
|
|
|
|
image: parity/rust:gitlab-ci
|
|
|
|
|
2016-07-28 17:34:32 +02:00
|
|
|
variables:
|
2018-06-02 03:22:02 +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
|
|
|
|
LIBSSL: "libssl1.0.0 (>=1.0.0)"
|
|
|
|
|
2016-07-28 17:34:32 +02:00
|
|
|
cache:
|
2018-06-02 03:22:02 +02:00
|
|
|
key: "${CI_JOB_NAME}"
|
2018-01-15 06:20:04 +01:00
|
|
|
paths:
|
2018-06-02 03:22:02 +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
|
|
|
|
- master
|
2016-11-04 07:59:48 +01:00
|
|
|
- stable
|
2017-01-19 20:32:52 +01:00
|
|
|
- beta
|
|
|
|
- tags
|
2018-06-02 03:22:02 +02:00
|
|
|
- nightly
|
2017-01-19 20:32:52 +01:00
|
|
|
- triggers
|
2018-06-02 03:22:02 +02:00
|
|
|
|
|
|
|
.publishable_branches: # list of git refs for publishing builds to the "production" locations
|
|
|
|
only: &publishable_branches
|
|
|
|
- nightly # Our nightly builds from schedule, on `master`
|
|
|
|
- "v*" # Our version tags
|
2016-11-07 15:07:37 +01:00
|
|
|
- triggers
|
2018-06-02 03:22:02 +02:00
|
|
|
|
|
|
|
.collect_artifacts: &collect_artifacts
|
2016-11-04 07:59:48 +01:00
|
|
|
artifacts:
|
2018-06-02 03:22:02 +02:00
|
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
|
|
|
when: on_success
|
|
|
|
expire_in: 1 mos
|
2016-11-04 07:59:48 +01:00
|
|
|
paths:
|
2018-06-02 03:22:02 +02:00
|
|
|
- artifacts/
|
|
|
|
|
|
|
|
.collect_packages: &collect_packages
|
2016-11-07 15:07:37 +01:00
|
|
|
artifacts:
|
2018-06-02 03:22:02 +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-06-02 03:22:02 +02:00
|
|
|
- packages/
|
|
|
|
|
|
|
|
.determine_version: &determine_version |
|
|
|
|
export VERSION=$(grep -m 1 "version =" Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")
|
|
|
|
echo "Version" $VERSION
|
|
|
|
|
|
|
|
|
|
|
|
#### stage: test
|
|
|
|
|
|
|
|
test:rust:stable: &test
|
|
|
|
stage: test
|
2016-11-04 07:59:48 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/test.sh stable
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- rust-stable
|
|
|
|
|
|
|
|
.optional_test: &optional_test
|
|
|
|
<<: *test
|
|
|
|
allow_failure: true
|
2016-11-04 07:59:48 +01:00
|
|
|
only:
|
2016-11-07 15:07:37 +01:00
|
|
|
- triggers
|
2018-06-02 03:22:02 +02:00
|
|
|
- master
|
|
|
|
- nightly
|
|
|
|
|
|
|
|
test:rust:beta:
|
|
|
|
<<: *optional_test
|
2016-11-04 07:59:48 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/test.sh beta
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
test:rust:nightly:
|
|
|
|
<<: *optional_test
|
|
|
|
script:
|
|
|
|
- scripts/gitlab/test.sh nightly
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
#test:rustfmt:
|
|
|
|
# <<: *optional_test
|
|
|
|
# script:
|
|
|
|
# - scripts/gitlab/rustfmt.sh
|
|
|
|
|
|
|
|
#test:clippy:
|
|
|
|
# <<: *optional_test
|
|
|
|
# script:
|
|
|
|
# - scripts/gitlab/clippy.sh
|
|
|
|
|
|
|
|
test:coverage:
|
|
|
|
stage: test
|
2016-11-04 07:59:48 +01:00
|
|
|
only:
|
2018-06-02 03:22:02 +02:00
|
|
|
- master
|
|
|
|
- gitlab-next
|
2016-11-04 07:59:48 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/coverage.sh
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- shell
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
|
|
|
|
#### stage: build
|
|
|
|
|
|
|
|
build:linux:ubuntu:amd64: &build
|
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
2018-01-10 03:58:12 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/build-unix.sh
|
|
|
|
<<: *collect_artifacts
|
2018-01-10 03:58:12 +01:00
|
|
|
tags:
|
|
|
|
- rust-stable
|
2018-06-02 03:22:02 +02:00
|
|
|
|
|
|
|
build:linux:debian:amd64:
|
|
|
|
<<: *build
|
|
|
|
image: parity/rust-debian:gitlab-ci
|
|
|
|
variables:
|
|
|
|
LIBSSL: "libssl1.1 (>=1.1.0)"
|
|
|
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
|
|
|
|
|
|
|
build:linux:centos:x86_64:
|
|
|
|
<<: *build
|
|
|
|
image: parity/rust-centos:gitlab-ci
|
|
|
|
retry: 2 #if version `GLIBC_2.18' not found
|
|
|
|
|
|
|
|
build:linux:ubuntu:arm64:
|
|
|
|
<<: *build
|
|
|
|
image: parity/rust-arm64:gitlab-ci
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
|
|
|
|
|
|
build:linux:ubuntu:armhf:
|
|
|
|
<<: *build
|
|
|
|
image: parity/rust-armv7:gitlab-ci
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
|
|
|
|
|
|
build:linux:android:armhf:
|
|
|
|
<<: *build
|
|
|
|
image: parity/rust-android:gitlab-ci
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: armv7-linux-androideabi
|
|
|
|
|
|
|
|
build:macos:x86_64:
|
|
|
|
<<: *build
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-apple-darwin
|
2016-11-04 07:59:48 +01:00
|
|
|
tags:
|
|
|
|
- osx
|
2018-06-02 03:22:02 +02:00
|
|
|
<<: *collect_artifacts
|
|
|
|
|
|
|
|
build-windows-x86_64:
|
|
|
|
stage: build
|
|
|
|
only: *releaseable_branches
|
2016-11-07 15:07:37 +01:00
|
|
|
cache:
|
2018-06-02 03:22:02 +02:00
|
|
|
key: "%CI_JOB_NAME%"
|
2016-11-04 07:59:48 +01:00
|
|
|
paths:
|
2018-06-02 03:22:02 +02:00
|
|
|
- "%CI_PROJECT_DIR%/target/"
|
|
|
|
- "%CI_PROJECT_DIR%/cargo/"
|
|
|
|
variables:
|
|
|
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
2018-05-02 09:20:59 +02:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- sh scripts/gitlab/build-windows.sh
|
2018-05-02 09:20:59 +02:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- rust-windows
|
|
|
|
<<: *collect_artifacts
|
|
|
|
|
|
|
|
|
|
|
|
#### stage: package
|
|
|
|
|
|
|
|
package:ubuntu:deb:amd64: &package_unix
|
|
|
|
stage: package
|
|
|
|
only: *releaseable_branches
|
2017-01-25 19:48:36 +01:00
|
|
|
before_script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- *determine_version
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: amd64
|
|
|
|
IDENT: ubuntu
|
|
|
|
PKG: deb
|
|
|
|
LIBSSL: "libssl1.1 (>=1.1.0)"
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:amd64
|
2017-01-25 19:48:36 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/package-unix.sh
|
2017-01-25 19:48:36 +01:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- rust-stable
|
|
|
|
<<: *collect_packages
|
|
|
|
|
|
|
|
package:ubuntu:deb:arm64:
|
|
|
|
<<: *package_unix
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: arm64
|
|
|
|
IDENT: ubuntu
|
|
|
|
PKG: deb
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:arm64
|
|
|
|
|
|
|
|
package:ubuntu:deb:armhf:
|
|
|
|
<<: *package_unix
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: armhf
|
|
|
|
IDENT: ubuntu
|
|
|
|
PKG: deb
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:armhf
|
|
|
|
|
|
|
|
package:debian:deb:amd64:
|
|
|
|
<<: *package_unix
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: amd64
|
|
|
|
IDENT: debian
|
|
|
|
PKG: deb
|
|
|
|
dependencies:
|
|
|
|
- build:linux:debian:amd64
|
|
|
|
|
|
|
|
package:centos:rpm:x86_64:
|
|
|
|
<<: *package_unix
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: x86_64
|
|
|
|
IDENT: centos
|
|
|
|
PKG: rpm
|
|
|
|
LIBSSL: "libssl >= 1.0.0"
|
|
|
|
dependencies:
|
|
|
|
- build:linux:centos:x86_64
|
|
|
|
|
|
|
|
|
|
|
|
package:macos:pkg:x86_64:
|
|
|
|
<<: *package_unix
|
|
|
|
dependencies:
|
|
|
|
- build:macos:x86_64
|
2017-03-10 10:12:16 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/package-macos.sh
|
2017-03-10 10:12:16 +01:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- osx
|
|
|
|
|
|
|
|
package:linux:snap:amd64: &package_snap
|
|
|
|
stage: package
|
|
|
|
only: *releaseable_branches
|
|
|
|
before_script:
|
|
|
|
- *determine_version
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:amd64
|
2016-10-31 19:51:29 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/package-snap.sh
|
2016-10-31 19:51:29 +01:00
|
|
|
tags:
|
2016-11-25 19:57:58 +01:00
|
|
|
- rust-stable
|
2018-06-02 03:22:02 +02:00
|
|
|
<<: *collect_packages
|
|
|
|
|
|
|
|
package:linux:snap:arm64:
|
|
|
|
<<: *package_snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: arm64
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:arm64
|
|
|
|
|
|
|
|
package:linux:snap:armhf:
|
|
|
|
<<: *package_snap
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: armhf
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:armhf
|
|
|
|
|
|
|
|
package-windows-exe-x86_64:
|
|
|
|
stage: package
|
|
|
|
only: *releaseable_branches
|
|
|
|
dependencies:
|
|
|
|
- build-windows-x86_64
|
2016-11-07 17:16:34 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- sh scripts/gitlab/package-windows.sh
|
|
|
|
<<: *collect_packages
|
2016-11-07 17:16:34 +01:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- rust-windows
|
|
|
|
|
|
|
|
#### stage: publish
|
|
|
|
|
|
|
|
publish:linux:snap:amd64: &publish_snap
|
|
|
|
stage: publish
|
|
|
|
only: *publishable_branches
|
|
|
|
image: snapcore/snapcraft:stable
|
|
|
|
before_script:
|
|
|
|
- *determine_version
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: amd64
|
|
|
|
dependencies:
|
|
|
|
- package:linux:snap:amd64
|
2016-11-07 17:16:34 +01:00
|
|
|
script:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/publish-snap.sh
|
|
|
|
tags:
|
|
|
|
- rust-stable
|
|
|
|
|
|
|
|
publish:linux:snap:arm64:
|
|
|
|
<<: *publish_snap
|
|
|
|
before_script:
|
|
|
|
- *determine_version
|
|
|
|
- sleep 120
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: arm64
|
|
|
|
dependencies:
|
|
|
|
- package:linux:snap:arm64
|
|
|
|
|
|
|
|
publish:linux:snap:armhf:
|
|
|
|
<<: *publish_snap
|
|
|
|
before_script:
|
|
|
|
- *determine_version
|
|
|
|
- sleep 360
|
|
|
|
variables:
|
|
|
|
BUILD_ARCH: armhf
|
|
|
|
dependencies:
|
|
|
|
- package:linux:snap:armhf
|
|
|
|
|
|
|
|
publish:docker:parity:amd64: &publish_docker
|
|
|
|
stage: publish
|
|
|
|
only: *publishable_branches
|
|
|
|
dependencies:
|
|
|
|
- build:linux:ubuntu:amd64
|
2016-11-07 17:16:34 +01:00
|
|
|
tags:
|
2018-06-02 03:22:02 +02:00
|
|
|
- shell
|
|
|
|
script:
|
|
|
|
- scripts/gitlab/publish-docker.sh parity
|
|
|
|
|
|
|
|
publish:docker:parity-evm:amd64:
|
|
|
|
<<: *publish_docker
|
|
|
|
script:
|
|
|
|
- scripts/gitlab/publish-docker.sh parity-evm
|
|
|
|
|
|
|
|
publish:github:
|
|
|
|
stage: publish
|
|
|
|
only: *publishable_branches
|
|
|
|
dependencies:
|
|
|
|
- package:ubuntu:deb:amd64
|
|
|
|
- package:ubuntu:deb:armhf
|
|
|
|
- package:ubuntu:deb:arm64
|
|
|
|
- package:debian:deb:amd64
|
|
|
|
- package:centos:rpm:x86_64
|
|
|
|
- package:macos:pkg:x86_64
|
|
|
|
- package-windows-exe-x86_64
|
|
|
|
before_script:
|
|
|
|
- *determine_version
|
|
|
|
script:
|
|
|
|
- scripts/gitlab/push-github.sh
|
|
|
|
|
|
|
|
#### stage: push-release
|
|
|
|
|
|
|
|
push:release:
|
2016-12-20 17:54:09 +01:00
|
|
|
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:
|
2018-06-02 03:22:02 +02:00
|
|
|
- scripts/gitlab/push-release.sh
|
2016-12-20 17:54:09 +01:00
|
|
|
tags:
|
|
|
|
- curl
|