Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into rhmb/beefy-slashing…
Browse files Browse the repository at this point in the history
…-fisherman-ancestry-proofs
  • Loading branch information
Lederstrumpf committed Nov 21, 2023
2 parents 828502c + 2183669 commit b185596
Show file tree
Hide file tree
Showing 1,683 changed files with 99,368 additions and 31,936 deletions.
43 changes: 43 additions & 0 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version:
format: 1
# Minimum version of the binary that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.13.2

# The examples in this file assume crate `A` to have a dependency on crate `B`.
workflows:
check:
- [
'lint',
# Check that `A` activates the features of `B`.
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
'--left-side-outside-workspace=ignore',
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
# Actually modify the files and not just report the issues:
'--offline',
'--locked',
'--show-path',
'--quiet',
]
# Format the features into canonical format:
- ['format', 'features', '--offline', '--locked', '--quiet']
# Same as `check`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]
- [ $check.1, '--fix' ]

# Will be displayed when any workflow fails:
help:
text: |
Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration.
It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`.
Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
links:
- "https://github.com/paritytech/polkadot-sdk/issues/1831"
- "https://github.com/ggwpez/zepter"
4 changes: 4 additions & 0 deletions .github/review-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,7 @@ rules:
- minApprovals: 1
teams:
- ci

preventReviewRequests:
teams:
- core-devs
71 changes: 71 additions & 0 deletions .github/workflows/build-and-attach-release-runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build and Attach Runtimes to Releases/RC

on:
release:
types:
- created

env:
PROFILE: production

jobs:
build_and_upload:
strategy:
matrix:
runtime:
- { name: westend, package: westend-runtime, path: polkadot/runtime/westend }
- { name: rococo, package: rococo-runtime, path: polkadot/runtime/rococo }
- { name: asset-hub-rococo, package: asset-hub-rococo-runtime, path: cumulus/parachains/runtimes/assets/asset-hub-rococo }
- { name: asset-hub-westend, package: asset-hub-westend-runtime, path: cumulus/parachains/runtimes/assets/asset-hub-westend }
- { name: bridge-hub-rococo, package: bridge-hub-rococo-runtime, path: cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo }
- { name: contracts-rococo, package: contracts-rococo-runtime, path: cumulus/parachains/runtimes/contracts/contracts-rococo }
- { name: collectives-westend, package: collectives-westend-runtime, path: cumulus/parachains/runtimes/collectives/collectives-westend }
- { name: glutton-westend, package: glutton-westend-runtime, path: cumulus/parachains/runtimes/glutton/glutton-westend }
build_config:
# Release build has logging disabled and no dev features
- { type: on-chain-release, opts: --features on-chain-release-build }
# Debug build has logging enabled and developer features
- { type: dev-debug-build, opts: --features try-runtime }

runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build ${{ matrix.runtime.name }} ${{ matrix.build_config.type }}
id: srtool_build
uses: chevdor/[email protected]
env:
BUILD_OPTS: ${{ matrix.build_config.opts }}
with:
chain: ${{ matrix.runtime.name }}
package: ${{ matrix.runtime.package }}
runtime_dir: ${{ matrix.runtime.path }}
profile: ${{ env.PROFILE }}

- name: Build Summary
run: |
echo "${{ steps.srtool_build.outputs.json }}" | jq . > ${{ matrix.runtime.name }}-srtool-digest.json
cat ${{ matrix.runtime.name }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Set up paths and runtime names
id: setup
run: |
RUNTIME_BLOB_NAME=$(echo ${{ matrix.runtime.package }} | sed 's/-/_/g').compact.compressed.wasm
PREFIX=${{ matrix.build_config.type == 'dev-debug-build' && 'DEV_DEBUG_BUILD__' || '' }}
echo "RUNTIME_BLOB_NAME=$RUNTIME_BLOB_NAME" >> $GITHUB_ENV
echo "ASSET_PATH=./${{ matrix.runtime.path }}/target/srtool/${{ env.PROFILE }}/wbuild/${{ matrix.runtime.package }}/$RUNTIME_BLOB_NAME" >> $GITHUB_ENV
echo "ASSET_NAME=$PREFIX$RUNTIME_BLOB_NAME" >> $GITHUB_ENV
- name: Upload Runtime to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ASSET_PATH }}
asset_name: ${{ env.ASSET_NAME }}
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ name: Check labels
on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]
merge_group:

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- name: Skip merge queue
if: ${{ contains(github.ref, 'gh-readonly-queue') }}
run: exit 0
- name: Pull image
env:
IMAGE: paritytech/ruled_labels:0.4.0
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Check licenses

on:
pull_request:
merge_group:

permissions:
packages: read
Expand All @@ -14,13 +15,13 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-node@v3.8.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@v4.0.0
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"

- name: Check the licenses in Polkadot
run: |
shopt -s globstar
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- ".github/workflows/check-links.yml"
- ".config/lychee.toml"
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

permissions:
packages: read
Expand All @@ -24,7 +25,7 @@ jobs:
# This should restore from the most recent one:
restore-keys: cache-lychee-

- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 (22. Sep 2023)
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.0 (22. Sep 2023)

- name: Lychee link checker
uses: lycheeverse/lychee-action@2ac9f030ccdea0033e2510a23a67da2a2da98492 # for v1.8.0 (15. May 2023)
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Check Markdown
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

permissions:
packages: read
Expand All @@ -13,18 +14,18 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@v3.8.1
- uses: actions/setup-node@v4.0.0
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@paritytech"

- name: Install tooling
run: |
npm install -g markdownlint-cli
markdownlint --version
npm install -g markdownlint-cli
markdownlint --version
- name: Check Markdown
env:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/check-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: Check PRdoc
on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]
merge_group:

env:
IMAGE: paritytech/prdoc:latest
IMAGE: paritytech/prdoc:v0.0.5
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -17,6 +18,9 @@ jobs:
check-prdoc:
runs-on: ubuntu-latest
steps:
- name: Skip merge queue
if: ${{ contains(github.ref, 'gh-readonly-queue') }}
run: exit 0
- name: Pull image
run: |
echo "Pulling $IMAGE"
Expand All @@ -40,7 +44,7 @@ jobs:
- name: Checkout repo
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
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') }}
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/check-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check publish

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

jobs:
check-publish:
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Rust Cache
uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
with:
cache-on-failure: true

- name: install parity-publish
run: cargo install parity-publish --profile dev

- name: parity-publish check
run: parity-publish check --allow-unpublished
26 changes: 26 additions & 0 deletions .github/workflows/claim-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Claim Crates

on:
push:
branches:
- master

jobs:
claim-crates:
runs-on: ubuntu-latest
environment: master
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Rust Cache
uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
with:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected]

- name: parity-publish claim
env:
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ secrets.CRATESIO_PUBLISH_CLAIM_TOKEN }}
run: parity-publish claim
5 changes: 3 additions & 2 deletions .github/workflows/fmt-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

jobs:
quick_check:
Expand All @@ -14,9 +15,9 @@ jobs:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
container:
image: paritytech/ci-unified:bullseye-1.70.0-2023-05-23-v20230706
image: paritytech/ci-unified:bullseye-1.73.0-2023-11-01-v20231025
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Cargo fmt
run: cargo +nightly fmt --all -- --check
23 changes: 23 additions & 0 deletions .github/workflows/gitspiegel-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: gitspiegel sync

# This workflow doesn't do anything, it's only use is to trigger "workflow_run"
# webhook, that'll be consumed by gitspiegel
# This way, gitspiegel won't do mirroring, unless this workflow runs,
# and running the workflow is protected by GitHub

on:
pull_request:
types:
- opened
- synchronize
- unlocked
- ready_for_review
- reopened
merge_group:

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Do nothing
run: echo "let's go"
24 changes: 24 additions & 0 deletions .github/workflows/merge-queue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Merge-Queue

on:
merge_group:

jobs:
trigger-merge-queue-action:
runs-on: ubuntu-latest
environment: master
steps:
- name: Generate token
id: app_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.REVIEW_APP_ID }}
private_key: ${{ secrets.REVIEW_APP_KEY }}
- name: Add Merge Queue status check
uses: billyjbryant/create-status-check@3e6fa0ac599d10d9588cf9516ca4330ef669b858 # v2
with:
authToken: ${{ steps.app_token.outputs.token }}
context: 'review-bot'
description: 'PRs for merge queue gets approved'
state: 'success'
sha: ${{ github.event.merge_group.head_commit.id }}
4 changes: 4 additions & 0 deletions .github/workflows/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ on:
- ready_for_review
- converted_to_draft
pull_request_review:
merge_group:

jobs:
pr-custom-review:
runs-on: ubuntu-latest
steps:
- name: Skip merge queue
if: ${{ contains(github.ref, 'gh-readonly-queue') }}
run: exit 0
- name: Skip if pull request is in Draft
# `if: github.event.pull_request.draft == true` should be kept here, at
# the step level, rather than at the job level. The latter is not
Expand Down
Loading

0 comments on commit b185596

Please sign in to comment.