Skip to content

Commit

Permalink
Merge branch 'master' into vstam1/fix-max-message-size-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoaguirre committed Dec 4, 2023
2 parents 69e5109 + e6b9da1 commit c02d77e
Show file tree
Hide file tree
Showing 74 changed files with 4,724 additions and 484 deletions.
12 changes: 6 additions & 6 deletions .github/review-bot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rules:
- name: CI files
condition:
include:
include:
- ^\.gitlab-ci\.yml
- ^docker/.*
- ^\.github/.*
Expand All @@ -19,12 +19,12 @@ rules:
- name: Audit rules
type: basic
condition:
include:
include:
- ^polkadot/runtime\/(kusama|polkadot|common)\/.*
- ^polkadot/primitives/src\/.+\.rs$
- ^substrate/primitives/.*
- ^substrate/frame/.*
exclude:
exclude:
- ^polkadot/runtime\/(kusama|polkadot)\/src\/weights\/.+\.rs$
- ^substrate\/frame\/.+\.md$
minApprovals: 1
Expand Down Expand Up @@ -80,7 +80,7 @@ rules:
# if there are any changes in the bridges subtree (in case of backport changes back to bridges repo)
- name: Bridges subtree files
type: basic
condition:
condition:
include:
- ^bridges/.*
minApprovals: 1
Expand All @@ -91,7 +91,7 @@ rules:

- name: FRAME coders substrate
condition:
include:
include:
- ^substrate/frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
type: "and"
reviewers:
Expand All @@ -105,7 +105,7 @@ rules:
# Protection of THIS file
- name: Review Bot
condition:
include:
include:
- review-bot\.yml
type: "and"
reviewers:
Expand Down
36 changes: 24 additions & 12 deletions .github/workflows/check-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ on:
merge_group:

env:
IMAGE: paritytech/prdoc:v0.0.5
IMAGE: docker.io/paritytech/prdoc:v0.0.7
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR: ${{ github.event.pull_request.number }}
MOUNT: /prdoc
ENGINE: docker
PRDOC_DOC: https://github.com/paritytech/polkadot-sdk/blob/master/docs/prdoc.md

jobs:
check-prdoc:
runs-on: ubuntu-latest
steps:
# we cannot show the version in this step (ie before checking out the repo)
# due to https://github.com/paritytech/prdoc/issues/15
- name: Skip merge queue
if: ${{ contains(github.ref, 'gh-readonly-queue') }}
run: exit 0
- name: Pull image
run: |
echo "Pulling $IMAGE"
docker pull $IMAGE
docker run --rm $IMAGE --version
$ENGINE pull $IMAGE
- name: Check if PRdoc is required
id: get-labels
Expand All @@ -36,18 +37,29 @@ jobs:
echo "Labels: ${labels}"
echo "labels=${labels}" >> "$GITHUB_OUTPUT"
- name: No PRdoc required
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Check PRDoc version
run: |
$ENGINE run --rm -v $PWD:/repo $IMAGE --version
- name: Early exit if PR is silent
if: ${{ contains(steps.get-labels.outputs.labels, 'R0') }}
run: |
echo "PR detected as silent, no PRdoc is required, exiting..."
hits=$(find prdoc -name "pr_$GITHUB_PR*.prdoc" | wc -l)
if (( hits > 0 )); then
echo "PR detected as silent, but a PRDoc was found, checking it as information"
$ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR} || echo "Ignoring failure"
else
echo "PR detected as silent, no PRDoc found, exiting..."
fi
echo "If you want to add a PRDoc, please refer to $PRDOC_DOC"
exit 0
- name: Checkout repo
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: PRdoc check for PR#${{ github.event.pull_request.number }}
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
run: |
echo "Checking for PR#${GITHUB_PR} in $MOUNT"
$ENGINE run --rm -v $PWD/prdoc:/doc $IMAGE check -n ${GITHUB_PR} || true
echo "Checking for PR#${GITHUB_PR}"
echo "You can find more information about PRDoc at $PRDOC_DOC"
$ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR}
2 changes: 1 addition & 1 deletion .github/workflows/merge-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
trigger-merge-queue-action:
runs-on: ubuntu-latest
environment: master
environment: merge-queues
steps:
- name: Generate token
id: app_token
Expand Down
39 changes: 26 additions & 13 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,37 @@ default:

.docker-env:
image: "${CI_IMAGE}"
variables:
FL_FORKLIFT_VERSION: !reference [.forklift, variables, FL_FORKLIFT_VERSION]
before_script:
- !reference [.common-before-script, before_script]
- !reference [.prepare-env, before_script]
- !reference [.rust-info-script, script]
- !reference [.rusty-cachier, before_script]
- !reference [.forklift-cache, before_script]
tags:
- linux-docker

# rusty-cachier's hidden job. Parts of this job are used to instrument the pipeline's other real jobs with rusty-cachier
# rusty-cachier's commands are described here: https://gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client#description
.rusty-cachier:
#
.forklift-cache:
before_script:
# - curl -s https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client/-/raw/release/util/install.sh | bash
# - mkdir -p cargo_home cargo_target_dir
# - export CARGO_HOME=$CI_PROJECT_DIR/cargo_home
# - export CARGO_TARGET_DIR=$CI_PROJECT_DIR/cargo_target_dir
# - find . \( -path ./cargo_target_dir -o -path ./cargo_home \) -prune -o -type f -exec touch -t 202005260100 {} +
# - git restore-mtime
# - rusty-cachier --version
# - rusty-cachier project touch-changed
- echo tbd
- 'curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64"'
- chmod +x forklift
- mkdir .forklift
- cp $FL_FORKLIFT_CONFIG .forklift/config.toml
- export FORKLIFT_PACKAGE_SUFFIX=${CI_JOB_NAME/ [0-9 \/]*}
- shopt -s expand_aliases
- export PATH=$PATH:$(pwd)
- |
if [ "$FORKLIFT_BYPASS" != "true" ]; then
echo "FORKLIFT_BYPASS not set, creating alias cargo='forklift cargo'"
alias cargo="forklift cargo"
fi
- ls -al
- rm -f forklift.sock
- forklift clean
#
- echo "FL_FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}"
- echo "FORKLIFT_PACKAGE_SUFFIX $FORKLIFT_PACKAGE_SUFFIX"

.common-refs:
rules:
Expand Down Expand Up @@ -214,6 +224,9 @@ include:
- project: parity/infrastructure/ci_cd/shared
ref: main
file: /common/ci-unified.yml
- project: parity/infrastructure/ci_cd/shared
ref: main
file: /common/forklift.yml
# This job cancels the whole pipeline if any of provided jobs fail.
# In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests
# to fail the pipeline as soon as possible to shorten the feedback loop.
Expand Down
7 changes: 7 additions & 0 deletions .prdoc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Config file for prdoc, see https://github.com/paritytech/prdoc

version = 1
schema = "prdoc/schema_user.json"
output_dir = "prdoc"
prdoc_folders = ["prdoc"]
template = "prdoc/.template.prdoc"
Loading

0 comments on commit c02d77e

Please sign in to comment.