Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into bko-bencher
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed May 14, 2024
2 parents 58df368 + 594c3ed commit fab8bfa
Show file tree
Hide file tree
Showing 225 changed files with 9,833 additions and 5,330 deletions.
1 change: 1 addition & 0 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exclude = [
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot-try-runtime-node.parity-chains.parity.io/",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
Expand Down
30 changes: 30 additions & 0 deletions .forklift/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[compression]
type = "zstd"

[compression.zstd]
compressionLevel = 3

[general]
jobNameVariable = "CI_JOB_NAME"
jobsBlackList = []
logLevel = "warn"
threadsCount = 6

[metrics]
enabled = true
pushEndpoint = "placeholder"

[metrics.extraLabels]
environment = "production"
job_name = "$CI_JOB_NAME"
project_name = "$CI_PROJECT_PATH"

[storage]
type = "s3"

[storage.s3]
accessKeyId = "placeholder"
bucketName = "placeholder"
concurrency = 10
endpointUrl = "placeholder"
secretAccessKey = "placeholder"
4 changes: 2 additions & 2 deletions .github/workflows/check-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install parity-publish@0.3.0
run: cargo install parity-publish@0.5.1

- name: parity-publish check
run: parity-publish check --allow-unpublished
run: parity-publish --color always check --allow-unpublished
119 changes: 119 additions & 0 deletions .github/workflows/check-runtime-migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: check-runtime-migration

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
FORKLIFT_storage_s3_bucketName: ${{ secrets.FORKLIFT_storage_s3_bucketName }}
FORKLIFT_storage_s3_accessKeyId: ${{ secrets.FORKLIFT_storage_s3_accessKeyId }}
FORKLIFT_storage_s3_secretAccessKey: ${{ secrets.FORKLIFT_storage_s3_secretAccessKey }}
FORKLIFT_storage_s3_endpointUrl: ${{ secrets.FORKLIFT_storage_s3_endpointUrl }}
FORKLIFT_metrics_pushEndpoint: ${{ secrets.FORKLIFT_metrics_pushEndpoint }}

jobs:
set-image:
# GitHub Actions allows using 'env' in a container context.
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
# This workaround sets the container image for each job using 'set-image' job output.
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
# rococo and westend are disabled for now (no access to parity-chains.parity.io)
check-runtime-migration:
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
strategy:
fail-fast: false
matrix:
network: [
# westend,
# rococo,
asset-hub-westend,
asset-hub-rococo,
bridge-hub-westend,
bridge-hub-rococo,
contracts-rococo,
collectives-westend,
coretime-rococo,
]
include:
# - network: westend
# package: westend-runtime
# wasm: westend_runtime.compact.compressed.wasm
# uri: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
# subcommand_extra_args: "--no-weight-warnings"
# command_extra_args: ""
# - network: rococo
# package: rococo-runtime
# wasm: rococo_runtime.compact.compressed.wasm
# uri: "wss://rococo-try-runtime-node.parity-chains.parity.io:443"
# subcommand_extra_args: "--no-weight-warnings"
# command_extra_args: ""
- network: asset-hub-westend
package: asset-hub-westend-runtime
wasm: asset_hub_westend_runtime.compact.compressed.wasm
uri: "wss://westend-asset-hub-rpc.polkadot.io:443"
subcommand_extra_args: ""
command_extra_args: ""
- network: "asset-hub-rococo"
package: "asset-hub-rococo-runtime"
wasm: "asset_hub_rococo_runtime.compact.compressed.wasm"
uri: "wss://rococo-asset-hub-rpc.polkadot.io:443"
subcommand_extra_args: ""
command_extra_args: ""
- network: "bridge-hub-westend"
package: "bridge-hub-westend-runtime"
wasm: "bridge_hub_westend_runtime.compact.compressed.wasm"
uri: "wss://westend-bridge-hub-rpc.polkadot.io:443"
- network: "bridge-hub-rococo"
package: "bridge-hub-rococo-runtime"
wasm: "bridge_hub_rococo_runtime.compact.compressed.wasm"
uri: "wss://rococo-bridge-hub-rpc.polkadot.io:443"
- network: "contracts-rococo"
package: "contracts-rococo-runtime"
wasm: "contracts_rococo_runtime.compact.compressed.wasm"
uri: "wss://rococo-contracts-rpc.polkadot.io:443"
- network: "collectives-westend"
package: "collectives-westend-runtime"
wasm: "collectives_westend_runtime.compact.compressed.wasm"
uri: "wss://westend-collectives-rpc.polkadot.io:443"
command_extra_args: "--disable-spec-name-check"
- network: "coretime-rococo"
package: "coretime-rococo-runtime"
wasm: "coretime_rococo_runtime.compact.compressed.wasm"
uri: "wss://rococo-coretime-rpc.polkadot.io:443"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
echo "Running ${{ matrix.network }} runtime migration check"
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Downloading try-runtime CLI ----------"
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
echo "Using try-runtime-cli version:"
./try-runtime --version
echo "---------- Building ${{ matrix.package }} runtime ----------"
time forklift cargo build --release --locked -p ${{ matrix.package }} --features try-runtime
echo "---------- Executing on-runtime-upgrade for ${{ matrix.network }} ----------"
time ./try-runtime ${{ matrix.command_extra_args }} \
--runtime ./target/release/wbuild/${{ matrix.package }}/${{ matrix.wasm }} \
on-runtime-upgrade --disable-spec-version-check --checks=all ${{ matrix.subcommand_extra_args }} live --uri ${{ matrix.uri }}
sleep 5
55 changes: 55 additions & 0 deletions .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check semver

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- prdoc/*.prdoc

jobs:
check-semver:
runs-on: ubuntu-latest
container:
image: docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Rust Cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
cache-on-failure: true

- name: Rust compilation prerequisites
run: |
rustup default nightly-2024-03-01
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-01
rustup component add rust-src --toolchain nightly-2024-03-01
- name: install parity-publish
run: cargo install parity-publish@0.5.1

- name: extra git setup
run: |
git config --global --add safe.directory '*'
git fetch --no-tags --no-recurse-submodules --depth=1 origin master
git branch old origin/master
- name: check semver
run: |
export CARGO_TARGET_DIR=target
export RUSTFLAGS='-A warnings -A missing_docs'
if ! parity-publish --color always prdoc --since old --validate prdoc/pr_$PR.prdoc --toolchain nightly-2024-03-01 -v; then
cat <<EOF
👋 Hello developer! The SemVer information that you declared in the prdoc file did not match what the CI detected.
Please check the output above and see the following links for more help:
- https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/prdoc.md#record-semver-changes
- https://forum.polkadot.network/t/psa-polkadot-sdk-to-use-semver
Otherwise feel free to ask in the Merge Request or in Matrix chat.
EOF
exit 1
fi
env:
PR: ${{ github.event.pull_request.number }}
4 changes: 2 additions & 2 deletions .github/workflows/claim-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install parity-publish@0.3.0
run: cargo install parity-publish@0.5.1

- name: parity-publish claim
env:
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ secrets.CRATESIO_PUBLISH_CLAIM_TOKEN }}
run: parity-publish claim
run: parity-publish --color always claim
14 changes: 6 additions & 8 deletions .github/workflows/quick-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# GitHub Actions allows using 'env' in a container context.
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
# This workaround sets the container image for each job using 'set-image' job output.
runs-on: arc-runners-polkadot-sdk-default
runs-on: arc-runners-polkadot-sdk
timeout-minutes: 10
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
Expand All @@ -24,7 +24,7 @@ jobs:
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
fmt:
runs-on: arc-runners-polkadot-sdk-default
runs-on: arc-runners-polkadot-sdk
timeout-minutes: 10
needs: [set-image]
container:
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Cargo fmt
run: cargo +nightly fmt --all -- --check
check-dependency-rules:
runs-on: arc-runners-polkadot-sdk-default
runs-on: arc-runners-polkadot-sdk
timeout-minutes: 10
needs: [set-image]
container:
Expand All @@ -46,8 +46,7 @@ jobs:
cd substrate/
../.gitlab/ensure-deps.sh
check-rust-feature-propagation:
runs-on: arc-runners-polkadot-sdk-default
# runs-on: ubuntu-latest
runs-on: arc-runners-polkadot-sdk
timeout-minutes: 10
needs: [set-image]
container:
Expand All @@ -57,8 +56,7 @@ jobs:
- name: run zepter
run: zepter run check
test-rust-features:
runs-on: arc-runners-polkadot-sdk-default
# runs-on: ubuntu-latest
runs-on: arc-runners-polkadot-sdk
timeout-minutes: 10
needs: [set-image]
container:
Expand All @@ -68,7 +66,7 @@ jobs:
- name: run rust features
run: bash .gitlab/rust-features.sh .
check-toml-format:
runs-on: arc-runners-polkadot-sdk-default
runs-on: arc-runners-polkadot-sdk
timeout-minutes: 10
needs: [set-image]
container:
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/test-github-actions.yml

This file was deleted.

Loading

0 comments on commit fab8bfa

Please sign in to comment.