mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 05:38:00 +00:00
subkey build, cargo audit (#2752)
* subkey build, cargo audit * some fixes * cleanup * review * not to be launched on PRs * not to be launched on PRs 2 * check-runtime should run on PRs only * changed only to except, easier to read * fix no jobs ran * only: rewrites when it's last * only: -branches wasn't needed * benching subkey build * benching subkey build 2 * subkey check * not for 1.0 * cleanup
This commit is contained in:
+43
-29
@@ -7,18 +7,18 @@
|
||||
|
||||
|
||||
stages:
|
||||
- pre-test
|
||||
- test
|
||||
- build
|
||||
- publish
|
||||
- kubernetes
|
||||
- flaming-fir
|
||||
|
||||
image: parity/rust-builder:latest
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: fetch
|
||||
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
|
||||
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
CI_SERVER_NAME: "GitLab CI"
|
||||
DOCKER_OS: "debian:stretch"
|
||||
ARCH: "x86_64"
|
||||
@@ -38,17 +38,27 @@ variables:
|
||||
environment:
|
||||
name: parity-build
|
||||
|
||||
.compiler_info: &compiler_info
|
||||
.docker-env: &docker-env
|
||||
image: parity/rust-builder:latest
|
||||
before_script:
|
||||
- rustup show
|
||||
- cargo --version
|
||||
- sccache -s
|
||||
only:
|
||||
- tags
|
||||
- master
|
||||
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
|
||||
- schedules
|
||||
- web
|
||||
- /^[0-9]+$/ # PRs
|
||||
tags:
|
||||
- linux-docker
|
||||
|
||||
|
||||
#### stage: test
|
||||
|
||||
check-runtime:
|
||||
stage: test
|
||||
stage: pre-test
|
||||
image: parity/tools:latest
|
||||
<<: *kubernetes-build
|
||||
only:
|
||||
@@ -61,7 +71,7 @@ check-runtime:
|
||||
|
||||
|
||||
check-line-width:
|
||||
stage: test
|
||||
stage: pre-test
|
||||
image: parity/tools:latest
|
||||
<<: *kubernetes-build
|
||||
only:
|
||||
@@ -71,23 +81,34 @@ check-line-width:
|
||||
allow_failure: false
|
||||
|
||||
|
||||
test-linux-stable: &test
|
||||
cargo-audit:
|
||||
stage: pre-test
|
||||
<<: *docker-env
|
||||
except:
|
||||
- /^[0-9]+$/
|
||||
script:
|
||||
- cargo audit
|
||||
allow_failure: true
|
||||
|
||||
|
||||
cargo-check-subkey:
|
||||
stage: test
|
||||
<<: *compiler_info
|
||||
<<: *docker-env
|
||||
except:
|
||||
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
|
||||
script:
|
||||
- cd ./subkey
|
||||
- time cargo check --release # makes sense to save artifacts for building it
|
||||
- sccache -s
|
||||
|
||||
|
||||
test-linux-stable:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
variables:
|
||||
RUST_TOOLCHAIN: stable
|
||||
# Enable debug assertions since we are running optimized builds for testing
|
||||
# but still want to have debug assertions.
|
||||
RUSTFLAGS: -Cdebug-assertions=y
|
||||
TARGET: native
|
||||
tags:
|
||||
- linux-docker
|
||||
only:
|
||||
- tags
|
||||
- master
|
||||
- schedules
|
||||
- web
|
||||
- /^[0-9]+$/
|
||||
except:
|
||||
variables:
|
||||
- $DEPLOY_TAG
|
||||
@@ -126,11 +147,10 @@ test-linux-stable-int: &test
|
||||
|
||||
check-web-wasm:
|
||||
stage: test
|
||||
<<: *compiler_info
|
||||
<<: *docker-env
|
||||
allow_failure: true
|
||||
only:
|
||||
- master
|
||||
- /^[0-9]+$/
|
||||
except:
|
||||
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
|
||||
script:
|
||||
# WASM support is in progress. As more and more crates support WASM, we
|
||||
# should add entries here. See https://github.com/paritytech/substrate/issues/2416
|
||||
@@ -155,8 +175,6 @@ check-web-wasm:
|
||||
- time cargo web build -p substrate-telemetry
|
||||
- time cargo web build -p substrate-trie
|
||||
- sccache -s
|
||||
tags:
|
||||
- linux-docker
|
||||
|
||||
.build-only: &build-only
|
||||
only:
|
||||
@@ -169,13 +187,11 @@ check-web-wasm:
|
||||
build-linux-release:
|
||||
stage: build
|
||||
<<: *collect-artifacts
|
||||
<<: *docker-env
|
||||
<<: *build-only
|
||||
<<: *compiler_info
|
||||
except:
|
||||
variables:
|
||||
- $DEPLOY_TAG
|
||||
tags:
|
||||
- linux-docker
|
||||
script:
|
||||
- ./scripts/build.sh --locked
|
||||
- time cargo build --release --verbose
|
||||
@@ -197,7 +213,7 @@ build-linux-release:
|
||||
|
||||
build-rust-doc-release:
|
||||
stage: build
|
||||
<<: *compiler_info
|
||||
<<: *docker-env
|
||||
allow_failure: true
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
|
||||
@@ -206,8 +222,6 @@ build-rust-doc-release:
|
||||
paths:
|
||||
- ./crate-docs
|
||||
<<: *build-only
|
||||
tags:
|
||||
- linux-docker
|
||||
script:
|
||||
- ./scripts/build.sh --locked
|
||||
- rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds
|
||||
|
||||
Reference in New Issue
Block a user