Skip to content

Commit

Permalink
Merge branch 'master' into gui-pipeline-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
gui1117 authored Jan 4, 2025
2 parents 36edc77 + 0b4f131 commit a84c613
Show file tree
Hide file tree
Showing 40 changed files with 560 additions and 642 deletions.
18 changes: 17 additions & 1 deletion .github/scripts/generate-prdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ def from_pr_number(n, audience, bump, force):

create_prdoc(n, audience, pr.title, pr.body, patch, bump, force)

def translate_audience(audience):
aliases = {
'runtime_dev': 'Runtime Dev',
'runtime_user': 'Runtime Operator',
'node_dev': 'Node Dev',
'node_user': 'Node User',
}

if audience in aliases:
to = aliases[audience]
print(f"Translated audience '{audience}' to '{to}'")
audience = to

return audience

def create_prdoc(pr, audience, title, description, patch, bump, force):
path = f"prdoc/pr_{pr}.prdoc"

Expand All @@ -49,6 +64,7 @@ def create_prdoc(pr, audience, title, description, patch, bump, force):
print(f"No preexisting PrDoc for PR {pr}")

prdoc = { "title": title, "doc": [{}], "crates": [] }
audience = translate_audience(audience)

prdoc["doc"][0]["audience"] = audience
prdoc["doc"][0]["description"] = description
Expand Down Expand Up @@ -117,7 +133,7 @@ def setup_parser(parser=None, pr_required=True):
parser = argparse.ArgumentParser()
parser.add_argument("--pr", type=int, required=pr_required, help="The PR number to generate the PrDoc for.")
parser.add_argument("--audience", type=str, nargs='*', choices=allowed_audiences, default=["todo"], help="The audience of whom the changes may concern. Example: --audience runtime_dev node_dev")
parser.add_argument("--bump", type=str, default="major", choices=["patch", "minor", "major", "silent", "ignore", "no_change"], help="A default bump level for all crates. Example: --bump patch")
parser.add_argument("--bump", type=str, default="major", choices=["patch", "minor", "major", "silent", "ignore", "none"], help="A default bump level for all crates. Example: --bump patch")
parser.add_argument("--force", action="store_true", help="Whether to overwrite any existing PrDoc.")
return parser

Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/benchmarks-networking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Networking Benchmarks

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
preflight:
uses: ./.github/workflows/reusable-preflight.yml

build:
timeout-minutes: 50
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER_BENCHMARK }}
container:
image: ${{ needs.preflight.outputs.IMAGE }}
strategy:
fail-fast: false
matrix:
features:
[
{ bench: "notifications_protocol" },
{ bench: "request_response_protocol" },
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Benchmarks
id: run-benchmarks
run: |
mkdir -p ./charts
forklift cargo bench -p sc-network --bench ${{ matrix.features.bench }} -- --output-format bencher | grep "^test" | tee ./charts/${{ matrix.features.bench }}.txt || echo "Benchmarks failed"
ls -lsa ./charts
- name: Upload artifacts
uses: actions/[email protected]
with:
name: ${{ matrix.features.bench }}-${{ github.sha }}
path: ./charts

publish-benchmarks:
timeout-minutes: 60
needs: [build]
if: github.ref == 'refs/heads/master'
environment: subsystem-benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 0

- run: git checkout master --

- name: Download artifacts
uses: actions/[email protected]
with:
name: notifications_protocol-${{ github.sha }}
path: ./charts

- name: Download artifacts
uses: actions/[email protected]
with:
name: request_response_protocol-${{ github.sha }}
path: ./charts

- name: Setup git
run: |
# Fixes "detected dubious ownership" error in the ci
git config --global --add safe.directory '*'
ls -lsR ./charts
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.POLKADOTSDK_GHPAGES_APP_ID }}
private-key: ${{ secrets.POLKADOTSDK_GHPAGES_APP_KEY }}

- name: Generate ${{ env.BENCH }}
env:
BENCH: notifications_protocol
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "cargo"
output-file-path: ./charts/${{ env.BENCH }}.txt
benchmark-data-dir-path: ./bench/${{ env.BENCH }}
github-token: ${{ steps.app-token.outputs.token }}
auto-push: true

- name: Generate ${{ env.BENCH }}
env:
BENCH: request_response_protocol
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "cargo"
output-file-path: ./charts/${{ env.BENCH }}.txt
benchmark-data-dir-path: ./bench/${{ env.BENCH }}
github-token: ${{ steps.app-token.outputs.token }}
auto-push: true
File renamed without changes.
10 changes: 9 additions & 1 deletion .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check semver

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
workflow_dispatch:
merge_group:

Expand Down Expand Up @@ -62,21 +62,29 @@ jobs:
echo "PRDOC_EXTRA_ARGS=--max-bump minor" >> $GITHUB_ENV
- name: Echo Skip
if: ${{ contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
run: echo "Skipping this PR because it is labeled as R0-silent."

- name: Rust Cache
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
cache-on-failure: true

- name: Rust compilation prerequisites
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
run: |
rustup default $TOOLCHAIN
rustup component add rust-src --toolchain $TOOLCHAIN
- name: install parity-publish
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
# Set the target dir to cache the build.
run: CARGO_TARGET_DIR=./target/ cargo install [email protected] --locked -q

- name: check semver
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }}
run: |
if [ -z "$PR" ]; then
echo "Skipping master/merge queue"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/command-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
required: true
options:
- "TODO"
- "no_change"
- "none"
- "patch"
- "minor"
- "major"
Expand Down
7 changes: 1 addition & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/paritytec
<!-- markdownlint-disable-next-line MD013 -->
![Current Stable Release](https://raw.githubusercontent.com/paritytech/release-registry/main/badges/polkadot-sdk-latest.svg)&nbsp;&nbsp;![Next Stable Release](https://raw.githubusercontent.com/paritytech/release-registry/main/badges/polkadot-sdk-next.svg)

The Polkadot SDK is released every three months as a `stableYYMMDD` release. They are supported for
The Polkadot SDK is released every three months as a `stableYYMM` release. They are supported for
one year with patches. See the next upcoming versions in the [Release
Registry](https://github.com/paritytech/release-registry/).
Registry](https://github.com/paritytech/release-registry/) and more docs in [RELEASE.md](./docs/RELEASE.md).

You can use [`psvm`](https://github.com/paritytech/psvm) to update all dependencies to a specific
version without needing to manually select the correct version for each crate.
Expand Down
135 changes: 0 additions & 135 deletions cumulus/docs/release.md

This file was deleted.

16 changes: 2 additions & 14 deletions cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1854,20 +1854,8 @@ impl_runtime_apis! {

type ToWestend = XcmBridgeHubRouterBench<Runtime, ToWestendXcmRouterInstance>;

let whitelist: Vec<TrackedStorageKey> = vec![
// Block Number
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
// Total Issuance
hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
// Execution Phase
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
// Event Count
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
// System Events
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
//TODO: use from relay_well_known_keys::ACTIVE_CONFIG
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
];
use frame_support::traits::WhitelistedStorageKeys;
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();

let mut batches = Vec::<BenchmarkBatch>::new();
let params = (&config, &whitelist);
Expand Down
Loading

0 comments on commit a84c613

Please sign in to comment.