mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Squashed 'bridges/' changes from b2099c5..23dda62 (#3369)
23dda62 Rococo <> Wococo messages relay (#1030) bcde21d Update the wasm builder to substrate master (#1029) a8318ce Make target signer optional when sending message. (#1018) f8602e1 Fix insufficient balance when send message. (#1020) d95c0a7 greedy relayer don't need message dispatch to be prepaid if dispatch is supposed to be paid at the target chain (#1016) ad5876f Update types. (#1027) 116cbbc CI: fix starting the pipeline (#1022) 7e0fadd Add temporary `canary` job (#1019) 6787091 Update types to contain dispatch_fee_payment (#1017) 03f79ad Allow Root to assume SourceAccount. (#1011) 372d019 Return dispatch_fee_payment from message details RPC (#1014) 604eb1c Relay basic single-bit message dispatch results back to the source chain (#935) bf52fff Use plain source_queue view when selecting nonces for delivery (#1010) fc5cf7d pay dispatch fee at target chain (#911) 1e35477 Bump Substrate to `286d7ce` (#1006) 7ad07b3 Add --only-mandatory-headers mode (#1004) 5351dc9 Messages relayer operating mode (#995) 9bc29a7 Rococo <> Wococo relayer balance guard (#998) bc17341 rename messages_dispatch_weight -> message_details (#996) 95be244 Bump Rococo and Wococo spec versions (#999) c35567b Move ChainWithBalances::NativeBalance -> Chain::Balance (#990) 1bfece1 Fix some nits (#988) 334ea0f Increase pause before starting relays again (#989) 7fb8248 Fix clippy in test code (#993) d60ae50 fix clippy issues (#991) 75ca813 Make sure GRANDPA shares state with RPC. (#987) da2a38a Bump Substrate (#986) 5a9862f Update submit finality proof weight formula (#981) 69df513 Flag for rejecting all outbound messages (#982) 14d0506 Add script to setup bench machine. (#984) e74e8ab Move CI from GitHub Actions to GitLab (#814) c5ca5dd Custom justification verification (#979) 643f10d Always run on-demand headers relay in complex relay (#975) a35b0ef Add JSON type definitions for Rococo<>Wococo bridge (#977) 0eb83f2 Update cargo.deny (#980) e1d1f4c Bump Rococo/Wococo spec_version (#976) deac90d increase pause before starting relays (#974) 68d6d79 Revert to use InspectCmd, bump substrate `6bef4f4` (#966) 66e1508 Avoid hashing headers twice in verify_justification (#973) a31844f Bump `environmental` dependency (#972) 2a4c29a in auto-relays keep trying to connect to nodes until connection is established (#971) 0e767b3 removed stray file (#969) b9545dc Serve multiple lanes with single complex relay instance (#964) 73419f4 Correct type error (#968) bac256f Start finality relay spec-version guards for Rococo <> Wococo finality relays (#965) bfd7037 pass source and target chain ids to account_ownership_proof (#963) 8436073 Upstream changes from Polkadot repo (#961) e58d851 Increase account endowment amount (#960) git-subtree-dir: bridges git-subtree-split: 23dda6248236b27f20d76cbedc30e189cc6f736c
This commit is contained in:
committed by
GitHub
parent
022e8bc11c
commit
feefc34567
@@ -0,0 +1,276 @@
|
||||
stages:
|
||||
- lint
|
||||
- check
|
||||
- test
|
||||
- build
|
||||
- publish
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
|
||||
variables: &default-vars
|
||||
GIT_STRATEGY: fetch
|
||||
GIT_DEPTH: 100
|
||||
CARGO_INCREMENTAL: 0
|
||||
ARCH: "x86_64"
|
||||
CI_IMAGE: "paritytech/bridges-ci:production"
|
||||
RUST_BACKTRACE: full
|
||||
|
||||
default:
|
||||
cache: {}
|
||||
|
||||
.collect-artifacts: &collect-artifacts
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
|
||||
when: on_success
|
||||
expire_in: 7 days
|
||||
paths:
|
||||
- artifacts/
|
||||
|
||||
.kubernetes-build: &kubernetes-build
|
||||
tags:
|
||||
- kubernetes-parity-build
|
||||
interruptible: true
|
||||
|
||||
.docker-env: &docker-env
|
||||
image: "${CI_IMAGE}"
|
||||
before_script:
|
||||
- rustup show
|
||||
- cargo --version
|
||||
- rustup +nightly show
|
||||
- cargo +nightly --version
|
||||
- sccache -s
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- runner_system_failure
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
interruptible: true
|
||||
tags:
|
||||
- linux-docker
|
||||
|
||||
.test-refs: &test-refs
|
||||
rules:
|
||||
# FIXME: This is the cause why pipelines wouldn't start. The problem might be in our custom
|
||||
# mirroring. This should be investigated further, but for now let's have the working
|
||||
# pipeline.
|
||||
# - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH
|
||||
# changes:
|
||||
# - '**.md'
|
||||
# - diagrams/*
|
||||
# - docs/*
|
||||
# when: never
|
||||
- if: $CI_PIPELINE_SOURCE == "pipeline"
|
||||
- if: $CI_PIPELINE_SOURCE == "web"
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: $CI_COMMIT_REF_NAME == "master"
|
||||
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
|
||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
|
||||
|
||||
.build-refs: &build-refs
|
||||
rules:
|
||||
# won't run on the CI image update pipeline
|
||||
- if: $CI_PIPELINE_SOURCE == "pipeline"
|
||||
when: never
|
||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
|
||||
# there are two types of nightly pipelines:
|
||||
# 1. this one is triggered by the schedule with $PIPELINE == "nightly", it's for releasing.
|
||||
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"
|
||||
|
||||
.nightly-test: &nightly-test
|
||||
rules:
|
||||
# 2. another is triggered by scripts repo $CI_PIPELINE_SOURCE == "pipeline" it's for the CI image
|
||||
# update, it also runs all the nightly checks.
|
||||
- if: $CI_PIPELINE_SOURCE == "pipeline"
|
||||
|
||||
#### stage: lint
|
||||
|
||||
clippy-nightly:
|
||||
stage: lint
|
||||
<<: *docker-env
|
||||
<<: *test-refs
|
||||
variables:
|
||||
RUSTFLAGS: "-D warnings"
|
||||
script:
|
||||
- cargo +nightly clippy --all-targets
|
||||
# FIXME: remove when all the warns are fixed
|
||||
allow_failure: true
|
||||
|
||||
fmt:
|
||||
stage: lint
|
||||
<<: *docker-env
|
||||
<<: *test-refs
|
||||
script:
|
||||
- cargo fmt --all -- --check
|
||||
|
||||
spellcheck:
|
||||
stage: lint
|
||||
<<: *docker-env
|
||||
<<: *test-refs
|
||||
script:
|
||||
- cargo spellcheck check -m 1 -vv $(find modules/currency-exchange/src -name "*.rs")
|
||||
|
||||
#### stage: check
|
||||
|
||||
check:
|
||||
stage: check
|
||||
<<: *docker-env
|
||||
<<: *test-refs
|
||||
script: &check-script
|
||||
- time cargo check --verbose --workspace
|
||||
# Check Rialto benchmarks runtime
|
||||
- time cargo check -p rialto-runtime --features runtime-benchmarks --verbose
|
||||
# Check Millau benchmarks runtime
|
||||
- time cargo check -p millau-runtime --features runtime-benchmarks --verbose
|
||||
|
||||
check-nightly:
|
||||
stage: check
|
||||
<<: *docker-env
|
||||
<<: *nightly-test
|
||||
script:
|
||||
- rustup default nightly
|
||||
- *check-script
|
||||
|
||||
#### stage: test
|
||||
|
||||
test:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
<<: *test-refs
|
||||
script: &test-script
|
||||
- time cargo test --verbose --workspace
|
||||
|
||||
test-nightly:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
<<: *nightly-test
|
||||
script:
|
||||
- rustup default nightly
|
||||
- *test-script
|
||||
|
||||
deny:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
<<: *nightly-test
|
||||
<<: *collect-artifacts
|
||||
script:
|
||||
- cargo deny check advisories --hide-inclusion-graph
|
||||
- cargo deny check bans sources --hide-inclusion-graph
|
||||
after_script:
|
||||
- mkdir -p ./artifacts
|
||||
- echo "___Complete logs can be found in the artifacts___"
|
||||
- cargo deny check advisories 2> advisories.log
|
||||
- cargo deny check bans sources 2> bans_sources.log
|
||||
# this job is allowed to fail, only licenses check is important
|
||||
allow_failure: true
|
||||
|
||||
deny-licenses:
|
||||
stage: test
|
||||
<<: *docker-env
|
||||
<<: *test-refs
|
||||
<<: *collect-artifacts
|
||||
script:
|
||||
- cargo deny check licenses --hide-inclusion-graph
|
||||
after_script:
|
||||
- mkdir -p ./artifacts
|
||||
- echo "___Complete logs can be found in the artifacts___"
|
||||
- cargo deny check licenses 2> licenses.log
|
||||
|
||||
#### stage: build
|
||||
|
||||
build:
|
||||
stage: build
|
||||
<<: *docker-env
|
||||
<<: *build-refs
|
||||
<<: *collect-artifacts
|
||||
# master
|
||||
script: &build-script
|
||||
- time cargo build --release --verbose --workspace
|
||||
after_script:
|
||||
# Prepare artifacts
|
||||
- mkdir -p ./artifacts
|
||||
- strip ./target/release/rialto-bridge-node
|
||||
- mv -v ./target/release/rialto-bridge-node ./artifacts/
|
||||
- strip ./target/release/millau-bridge-node
|
||||
- mv -v ./target/release/millau-bridge-node ./artifacts/
|
||||
- strip ./target/release/ethereum-poa-relay
|
||||
- mv -v ./target/release/ethereum-poa-relay ./artifacts/
|
||||
- strip ./target/release/substrate-relay
|
||||
- mv -v ./target/release/substrate-relay ./artifacts/
|
||||
- mv -v ./deployments/local-scripts/bridge-entrypoint.sh ./artifacts/
|
||||
- mv -v ./ci.Dockerfile ./artifacts/
|
||||
|
||||
build-nightly:
|
||||
stage: build
|
||||
<<: *docker-env
|
||||
<<: *collect-artifacts
|
||||
<<: *nightly-test
|
||||
script:
|
||||
- rustup default nightly
|
||||
- *build-script
|
||||
|
||||
#### stage: publish
|
||||
|
||||
.build-push-image: &build-push-image
|
||||
<<: *kubernetes-build
|
||||
image: quay.io/buildah/stable
|
||||
<<: *build-refs
|
||||
variables: &image-variables
|
||||
GIT_STRATEGY: none
|
||||
DOCKERFILE: ci.Dockerfile
|
||||
IMAGE_NAME: docker.io/paritytech/$CI_JOB_NAME
|
||||
needs:
|
||||
- job: build
|
||||
artifacts: true
|
||||
before_script: &check-versions
|
||||
- if [[ "${CI_COMMIT_TAG}" ]]; then
|
||||
VERSION=${CI_COMMIT_TAG};
|
||||
elif [[ "${CI_COMMIT_REF_NAME}" ]]; then
|
||||
VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed -r 's#/+#-#g');
|
||||
fi
|
||||
- echo "Effective tags = ${VERSION} sha-${CI_COMMIT_SHORT_SHA} latest"
|
||||
script:
|
||||
- test "${Docker_Hub_User_Parity}" -a "${Docker_Hub_Pass_Parity}" ||
|
||||
( echo "no docker credentials provided"; exit 1 )
|
||||
- cd ./artifacts
|
||||
- buildah bud
|
||||
--format=docker
|
||||
--build-arg VCS_REF="${CI_COMMIT_SHORT_SHA}"
|
||||
--build-arg BUILD_DATE="$(date +%d-%m-%Y)"
|
||||
--build-arg PROJECT="${CI_JOB_NAME}"
|
||||
--build-arg VERSION="${VERSION}"
|
||||
--tag "${IMAGE_NAME}:${VERSION}"
|
||||
--tag "${IMAGE_NAME}:sha-${CI_COMMIT_SHORT_SHA}"
|
||||
--tag "${IMAGE_NAME}:latest"
|
||||
--file "${DOCKERFILE}" .
|
||||
# The job will success only on the protected branch
|
||||
- echo "$Docker_Hub_Pass_Parity" |
|
||||
buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io
|
||||
- buildah info
|
||||
- buildah push --format=v2s2 "${IMAGE_NAME}:${VERSION}"
|
||||
- buildah push --format=v2s2 "${IMAGE_NAME}:sha-${CI_COMMIT_SHORT_SHA}"
|
||||
- buildah push --format=v2s2 "${IMAGE_NAME}:latest"
|
||||
after_script:
|
||||
- env REGISTRY_AUTH_FILE= buildah logout "$IMAGE_NAME"
|
||||
|
||||
rialto-bridge-node:
|
||||
stage: publish
|
||||
<<: *build-push-image
|
||||
|
||||
millau-bridge-node:
|
||||
stage: publish
|
||||
<<: *build-push-image
|
||||
|
||||
ethereum-poa-relay:
|
||||
stage: publish
|
||||
<<: *build-push-image
|
||||
|
||||
substrate-relay:
|
||||
stage: publish
|
||||
<<: *build-push-image
|
||||
|
||||
# FIXME: publish binaries
|
||||
Reference in New Issue
Block a user