ci: reduce gitlab pipelines significantly
This commit is contained in:
parent
f3b806b471
commit
aa34dfad3e
232
.gitlab-ci.yml
232
.gitlab-ci.yml
@ -1,7 +1,6 @@
|
|||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- package
|
|
||||||
- publish
|
- publish
|
||||||
- docs
|
- docs
|
||||||
|
|
||||||
@ -10,7 +9,6 @@ image: parity/rust:gitlab-ci
|
|||||||
variables:
|
variables:
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
|
CARGO_HOME: "${CI_PROJECT_DIR}/cargo"
|
||||||
|
|
||||||
BUILD_TARGET: ubuntu
|
BUILD_TARGET: ubuntu
|
||||||
BUILD_ARCH: amd64
|
BUILD_ARCH: amd64
|
||||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
@ -23,16 +21,10 @@ cache:
|
|||||||
|
|
||||||
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
|
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
|
||||||
only: &releaseable_branches
|
only: &releaseable_branches
|
||||||
- master
|
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- tags
|
- 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
|
.collect_artifacts: &collect_artifacts
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
||||||
@ -51,7 +43,7 @@ cache:
|
|||||||
|
|
||||||
#### stage: test
|
#### stage: test
|
||||||
|
|
||||||
test-linux-rust-stable: &test
|
test-linux:
|
||||||
stage: test
|
stage: test
|
||||||
variables:
|
variables:
|
||||||
RUN_TESTS: "true"
|
RUN_TESTS: "true"
|
||||||
@ -60,27 +52,7 @@ test-linux-rust-stable: &test
|
|||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
|
|
||||||
test-linux-rust-beta:
|
test-darwin:
|
||||||
stage: test
|
|
||||||
variables:
|
|
||||||
RUN_TESTS: "true"
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/test.sh beta
|
|
||||||
tags:
|
|
||||||
- rust-stable
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
test-linux-rust-nightly:
|
|
||||||
stage: test
|
|
||||||
variables:
|
|
||||||
RUN_TESTS: "true"
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/test.sh nightly
|
|
||||||
tags:
|
|
||||||
- rust-stable
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
test-darwin-rust-stable:
|
|
||||||
stage: test
|
stage: test
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: x86_64-apple-darwin
|
CARGO_TARGET: x86_64-apple-darwin
|
||||||
@ -91,27 +63,14 @@ test-darwin-rust-stable:
|
|||||||
- scripts/gitlab/test.sh stable
|
- scripts/gitlab/test.sh stable
|
||||||
tags:
|
tags:
|
||||||
- osx
|
- osx
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
test-android-rust-stable:
|
test-windows:
|
||||||
stage: test
|
|
||||||
image: parity/rust-android:gitlab-ci
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: armv7-linux-androideabi
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/test.sh stable
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
test-windows-rust-stable:
|
|
||||||
stage: test
|
stage: test
|
||||||
cache:
|
cache:
|
||||||
key: "${CI_JOB_NAME}"
|
key: "${CI_JOB_NAME}"
|
||||||
paths:
|
paths:
|
||||||
- "%CI_PROJECT_DIR%/target/"
|
- "%CI_PROJECT_DIR%/target/"
|
||||||
- "%CI_PROJECT_DIR%/cargo/"
|
- "%CI_PROJECT_DIR%/cargo/"
|
||||||
# No cargo caching, since fetch-locking on Windows gets stuck
|
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: x86_64-pc-windows-msvc
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
||||||
RUN_TESTS: "true"
|
RUN_TESTS: "true"
|
||||||
@ -119,34 +78,10 @@ test-windows-rust-stable:
|
|||||||
- sh scripts/gitlab/test.sh stable
|
- sh scripts/gitlab/test.sh stable
|
||||||
tags:
|
tags:
|
||||||
- rust-windows
|
- rust-windows
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
.optional_test: &optional_test
|
|
||||||
<<: *test
|
|
||||||
allow_failure: true
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
test-lint-rustfmt:
|
|
||||||
<<: *optional_test
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/rustfmt.sh
|
|
||||||
|
|
||||||
test-lint-clippy:
|
|
||||||
<<: *optional_test
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/clippy.sh
|
|
||||||
|
|
||||||
test-coverage-kcov:
|
|
||||||
<<: *optional_test
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/coverage.sh
|
|
||||||
tags:
|
|
||||||
- shell
|
|
||||||
|
|
||||||
#### stage: build
|
#### stage: build
|
||||||
|
|
||||||
build-linux-ubuntu-amd64: &build
|
build-linux:
|
||||||
stage: build
|
stage: build
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
variables:
|
variables:
|
||||||
@ -157,49 +92,7 @@ build-linux-ubuntu-amd64: &build
|
|||||||
tags:
|
tags:
|
||||||
- rust-stable
|
- rust-stable
|
||||||
|
|
||||||
build-linux-ubuntu-i386:
|
build-darwin:
|
||||||
<<: *build
|
|
||||||
only: *releaseable_branches
|
|
||||||
image: parity/rust-i686:gitlab-ci
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: i686-unknown-linux-gnu
|
|
||||||
tags:
|
|
||||||
- rust-i686
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
build-linux-ubuntu-arm64:
|
|
||||||
<<: *build
|
|
||||||
only: *releaseable_branches
|
|
||||||
image: parity/rust-arm64:gitlab-ci
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
build-linux-ubuntu-armhf:
|
|
||||||
<<: *build
|
|
||||||
only: *releaseable_branches
|
|
||||||
image: parity/rust-armv7:gitlab-ci
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
build-linux-android-armhf:
|
|
||||||
stage: build
|
|
||||||
only: *releaseable_branches
|
|
||||||
image: parity/rust-android:gitlab-ci
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: armv7-linux-androideabi
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/build-unix.sh
|
|
||||||
tags:
|
|
||||||
- rust-arm
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
build-darwin-macos-x86_64:
|
|
||||||
stage: build
|
stage: build
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
variables:
|
variables:
|
||||||
@ -212,7 +105,7 @@ build-darwin-macos-x86_64:
|
|||||||
- osx
|
- osx
|
||||||
<<: *collect_artifacts
|
<<: *collect_artifacts
|
||||||
|
|
||||||
build-windows-msvc-x86_64:
|
build-windows:
|
||||||
stage: build
|
stage: build
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
cache:
|
cache:
|
||||||
@ -220,7 +113,6 @@ build-windows-msvc-x86_64:
|
|||||||
paths:
|
paths:
|
||||||
- "%CI_PROJECT_DIR%/target/"
|
- "%CI_PROJECT_DIR%/target/"
|
||||||
- "%CI_PROJECT_DIR%/cargo/"
|
- "%CI_PROJECT_DIR%/cargo/"
|
||||||
# No cargo caching, since fetch-locking on Windows gets stuck
|
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: x86_64-pc-windows-msvc
|
CARGO_TARGET: x86_64-pc-windows-msvc
|
||||||
script:
|
script:
|
||||||
@ -229,123 +121,39 @@ build-windows-msvc-x86_64:
|
|||||||
- rust-windows
|
- rust-windows
|
||||||
<<: *collect_artifacts
|
<<: *collect_artifacts
|
||||||
|
|
||||||
#### stage: package
|
|
||||||
|
|
||||||
package-linux-snap-amd64: &package_snap
|
|
||||||
stage: package
|
|
||||||
only: *releaseable_branches
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
image: parity/snapcraft:gitlab-ci
|
|
||||||
cache: {}
|
|
||||||
before_script: *determine_version
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
|
||||||
dependencies:
|
|
||||||
- build-linux-ubuntu-amd64
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/package-snap.sh
|
|
||||||
tags:
|
|
||||||
- rust-stable
|
|
||||||
<<: *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
|
|
||||||
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
||||||
dependencies:
|
|
||||||
- build-linux-ubuntu-arm64
|
|
||||||
|
|
||||||
package-linux-snap-armhf:
|
|
||||||
<<: *package_snap
|
|
||||||
variables:
|
|
||||||
BUILD_ARCH: armhf
|
|
||||||
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
||||||
dependencies:
|
|
||||||
- build-linux-ubuntu-armhf
|
|
||||||
|
|
||||||
#### stage: publish
|
#### stage: publish
|
||||||
|
|
||||||
publish-linux-snap-amd64: &publish_snap
|
publish-docker:
|
||||||
stage: publish
|
stage: publish
|
||||||
only: *publishable_branches
|
only:
|
||||||
image: parity/snapcraft:gitlab-ci
|
- master
|
||||||
cache: {}
|
- stable
|
||||||
before_script: *determine_version
|
- beta
|
||||||
variables:
|
- tags
|
||||||
BUILD_ARCH: amd64
|
|
||||||
dependencies:
|
|
||||||
- package-linux-snap-amd64
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/publish-snap.sh
|
|
||||||
tags:
|
|
||||||
- rust-stable
|
|
||||||
|
|
||||||
publish-linux-snap-i386:
|
|
||||||
<<: *publish_snap
|
|
||||||
variables:
|
|
||||||
BUILD_ARCH: i386
|
|
||||||
dependencies:
|
|
||||||
- package-linux-snap-i386
|
|
||||||
|
|
||||||
publish-linux-snap-arm64:
|
|
||||||
<<: *publish_snap
|
|
||||||
variables:
|
|
||||||
BUILD_ARCH: arm64
|
|
||||||
dependencies:
|
|
||||||
- package-linux-snap-arm64
|
|
||||||
|
|
||||||
publish-linux-snap-armhf:
|
|
||||||
<<: *publish_snap
|
|
||||||
variables:
|
|
||||||
BUILD_ARCH: armhf
|
|
||||||
dependencies:
|
|
||||||
- package-linux-snap-armhf
|
|
||||||
|
|
||||||
publish-docker-parity-amd64: &publish_docker
|
|
||||||
stage: publish
|
|
||||||
only: *releaseable_branches
|
|
||||||
cache: {}
|
cache: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux-ubuntu-amd64
|
- build-linux
|
||||||
tags:
|
tags:
|
||||||
- shell
|
- shell
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/publish-docker.sh parity
|
- scripts/gitlab/publish-docker.sh parity
|
||||||
|
|
||||||
publish-docker-parityevm-amd64:
|
publish-awss3:
|
||||||
<<: *publish_docker
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/publish-docker.sh parity-evm
|
|
||||||
|
|
||||||
publish-github-and-s3:
|
|
||||||
stage: publish
|
stage: publish
|
||||||
only: *publishable_branches
|
only:
|
||||||
|
- nightly
|
||||||
|
- /^v2.*$/
|
||||||
cache: {}
|
cache: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux-ubuntu-amd64
|
- build-linux
|
||||||
- build-linux-ubuntu-i386
|
- build-darwin
|
||||||
- build-linux-ubuntu-armhf
|
- build-windows
|
||||||
- build-linux-ubuntu-arm64
|
|
||||||
- build-darwin-macos-x86_64
|
|
||||||
- build-windows-msvc-x86_64
|
|
||||||
before_script: *determine_version
|
before_script: *determine_version
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/push.sh
|
- scripts/gitlab/push.sh
|
||||||
tags:
|
tags:
|
||||||
- shell
|
- shell
|
||||||
|
|
||||||
####stage: docs
|
|
||||||
|
|
||||||
docs-rpc-json:
|
docs-rpc-json:
|
||||||
stage: docs
|
stage: docs
|
||||||
only:
|
only:
|
||||||
|
Loading…
Reference in New Issue
Block a user