Commit Graph

74 Commits

Author SHA1 Message Date
Mira Ressel 040011a056 ci: drop skip-if-draft job (#13961)
It's been effectively disabled for half a year already, and according to
internal discussion we don't want it back.
2023-04-20 14:02:40 +02:00
Mira Ressel 378f68a6d1 Fail dependant checks on cargo check warnings (#13922)
* Fail dependant checks on cargo check warnings

* Adjust feature flags for check-dependent-polkadot
2023-04-14 14:16:17 +02:00
Mira Ressel 8953feaeb2 Refactor the automatic-crate-publishing logic, make triggered pipelines uninterruptible as well (#13908)
* Use a new approach to make automatic-crate-publishing uninterruptible

It's not neccessary to dynamically change the `interruptible` setting
for *all* jobs as the old approach does; gitlab already considers a
pipeline uninterruptible as soon as a single uninterruptible job has
started (cf https://docs.gitlab.com/ee/ci/yaml/#interruptible).

IMO this approach is more readable, as it avoids dynamically loading the
.defaults section from different files based on import conditions; the
logic is now shorter and entirely contained in the main .gitlab-ci.yml.

* Make triggered multi-project pipelines uninterruptible
2023-04-13 20:17:12 +02:00
Mira Ressel 84c9e2f63a invoke clippy with --locked (#13882) 2023-04-12 12:05:11 +02:00
Mira Ressel 4e32ae1fbe use stable rust toolchain in ci (#13830)
cargo-fmt stays on the nightly pipeline; our fmt config uses a heap of
unstable features.
2023-04-11 17:02:50 +02:00
Vladimir Istyufeev 9c9492476c CI: rephrase RUSTFLAGS (#13735) 2023-03-28 15:41:10 +04:00
Vladimir Istyufeev 551367d4cb CI: Investigate why RUSTFLAGS differs on master and PRs (#13686) 2023-03-28 04:00:18 +04:00
Mira Ressel 6213161e33 add a new ci job to fuzz sp-arithmetic (#13673)
as requested in https://github.com/paritytech/ci_cd/issues/761
2023-03-27 07:23:53 +02:00
Mira Ressel 3d40d08bf8 only push docker descriptions on master branch pipelines (#13664)
Currently those jobs also get included in multi-project pipelines such
as https://gitlab.parity.io/parity/mirrors/scripts/-/pipelines/255546,
even when the description hasn't actually changed, because `changes:`
conditions always evaluate to true on non-branch pipelines.
2023-03-21 14:06:55 +02:00
Sergejs Kostjucenko 36fab3268c fix publish docker description ci job (#13663)
* fix publish docker description ci job

* remove publish-refs from docker description jobs
2023-03-21 14:05:26 +02:00
Mira Ressel b117dbdf08 refactor cargo-check-benches logic
* fix fetch refspec
* assume base is master if the api call fails
* merge master into pr branch rather than the other way around; same
  effect but imo cleaner and more readable
* don't re-fetch pr branch, we want to test the version our pipeline is
  running on
2023-03-16 15:57:05 +01:00
Mira Ressel 3a9e37c0a7 fix BASE lookup in cargo-check-benches 2023-03-16 15:57:05 +01:00
Mira Ressel 8945c1bd42 timestamp gitlab ci job outputs (#13605)
* timestamp gitlab ci job outputs

Based on previous work by @alvicsam in #13047.

* inline timestamp script

Some of our jobs don't check out the substrate repo.

* include .timestamp in pipelines overriding the default before_script

Still not including it in the zombienet jobs, they have their own
timestamping anyway.

* move timestamp.yml to shared pipeline repo

https://gitlab.parity.io/parity/infrastructure/ci_cd/shared
2023-03-15 16:37:34 +00:00
Mira Ressel 84638524e7 Automatically format ci pipeline specs with prettier (#13441)
* [ci] Deduplicate variables: sections in pipeline specs

The prettier yaml parser doesn't like these.

* [ci] provide git clean filter to format pipeline specs

* [ci] Reformat pipeline specs with prettier
2023-02-24 15:02:30 +00:00
Sergejs Kostjucenko 2568c6d48b Move rules into common place (#13428) 2023-02-23 16:53:03 +02:00
Sergejs Kostjucenko 0669b8bb05 fix docker description publishing (#13399) 2023-02-16 18:41:10 +02:00
Sergejs Kostjucenko 4ff906860c fix image name (#13398) 2023-02-16 14:37:59 +02:00
Alexander Samusev bcd6484cac [ci] Add dependencies for publish-crates (#13397)
* [ci] Add dependencies for publishsing crates

* apply review comments

* fix needs
2023-02-16 13:10:40 +01:00
Alexander Samusev d5e1fcc471 [ci] Move publish-crates-locally to publish stage (#13395) 2023-02-16 12:09:32 +01:00
Sergejs Kostjucenko 3c0d8fe149 CI add subkey docker image description and CI job to publish it to the hub.docker.com (#13392)
* Add subkey docker image description and ci job to publish it

* Add link to docs

* fix formatting

* fix ci
2023-02-15 22:35:16 +02:00
Michal Kucharczyk cad4982afd zombienet: warp-sync tests for validators (#13078)
* zombienet validators warp sync draft

Sketch of warp-sync test for validators.
Not tested.

Follow-up of: #12769

* yet another warp-sync scenario added

- all validators are synced from DB,
- some full nodes are synced from DB,
- full-node is warp-synced

* fixes

* fixes

* missing files

* path fixed

---------

Co-authored-by: parity-processbot <>
2023-02-07 10:28:18 +01:00
Bastian Köcher 1da71f0226 CI: Rewrite check-each-crate in python (#13238)
* CI: Rewrite `check-each-crate` in python

This is a much better readable version of the script and it should also work on Macos and not
siltently fail ;)

* Fix dumb bugs and print everything to stderr

* Don't buffer Python output

* 🤦

* 🤦 🤦

* Use check all until we have more macos runners

* Update scripts/ci/gitlab/check-each-crate.py

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update scripts/ci/gitlab/pipeline/test.yml

Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-01-25 22:49:03 +00:00
Michal Kucharczyk d85fd6b527 zobmienet tests are not supposed to fail (#13015)
* zobmienet tests are not supposed to fail

* Update scripts/ci/gitlab/pipeline/zombienet.yml

Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>

Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
2023-01-18 16:26:12 +01:00
JP 21141f5d4c More improvements for the crate publishing pipeline (#13153)
* more improvements for the crate publishing pipeline

* move default definitions to the publish-crates script

* add script to check the crate publishing pipeline at the start

* fix yaml references

* move more variables to .crates-publishing-pipeline

* separate .crates-publishing-pipeline from .crates-publishing-variables

* clean up redundant and unused code
2023-01-16 14:03:46 +00:00
Vladimir Istyufeev 3af93b8a3a CI: Code mark to request a pipeline failure (#13139) 2023-01-13 20:21:44 +04:00
JP 406e8ca417 remove update-node-template (#13100)
will be moved to polkadot's pipeline

ref https://github.com/paritytech/release-engineering/issues/142
2023-01-11 09:03:24 +00:00
JP 72f086b795 Avoid unintentionally canceling the scheduled crate publishing job (#13088)
* avoid unintentionally canceling the scheduled crate publishing job

because publish-crates and publish-crates-manual share the resource group
"crates-publishing", any instance of publish-crates-manual cancels a running
instance of publish-crates, as demonstrated by
https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2212179

a workaround for that unintended interaction is to avoid creating instances of
publish-crates-manual and instead require pipelines to be triggered manually by
checking $CI_JOB_MANUAL == "true"

* check manual pipelines by $CI_PIPELINE_SOURCE instead of $CI_JOB_MANUAL

* make crate-publishing pipelines uninterruptible

* use conditional includes to work around interruptible limitations

* organize comments

* remove interruptible from common pipeline

* wip: check include

* wip: check include

* fix include

* fix include

* fix include

* fix yaml

* fix yaml

* remove shared common-pipeline

* wip: retry common-pipeline

* move .default-template to .gitlab-ci.yml

* fix the pipeline

add comments

* fix default-pipeline.yml

* revert publish-crates-manual to when: manual

* move "needs:" back to publish-crates

* avoid manual repetition

* improve previous commit

* try to avoid manual repetition

* fix indentation

* minor adjustments

* move defaults to top of .gitlab-ci.yml

* fix positioning on default in the diff

* comments

* indentation

* Apply suggestions from code review

Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>

Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
2023-01-10 12:01:44 +00:00
JP 3cce86c02c change crates publishing to be scheduled (#13002) 2022-12-22 12:21:30 +00:00
João Paulo Silva de Souza a5cab922a5 Set WASM_BUILD_WORKSPACE_HINT before starting CI jobs (#12816)
* set WASM_BUILD_WORKSPACE_HINT

this enables wasm-builder to find the Cargo.lock from within generated packages

* wip: try out https://github.com/paritytech/pipeline-scripts/pull/90

* wip: fixup

* wip

* revert ci skip

* set up WASM_BUILD_WORKSPACE_HINT for .kubernetes-env as well

* Update scripts/ci/gitlab/pipeline/publish.yml

Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>

Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
2022-12-16 12:29:55 +00:00
João Paulo Silva de Souza 79acac7909 increase timeout for publishing (#12934)
necessary when lots of crates need to be published, as demonstrated by https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2158667
2022-12-15 12:19:50 +00:00
Alexander Samusev 3e0a1904b7 [ci] add job switcher (#12922) 2022-12-14 12:36:33 +01:00
João Paulo Silva de Souza d4633c672f use custom environment for publishing crates (#12912) 2022-12-13 11:42:50 +00:00
Vlad e8b48f3b9b Checkout to the branch HEAD explicitly in build-linux-substrate (#12876) 2022-12-08 20:58:52 +03:00
Michal Kucharczyk 39cb3b06cd zombienet: warp-sync integration test added (#12675)
* zombienet: warp-sync integration test added

* spelling

* Readme corrected

* dir name updated

* Check second phase of warp sync

* zombienet pipeline enable + naive test network

* zombienet stage added

* paritypr/substrate-debug image added for zombienet testing

* debugs added

* debugs added

* buildah problem fixed

* rollback

* runner tag

* test name corrected

* dir renamed (regex problem)

* common code clean up

* common code clean up

* fix

* warp sync test improvements

* full sha used

as short is too short (https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2051228#L38)

* disable tracing for nodes

* COMMON_USER -> DOCKERIO_USER

* refs reworked

* paritypr/substrate image used

* DOCKERIO -> DOCKER

* generate-ws-db toml cleanup

* improvements

* fix

* raw chain spec used

* zombienet v1.3.18 used

* zombienet: warp sync test enabled

* chain-spec path corrected

* log parsing improved

Checking if log does not container error or verification failed messages

* warp sync test: removed validators

* fix

* review remarks applied

* dir test name changed: 0000_block_building -> 0000-block-building

* transaction finalized test added

* transaction finalized test: error handling improved

* trigger CI job

* trigger CI job

* trigger CI job

* trigger CI job

* Explicitly touch `version.rs` to invalidate the related cache

* zombienet add logs as artifacts

* Revert "Explicitly touch `version.rs` to invalidate the related cache"

This reverts commit 9d00ccfe897a280581156c281961a32665dba6d5.

* file naming changed

Co-authored-by: parity-processbot <>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>
Co-authored-by: Javier Viola <javier@parity.io>
2022-12-07 22:44:40 +00:00
João Paulo Silva de Souza 8751f88fc7 Implement crate publishing on CI (#12768)
* implement crate publishing from CI

* fix indentation

* use resource_group for job exclusivity

ensure that at most one instance of the publish-crates job is running at any given time to prevent race conditions

* correct publish = false

* Remove YAML anchors as GitLab's `extends:` doesn't need it

* Temporarily force cache upload for the new jobs

* Revert `RUSTY_CACHIER_FORCE_UPLOAD`

* pin libp2p-tcp=0.37.0 for sc-telemetry

* Revert "pin libp2p-tcp=0.37.0 for sc-telemetry"

This reverts commit 29146bfad6c31e8cf0e2f17ad92a71bb81a373af.

* always collect generated crates

* increase timeout for publish-crates-template

* Force upload the new job cache again

* Revert "Force upload the new job cache again"

This reverts commit 5a5feee1b2c51fdef768b25a76be4c3949ec1c99.

* reformat

* improve timeout explanation

* s/usual/average

Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>
2022-12-07 18:08:48 +00:00
Alexander Theißen 32578cb010 Remove sandboxing host function interface (#12852)
* Remove sandboxing interface

* Remove unused struct
2022-12-07 12:48:30 +00:00
Oliver Tale-Yazdi 04e883d310 Require rust-features check (#12796)
* Typo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Move rust feature check to docker and require not to fail

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add .docker-env

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Move test-rust-features check back to kubernetes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-11-29 16:19:36 +00:00
João Paulo Silva de Souza e69c3649b5 Sort crates before splitting them into groups (+ some improvements) (#12755)
* sort crates before splitting them into groups

this is useful so that crates always get routed to a specific group for a given version of the source code, which means that jobs for each batch can be reliably retried individually

* more verbose output

* misc improvements

* put uniq after sort

uniq filters by adjacent lines

* shellcheck

* rm useless backlashes

* handle edge case of no crates detected
2022-11-24 12:09:14 +00:00
João Paulo Silva de Souza eae3299ba5 Check all crates (#12709)
* check all crates individually

It's relevant to check workspace crates individually because otherwise their compilation problems
due to feature misconfigurations won't be caught, as exemplified by
https://github.com/paritytech/substrate/issues/12705

* adapt to lack of multiple macos runners

https://github.com/paritytech/substrate/pull/12709#discussion_r1022868752

* fix cancel-pipeline-cargo-check-each-crate-macos

* fix cargo-check-each-crate-macos again

* time command execution

* fix YAML anchors

* add explanation for rounding division

* ensure the minimum of one crate per group

* collect artifacts for pipeline stopper

* revert hardcoded crates_per_group

* re-add crates_per_group=1
2022-11-21 12:49:53 +01:00
Alexander Samusev a9e85ecdfb [ci] fix buildah for publishing docker (#12703) 2022-11-15 09:11:40 +01:00
Alexander Samusev e649108464 [ci] Add DAG for build-rustdoc and check-dependent-project (#12687)
* [ci] Debug ci runner

* try gha

* allow mac jobs fail

* add dags

* install protoc

* fix protobuf name

* fix dags

* remove allow fail for mac jobs

* remove gha

* adjust cargo-check-macos
2022-11-14 15:55:57 +01:00
Daniel Shiposha 73a65711e8 fix: construct_runtime multiple features (#12594)
* fix: construct_runtime multiple features

* Update frame/support/procedural/src/construct_runtime/mod.rs

Co-authored-by: Bastian Köcher <git@kchr.de>
2022-11-02 00:10:43 +01:00
Alexander Samusev 86744b6b16 [ci] cargo-check-benches against different base branches (#12557) 2022-10-27 10:54:07 +02:00
Oliver Tale-Yazdi 62d72f9258 CI: Enable debug assertions in Wasmer sandbox test (#12540)
* CI: Enable debug assertions in Wasmer sandbox test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix feature dependant import

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-10-20 20:57:00 +02:00
Oliver Tale-Yazdi 52744e4ddb CI check against Rust feature bleed (#12341)
* CI check for rust feature bleed

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Cargo not available

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Handle missing programs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Check for deps

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add doc

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use correct CI image

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove --offline

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Install cargo-workspaces

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove cargo-workspaces dep

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix try-runtime feature

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix more features...

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use pipeline-script

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* 🤡

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make stupid change to test the CI

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* This reverts commit ad2746aa117fa7cb473521113a9bec89aaf26484.

* Use correct branch

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Allow failure

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make stupid change to test the CI

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Make stupid change to test the CI"

This reverts commit 16ec00e1675c7ec57c988315549ff71e832a3093.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-10-19 20:55:20 +00:00
Vlad f1b34ccd5a Fix cargo-check-benches job (#12301) 2022-09-20 12:15:48 +03:00
Vlad bba345f8ed Use --locked for Cargo in CI everywhere (#12270) 2022-09-15 14:21:17 +03:00
Vlad 66e9f4925a Don't run cargo-check-benches for master based downstream staging pipelines (#12233) 2022-09-12 20:48:10 +03:00
Bastian Köcher 5647e71947 construct_runtime: Fix generation of types behind features (#12229)
* construct_runtime: Fix generation of types behind features

With the recent addition of supporting features in `construct_runtime!` there was a bug overseen.
The `AllPalletsWithSystem` etc type declarations would be declared twice when a certain was enabled.
The problem was that in the macro we didn't feature gate the types that should be declared when
there is no feature enabled. This pull request now takes care of feature gating this type behind
`all(#( not(feature) ))`. So, these types will only be enabled if no of the configured features is enabled.

* Fix tests

* FMT
2022-09-10 21:50:59 +02:00
Vlad 6c5d4668d0 Fully remove rusty-cachier from the node-bench-regression-guard job (#11904)
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
2022-09-08 15:35:44 +03:00