openethereum/.gitlab-ci.yml

297 lines
7.6 KiB
YAML
Raw Normal View History

stages:
2016-11-04 06:45:26 +01:00
- test
2017-03-08 23:34:00 +01:00
- build
- package
- publish
2018-08-02 14:35:53 +02:00
- docs
image: parity/rust:gitlab-ci
variables:
CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
BUILD_TARGET: ubuntu
BUILD_ARCH: amd64
CARGO_TARGET: x86_64-unknown-linux-gnu
cache:
key: "${CI_JOB_NAME}"
paths:
- ${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
- stable
- beta
- tags
.publishable_branches: # list of git refs for publishing builds to the "production" locations
only: &publishable_branches
- nightly # Our nightly builds from schedule, on `master`
- "v2*" # Our version tags
.collect_artifacts: &collect_artifacts
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: on_success
expire_in: 1 mos
paths:
- artifacts/
.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
script:
- scripts/gitlab/test.sh stable
tags:
- rust-stable
.optional_test: &optional_test
<<: *test
allow_failure: true
only:
- master
test:rust:beta:
<<: *optional_test
script:
- scripts/gitlab/test.sh beta
test:rust:nightly:
<<: *optional_test
script:
- scripts/gitlab/test.sh nightly
#test:rustfmt:
# <<: *optional_test
# script:
# - scripts/gitlab/rustfmt.sh
#test:clippy:
# <<: *optional_test
# script:
# - scripts/gitlab/clippy.sh
test:coverage:
stage: test
only:
- master
script:
- scripts/gitlab/coverage.sh
tags:
- shell
allow_failure: true
#### stage: build
build:linux:ubuntu:amd64: &build
stage: build
only: *releaseable_branches
variables:
CARGO_TARGET: x86_64-unknown-linux-gnu
script:
- scripts/gitlab/build-unix.sh
<<: *collect_artifacts
tags:
- rust-stable
2018-08-02 14:35:53 +02:00
allow_failure: true
2018-08-02 14:35:53 +02:00
build:linux:ubuntu:i386:
<<: *build
2018-08-02 14:35:53 +02:00
image: parity/rust-i686:gitlab-ci
variables:
2018-08-02 14:35:53 +02:00
CARGO_TARGET: i686-unknown-linux-gnu
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
2018-08-24 22:05:00 +02:00
build:darwin:macos:x86_64:
<<: *build
variables:
CARGO_TARGET: x86_64-apple-darwin
2018-08-02 14:35:53 +02:00
CC: gcc
CXX: g++
tags:
- osx
<<: *collect_artifacts
2018-08-24 22:05:00 +02:00
build:windows:msvc:x86_64:
stage: build
only: *releaseable_branches
cache:
key: "%CI_JOB_NAME%"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
2018-08-02 14:35:53 +02:00
# No cargo caching, since fetch-locking on Windows gets stuck
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
2018-05-02 09:20:59 +02:00
script:
- sh scripts/gitlab/build-windows.sh
2018-05-02 09:20:59 +02:00
tags:
- rust-windows
<<: *collect_artifacts
#### stage: package
package:linux:snap:amd64: &package_snap
stage: package
only: *releaseable_branches
2018-08-02 14:35:53 +02:00
cache: {}
before_script:
- *determine_version
2018-08-02 14:35:53 +02:00
variables:
CARGO_TARGET: x86_64-unknown-linux-gnu
dependencies:
- build:linux:ubuntu:amd64
script:
- scripts/gitlab/package-snap.sh
tags:
2016-11-25 19:57:58 +01:00
- rust-stable
2018-08-02 14:35:53 +02:00
<<: *collect_artifacts
package:linux:snap:i386:
<<: *package_snap
variables:
BUILD_ARCH: i386
CARGO_TARGET: i686-unknown-linux-gnu
dependencies:
- build:linux:ubuntu:i386
package:linux:snap:arm64:
<<: *package_snap
variables:
BUILD_ARCH: arm64
2018-08-02 14:35:53 +02:00
CARGO_TARGET: aarch64-unknown-linux-gnu
dependencies:
- build:linux:ubuntu:arm64
package:linux:snap:armhf:
<<: *package_snap
variables:
BUILD_ARCH: armhf
2018-08-02 14:35:53 +02:00
CARGO_TARGET: armv7-unknown-linux-gnueabihf
dependencies:
- build:linux:ubuntu:armhf
#### stage: publish
publish:linux:snap:amd64: &publish_snap
stage: publish
only: *publishable_branches
image: snapcore/snapcraft:stable
2018-08-02 14:35:53 +02:00
cache: {}
before_script:
- *determine_version
variables:
BUILD_ARCH: amd64
dependencies:
- package:linux:snap:amd64
script:
- scripts/gitlab/publish-snap.sh
tags:
- rust-stable
2018-08-02 14:35:53 +02:00
publish:linux:snap:i386:
<<: *publish_snap
before_script:
- *determine_version
variables:
BUILD_ARCH: i386
dependencies:
- package:linux:snap:i386
publish:linux:snap:arm64:
<<: *publish_snap
before_script:
- *determine_version
variables:
BUILD_ARCH: arm64
dependencies:
- package:linux:snap:arm64
publish:linux:snap:armhf:
<<: *publish_snap
before_script:
- *determine_version
variables:
BUILD_ARCH: armhf
dependencies:
- package:linux:snap:armhf
publish:docker:parity:amd64: &publish_docker
stage: publish
only: *publishable_branches
2018-08-02 14:35:53 +02:00
cache: {}
dependencies:
- build:linux:ubuntu:amd64
tags:
- shell
2018-08-02 14:35:53 +02:00
allow_failure: true
script:
- scripts/gitlab/publish-docker.sh parity
publish:docker:parity-evm:amd64:
<<: *publish_docker
script:
- scripts/gitlab/publish-docker.sh parity-evm
2018-08-24 22:05:00 +02:00
publish:github:and:s3:
stage: publish
only: *publishable_branches
2018-08-02 14:35:53 +02:00
cache: {}
dependencies:
2018-08-02 14:35:53 +02:00
- build:linux:ubuntu:amd64
- build:linux:ubuntu:i386
- build:linux:ubuntu:armhf
- build:linux:ubuntu:arm64
- build:macos:x86_64
- build-windows-x86_64
before_script:
- *determine_version
script:
2018-08-02 14:35:53 +02:00
- scripts/gitlab/push.sh
tags:
- shell
allow_failure: true
2018-08-02 14:35:53 +02:00
####stage: docs
2018-08-02 14:35:53 +02:00
json:rpc:docs:
stage: docs
2016-12-20 17:54:09 +01:00
only:
- tags
2018-08-02 14:35:53 +02:00
cache: {}
2016-12-20 17:54:09 +01:00
script:
2018-08-02 14:35:53 +02:00
- scripts/gitlab/rpc-docs.sh
2016-12-20 17:54:09 +01:00
tags:
2018-08-02 14:35:53 +02:00
- shell