Skip to content

runtime: bump spec_version to 19 #2122

runtime: bump spec_version to 19

runtime: bump spec_version to 19 #2122

# Triggered via !ci-benchmark tag
name: Update runtime weights
on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-benchmark:
runs-on: [self-hosted, benchmark]
if: ${{ contains(github.event.pull_request.labels.*.name,'!ci-benchmark') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build runtime benchmarks
uses: ./.github/actions/cargo-command
with:
package: timechain-node
feature: runtime-benchmarks
- name: Upload runtime benchmarks
uses: actions/upload-artifact@v4
with:
name: runtime-benchmarks
if-no-files-found: error
path: target/release/timechain-node
run-benchmark:
needs: [build-benchmark]
runs-on: [self-hosted, benchmark]
strategy:
fail-fast: false
matrix:
pallet: [elections, members, networks, shards, tasks, timegraph, dmail]
steps:
- name: Download runtime benchmarks
uses: actions/download-artifact@v4
with:
name: runtime-benchmarks
- name: Prepare runtime benchmarks
run: chmod +x timechain-node && mkdir -p develop
- name: Run runtime benchmarks
run: ./timechain-node benchmark pallet --chain dev --pallet pallet_${{ matrix.pallet }} --extrinsic '*' --output ./develop/pallet_${{ matrix.pallet }}.rs
- name: Upload weights
uses: actions/upload-artifact@v4
with:
name: weights-develop-${{ matrix.pallet }}
if-no-files-found: error
path: develop/pallet_${{ matrix.pallet }}.rs
update-weights:
needs: [run-benchmark]
runs-on: [self-hosted, benchmark]
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
submodules: recursive
- name: Download develop weights
uses: actions/download-artifact@v4
with:
path: runtime/src/weights/develop
pattern: weights-develop-*
merge-multiple: true
- name: Commit updated weights
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "[email protected]"
git config user.name "Weights Update Bot"
git commit -am "runtimes: update pallet weights"
git push