Skip to content

Benchmarks Run for chore/upgrade-polkadot-v1.11.0-to-v1.13.0-issue-2025 #36

Benchmarks Run for chore/upgrade-polkadot-v1.11.0-to-v1.13.0-issue-2025

Benchmarks Run for chore/upgrade-polkadot-v1.11.0-to-v1.13.0-issue-2025 #36

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Benchmarks Run
run-name: Benchmarks Run for ${{github.event.inputs.branch}}
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
branch:
description: "Branch"
required: true
pallets:
description: "Specific Pallets? (Ex: 'msa,messages')"
required: true
default: all
jobs:
run-benchmarks:
if: github.repository == 'frequency-chain/frequency'
name: Run Benchmarks
runs-on: [self-hosted, Linux, X64, benchmark]
permissions:
contents: write
statuses: write
pull-requests: write
steps:
- name: Print Info
run: |
echo "Running benchmarks..."
echo "Pallets: ${{github.event.inputs.pallets}}"
- name: Check Out Repo
uses: actions/checkout@v4
with:
ref: ${{github.event.inputs.branch}}
- name: Install Required Packages
run: |
sudo apt-get update
sudo apt install -y protobuf-compiler libclang-dev clang cmake
- name: Install Rust Toolchain
# Match installation steps to CI base docker image
run: |
curl https://sh.rustup.rs -sSf | HOME=`pwd` bash -s -- -y
echo "PATH=`pwd`/.cargo/bin:$PATH" >> $GITHUB_ENV
- name: Update Weights
run: |
rustup show
pallets_str="${{github.event.inputs.pallets}}"
echo "Pallets: $pallets_str"
if [ -z "${pallets_str}" -o $pallets_str = 'all' ]; then
echo "Running benchmarks for all pallets..."
make benchmarks
else
IFS=',' read -r -a pallets <<< "$pallets_str"
echo "Running benchmarks for pallets: ${pallets[*]}..."
make benchmarks-multi PALLETS="${pallets[*]}"
echo "Finished benchmarks for pallets: ${pallets[*]}."
fi
- name: Print Updated Weights
run: |
git status
git diff
- name: Commit Updated Weights
id: commit-updated-weights
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842
with:
commit_message: "Update weights"
file_pattern: "pallets/**/*.rs runtime/common/src/weights/*"