mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
[CI] Add weights verification jobs (#6996)
* add weights verification job * switch to a github action * rename script.. * add swc check * fix perms... * debugging * fix comments, remove artifact. I hate CI * switch to swc compare files * sigh * switch back to compare commits * fix output * fix output... again. yay markdown! * remove test version number * remove TODO * switch to docker image * Revert "remove TODO" This reverts commit c313afd4604c437ebd25ffa84bb8cc7d95cd1092. * fix docker registry url * revert docker experiment too janky. will fix upstream stuff and fix as a separate PR reverts commits: - 3be2043a95f15579453e68ff96360f60aeae24e3 - fd17a0fbf8a75449720fe3861f941f4a91fcc9c7 - 59f0ebfef49e37060cb2dc63cf67c7809befcf57 --------- Co-authored-by: parity-processbot <> Co-authored-by: Martin <parity@tofu.lan>
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
name: Check updated weights
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'runtime/*/src/weights/**'
|
||||
|
||||
jobs:
|
||||
check_weights_files:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runtime: [westend, kusama, polkadot, rococo]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Check weights files
|
||||
shell: bash
|
||||
run: |
|
||||
scripts/ci/github/verify_updated_weights.sh ${{ matrix.runtime }}
|
||||
|
||||
# This job uses https://github.com/ggwpez/substrate-weight-compare to compare the weights of the current
|
||||
# release with the last release, then adds them as a comment to the PR.
|
||||
check_weight_changes:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runtime: [westend, kusama, polkadot, rococo]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get latest release
|
||||
run: |
|
||||
LAST_RELEASE=$(curl -s https://api.github.com/repos/paritytech/polkadot/releases/latest | jq -r .tag_name)
|
||||
echo "LAST_RELEASE=$LAST_RELEASE" >> $GITHUB_ENV
|
||||
- name: Checkout current sources
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check weight changes
|
||||
shell: bash
|
||||
run: |
|
||||
cargo install --git https://github.com/ggwpez/substrate-weight-compare swc
|
||||
./scripts/ci/github/check_weights_swc.sh ${{ matrix.runtime }} "$LAST_RELEASE" | tee swc_output_${{ matrix.runtime }}.md
|
||||
- name: Add comment
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
filePath: ./swc_output_${{ matrix.runtime }}.md
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user