Files
pezkuwi-subxt/polkadot/scripts/ci/gitlab/pipeline/check.yml
T
Alexander Samusev fc8d1765ef [ci] Split gitlab-ci config to separate files (#6031)
* [WIP][ci] Split gitlab-ci config to separate files

* add stage

* move short benches

* rename stage short_benchmark

* include short-benchmarks

* add check

* add test stage

* quickfix check-no-default-features

* add build stage

* add weights and publish

* rename stage

* rename stage

* fix publish miner image

* fix publish miner image

* add dag

* fix image

* start build-short-benchmark with the pipeline

* some more DAGs

* empty line to short-benchmarks

* add change from master

Co-authored-by: parity-processbot <>
2022-09-26 10:50:25 +02:00

98 lines
3.3 KiB
YAML

# This file is part of .gitlab-ci.yml
# Here are all jobs that are executed during "check" stage
check-runtime:
stage: check
image: paritytech/tools:latest
extends:
- .kubernetes-env
rules:
- if: $CI_COMMIT_REF_NAME =~ /^release-v[0-9]+\.[0-9]+.*$/ # i.e. release-v0.9.27
variables:
GITLAB_API: "https://gitlab.parity.io/api/v4"
GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api"
script:
- ./scripts/ci/gitlab/check_runtime.sh
allow_failure: true
cargo-fmt:
stage: check
extends:
- .docker-env
- .test-refs
script:
- cargo +nightly --version
- cargo +nightly fmt --all -- --check
allow_failure: true
spellcheck:
stage: check
extends:
- .docker-env
- .test-refs
script:
- cargo spellcheck --version
# compare with the commit parent to the PR, given it's from a default branch
- git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH}
- echo "___Spellcheck is going to check your diff___"
- cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
- time cargo spellcheck check -vvv --cfg=scripts/ci/gitlab/spellcheck.toml --checkers hunspell --code 1
$(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
allow_failure: true
check-try-runtime:
stage: check
extends:
- .docker-env
- .test-refs
- .compiler-info
script:
# Check that everything compiles with `try-runtime` feature flag.
- cargo check --features try-runtime --all
# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
# Works only in PRs
check-runtime-migration:
stage: check
extends:
- .docker-env
- .test-pr-refs
- .compiler-info
script:
- |
export has_runtimemigration_label=$(curl -sS -H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_PR_TOKEN" \
https://api.github.com/repos/paritytech/polkadot/issues/$CI_COMMIT_REF_NAME/labels | grep "E1" | wc -l)
- |
if [[ $has_runtimemigration_label != 0 ]]; then
echo "Found label runtimemigration. Running tests"
export RUST_LOG=remote-ext=debug,runtime=debug
time cargo test --release -p westend-runtime -p polkadot-runtime -p kusama-runtime --features try-runtime
else
echo "runtimemigration label not found. Skipping"
fi
allow_failure: true
# is broken, need to fix
check-no-default-features:
stage: check
extends:
- .docker-env
- .test-refs
- .compiler-info
script:
# Check that polkadot-cli will compile no default features.
- pushd ./node/service && cargo check --no-default-features && popd
- pushd ./cli && cargo check --no-default-features --features "service" && popd
- exit 0
# this is artificial job to run some build and tests using DAG
job-starter:
stage: check
image: paritytech/tools:latest
extends:
- .kubernetes-env
- .common-refs
script:
- echo ok