Skip to content

Commit

Permalink
Merge branch 'bridge-hub-base' into joe-bridge-hub-westmint-assets
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jan 15, 2023
2 parents 81e9703 + f6e1b01 commit 4365baa
Show file tree
Hide file tree
Showing 331 changed files with 20,336 additions and 7,358 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/release-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The following checks can be performed after we have forked off to the release-ca
networks
- [ ] Run [integration tests](https://github.com/paritytech/cumulus/blob/master/docs/release.md#integration-tests), and make sure they pass.
- [ ] Push runtime upgrade to Westmint and verify network stability
- [ ] Push runtime upgrade to Collectives and verify network stability


### Github
Expand Down
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ updates:
- dependency-name: "sp-*"
- dependency-name: "frame-*"
- dependency-name: "fork-tree"
- dependency-name: "remote-externalities"
- dependency-name: "frame-remote-externalities"
- dependency-name: "pallet-*"
- dependency-name: "beefy-*"
- dependency-name: "try-runtime-*"
Expand All @@ -21,6 +21,7 @@ updates:
- dependency-name: "xcm*"
- dependency-name: "kusama-*"
- dependency-name: "westend-*"
- dependency-name: "rococo-*"
schedule:
interval: "daily"
- package-ecosystem: github-actions
Expand Down
4 changes: 2 additions & 2 deletions .github/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ action-review-team: ci
rules:
- name: Runtime files
check_type: changed_files
condition: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$
condition: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$
all_distinct:
- min_approvals: 1
teams:
Expand All @@ -20,7 +20,7 @@ rules:
condition:
include: .*
# excluding files from 'Runtime files' and 'CI files' rules
exclude: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
exclude: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
min_approvals: 2
teams:
- core-devs
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/check-D-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check D labels

on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]
paths:
- primitives/**

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- name: Pull image
env:
IMAGE: paritytech/ruled_labels:0.3.2
run: docker pull $IMAGE

- name: Check labels
env:
IMAGE: paritytech/ruled_labels:0.3.2
MOUNT: /work
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: specs_cumulus.yaml
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
# Clone repo with labels specs
git clone https://github.com/paritytech/labels
# Fetch the labels for the PR under test
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
if [ -z "${labels}" ]; then
echo "No labels found. Please add labels D labels"
exit 1
fi
labels_args=${labels: :-1}
printf "Checking labels: %s\n" "${labels_args}"
# Prevent the shell from splitting labels with spaces
IFS=","
# --dev is more useful to debug mode to debug
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags audit
41 changes: 32 additions & 9 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,39 @@ jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Pull image
env:
IMAGE: paritytech/ruled_labels:0.3.2
run: docker pull $IMAGE

- name: Check labels
run: bash ${{ github.workspace }}/scripts/ci/github/check_labels.sh
env:
IMAGE: paritytech/ruled_labels:0.3.2
MOUNT: /work
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: specs_cumulus.yaml
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
# Clone repo with labels specs
git clone https://github.com/paritytech/labels
# Fetch the labels for the PR under test
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
if [ -z "${labels}" ]; then
echo "No labels found. Please add labels A, B and C labels"
exit 1
fi
labels_args=${labels: :-1}
printf "Checking labels: %s\n" "${labels_args}"
# Prevent the shell from splitting labels with spaces
IFS=","
# --dev is more useful to debug mode to debug
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags PR
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: rustup show

- name: Rust cache
uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0

- name: Build rustdocs
run: SKIP_WASM_BUILD=1 cargo doc --all --no-deps
Expand All @@ -32,7 +32,7 @@ jobs:
run: echo "<meta http-equiv=refresh content=0;url=cumulus_client_collator/index.html>" > ./target/doc/index.html

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-10_rc-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
tag: ${{ steps.compute_tag.outputs.new_tag }}

- id: create-issue-checklist-client
uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2 # v2.6.0
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
# Only create the issue if it's the first release candidate
if: steps.compute_tag.outputs.first_rc == 'true'
env:
Expand All @@ -63,7 +63,7 @@ jobs:
filename: .github/ISSUE_TEMPLATE/release-client.md

- id: create-issue-checklist-runtime
uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2 # v2.6.0
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
# Only create the issue if it's the first release candidate
if: steps.compute_tag.outputs.first_rc == 'true'
env:
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/release-30_create-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
runtime: statemint
- category: assets
runtime: westmint
- category: bridge-hubs
runtime: bridge-hub-kusama
- category: bridge-hubs
runtime: bridge-hub-rococo
- category: collectives
runtime: collectives-polkadot
- category: contracts
Expand Down Expand Up @@ -120,7 +124,7 @@ jobs:
path: cumulus
ref: ${{ github.event.inputs.ref2 }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # v1.118.0
- uses: ruby/setup-ruby@93287a1fa82c6ddbb6d8db978df4b0119cd8879f # v1.133.2
with:
ruby-version: 3.0.0

Expand Down Expand Up @@ -150,6 +154,8 @@ jobs:
WESTMINT_DIGEST: ${{ github.workspace}}/westmint-srtool-json/westmint-srtool-digest.json
STATEMINE_DIGEST: ${{ github.workspace}}/statemine-srtool-json/statemine-srtool-digest.json
STATEMINT_DIGEST: ${{ github.workspace}}/statemint-srtool-json/statemint-srtool-digest.json
BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-srtool-json/bridge-hub-rococo-srtool-digest.json
BRIDGE_HUB_KUSAMA_DIGEST: ${{ github.workspace}}/bridge-hub-kusama-srtool-json/bridge-hub-kusama-srtool-digest.json
COLLECTIVES_POLKADOT_DIGEST: ${{ github.workspace}}/collectives-polkadot-srtool-json/collectives-polkadot-srtool-digest.json
ROCOCO_PARA_DIGEST: ${{ github.workspace}}/rococo-parachain-srtool-json/rococo-parachain-srtool-digest.json
CANVAS_KUSAMA_DIGEST: ${{ github.workspace}}/contracts-rococo-srtool-json/contracts-rococo-srtool-digest.json
Expand All @@ -165,6 +171,8 @@ jobs:
ls -al $WESTMINT_DIGEST || true
ls -al $STATEMINE_DIGEST || true
ls -al $STATEMINT_DIGEST || true
ls -al $BRIDGE_HUB_ROCOCO_DIGEST || true
ls -al $BRIDGE_HUB_KUSAMA_DIGEST || true
ls -al $COLLECTIVES_POLKADOT_DIGEST || true
ls -al $ROCOCO_PARA_DIGEST || true
ls -al $CANVAS_KUSAMA_DIGEST || true
Expand Down Expand Up @@ -216,6 +224,10 @@ jobs:
runtime: statemint
- category: assets
runtime: westmint
- category: bridge-hubs
runtime: bridge-hub-kusama
- category: bridge-hubs
runtime: bridge-hub-rococo
- category: collectives
runtime: collectives-polkadot
- category: contracts
Expand All @@ -235,7 +247,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # v1.118.0
- uses: ruby/setup-ruby@93287a1fa82c6ddbb6d8db978df4b0119cd8879f # v1.133.2
with:
ruby-version: 3.0.0

Expand All @@ -255,7 +267,7 @@ jobs:
id: fix-runtime-path
run: |
cd "${{ matrix.runtime }}-runtime/"
mv "$(sed -E 's/-(.*)/_\1/' <<< ${{ matrix.runtime }})_runtime.compact.compressed.wasm" "${{ matrix.runtime }}_runtime.compact.compressed.wasm" || true
mv "$(sed -E 's/- */_/g' <<< ${{ matrix.runtime }})_runtime.compact.compressed.wasm" "${{ matrix.runtime }}_runtime.compact.compressed.wasm" || true
- name: Upload compressed ${{ matrix.runtime }} wasm
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
runtime: statemint
- category: assets
runtime: westmint
- category: bridge-hubs
runtime: bridge-hub-kusama
- category: bridge-hubs
runtime: bridge-hub-rococo
- category: collectives
runtime: collectives-polkadot
- category: contracts
Expand Down
25 changes: 24 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variables:
# they will be used if the job fails
.pipeline-stopper-vars:
before_script:
- !reference [.job-switcher, before_script]
- echo "FAILED_JOB_URL=${CI_JOB_URL}" > pipeline-stopper.env
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
- echo "FAILED_JOB_NAME=${CI_JOB_NAME}" >> pipeline-stopper.env
Expand Down Expand Up @@ -95,19 +96,26 @@ variables:
- if: $CI_COMMIT_REF_NAME == "master"
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs

.job-switcher:
before_script:
- if echo "$CI_DISABLED_JOBS" | grep -xF "$CI_JOB_NAME"; then echo "The job has been cancelled in CI settings"; exit 0; fi

.docker-env:
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
- rustup show
- cargo --version
- rustup +nightly show
- cargo +nightly --version
- bash --version
tags:
- linux-docker
- linux-docker-vm-c2

.kubernetes-env:
image: "${CI_IMAGE}"
before_script:
- !reference [.job-switcher, before_script]
tags:
- kubernetes-parity-build

Expand Down Expand Up @@ -159,3 +167,18 @@ cancel-pipeline:
PR_NUM: "${PR_NUM}"
trigger:
project: "parity/infrastructure/ci_cd/pipeline-stopper"
branch: "as-improve"

remove-cancel-pipeline-message:
stage: .post
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
variables:
PROJECT_ID: "${CI_PROJECT_ID}"
PROJECT_NAME: "${CI_PROJECT_NAME}"
PIPELINE_ID: "${CI_PIPELINE_ID}"
FAILED_JOB_URL: "https://gitlab.com"
FAILED_JOB_NAME: "nope"
PR_NUM: "${CI_COMMIT_REF_NAME}"
trigger:
project: "parity/infrastructure/ci_cd/pipeline-stopper"
4 changes: 2 additions & 2 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# - The latest matching rule, if multiple, takes precedence.

# CI
/.github/ @paritytech/ci @chevdor
/.github/ @paritytech/ci @paritytech/release-engineering
/.gitlab-ci.yml @paritytech/ci
/scripts/ci/ @paritytech/ci @chevdor
/scripts/ci/ @paritytech/ci @paritytech/release-engineering

Loading

0 comments on commit 4365baa

Please sign in to comment.