Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from paritytech:master #73

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
12ed0f4
Add an extra_constant to pallet-collator-selection (#7206)
Moliholy Jan 21, 2025
c0c0632
Snowbridge - Copy Rococo integration tests to Westend (#7108)
claravanstaden Jan 21, 2025
ebde96c
Fix link-checker job (#7261)
skunert Jan 21, 2025
9edaef0
Migrate pallet-paged-list-fuzzer to umbrella crate (#6930)
Krayt78 Jan 21, 2025
2345eb9
Bump zombienet version to `v1.3.119` (#7283)
pepoviola Jan 21, 2025
1bdb817
Enable BEEFY `report_fork_voting()` (#6856)
serban300 Jan 22, 2025
4eb9228
collation-generation: resolve mismatch between descriptor and commitm…
sw10pa Jan 22, 2025
350a6c4
Fix bridge tests image (#7292)
serban300 Jan 22, 2025
634a17b
Unify Import verifier usage across parachain template and omninode (#…
MrishoLukamba Jan 22, 2025
fd64a1e
net/libp2p: Enforce outbound request-response timeout limits (#7222)
lexnv Jan 22, 2025
89b0228
Migrate `pallet-insecure-randomness-collective-flip` to umbrella crat…
FereMouSiopi Jan 22, 2025
5772b9d
[pallet-revive] fee estimation fixes (#7281)
pgherveou Jan 23, 2025
fb2e414
[Release|CI/CD] Download only linux artefacts for deb package build (…
EgorPopelyaev Jan 23, 2025
04847d5
Balances: Configurable Number of Genesis Accounts with Specified Bala…
runcomet Jan 23, 2025
66bd26d
Add `offchain_localStorageClear` RPC method (#7266)
khssnv Jan 23, 2025
085da47
Bridges small nits/improvements (#7307)
bkontur Jan 23, 2025
cfc5b6f
bump lookahead to 3 for testnet genesis (#7252)
alindima Jan 23, 2025
6091330
Refactor command bot and drop rejecting non paritytech members (#7231)
mordamax Jan 23, 2025
3a7f3c0
Fix setting the image properly (#7315)
mordamax Jan 23, 2025
e9393a9
Deprecate ParaBackingState API (#6867)
sandreim Jan 23, 2025
f845a9f
bench all weekly - and fix for pallet_multisig lib (#6789)
mordamax Jan 24, 2025
2360007
Nits for collectives-westend XCM benchmarks setup (#7215)
bkontur Jan 24, 2025
a2c63e8
fix(cmd bench-omni): build omni-bencher with production profile (#7299)
iulianbarbu Jan 24, 2025
7710483
Bridges: emulated tests small nits/improvements (#7322)
bkontur Jan 24, 2025
ccd6337
sync-templates: enable syncing from stable release patches (#7227)
iulianbarbu Jan 24, 2025
223bd28
[pallet-revive] eth-rpc minor fixes (#7325)
pgherveou Jan 24, 2025
dcbea60
revive: Fix compilation of `uapi` crate when `unstable-hostfn` is not…
athei Jan 24, 2025
a31d26d
Fix the link to the chain snapshots (#7330)
AndreiEres Jan 24, 2025
682f8cd
`set_validation_data` register weight manually, do not use refund whe…
gui1117 Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions .github/workflows/bench-all-runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: Bench all runtimes

on:
# schedule:
# - cron: '0 1 * * 0' # weekly on Sunday night 01:00 UTC
workflow_dispatch:
# pull_request:

permissions: # allow the action to create a PR
contents: write
issues: write
pull-requests: write
actions: read

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

runtime-matrix:
runs-on: ubuntu-latest
needs: [preflight]
timeout-minutes: 30
outputs:
runtime: ${{ steps.runtime.outputs.runtime }}
container:
image: ${{ needs.preflight.outputs.IMAGE }}
name: Extract runtimes from matrix
steps:
- uses: actions/checkout@v4
- id: runtime
run: |
RUNTIMES=$(jq '[.[] | select(.package != null)]' .github/workflows/runtimes-matrix.json)

RUNTIMES=$(echo $RUNTIMES | jq -c .)
echo "runtime=$RUNTIMES"
echo "runtime=$RUNTIMES" >> $GITHUB_OUTPUT

run-frame-omni-bencher:
needs: [preflight, runtime-matrix]
runs-on: ${{ needs.preflight.outputs.RUNNER_WEIGHTS }}
# 24 hours per runtime.
# Max it takes 14hr for westend to recalculate, but due to limited runners,
# sometimes it can take longer.
timeout-minutes: 1440
strategy:
fail-fast: false # keep running other workflows even if one fails, to see the logs of all possible failures
matrix:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
container:
image: ${{ needs.preflight.outputs.IMAGE }}
env:
PACKAGE_NAME: ${{ matrix.runtime.package }}
FLAGS: ${{ matrix.runtime.bench_flags }}
RUST_LOG: "frame_omni_bencher=info,polkadot_sdk_frame=info"
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master

- name: script
id: required
run: |
# Fixes "detected dubious ownership" error in the ci
git config --global --add safe.directory $GITHUB_WORKSPACE
git remote -v
python3 -m pip install -r .github/scripts/generate-prdoc.requirements.txt
python3 .github/scripts/cmd/cmd.py bench --runtime ${{ matrix.runtime.name }}
git add .
git status

if [ -f /tmp/cmd/command_output.log ]; then
CMD_OUTPUT=$(cat /tmp/cmd/command_output.log)
# export to summary to display in the PR
echo "$CMD_OUTPUT" >> $GITHUB_STEP_SUMMARY
# should be multiline, otherwise it captures the first line only
echo 'cmd_output<<EOF' >> $GITHUB_OUTPUT
echo "$CMD_OUTPUT" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
fi

# Create patch that includes both modifications and new files
git add -A
git diff --staged > diff-${{ matrix.runtime.name }}.patch -U0
git reset

- name: Upload diff
uses: actions/upload-artifact@v4
with:
name: diff-${{ matrix.runtime.name }}
path: diff-${{ matrix.runtime.name }}.patch

apply-diff-commit:
runs-on: ubuntu-latest
needs: [run-frame-omni-bencher]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: patches

- name: Install subweight
run: cargo install subweight

# needs to be able to trigger CI
- uses: actions/create-github-app-token@v1
id: generate_token
with:
app-id: ${{ secrets.CMD_BOT_APP_ID }}
private-key: ${{ secrets.CMD_BOT_APP_KEY }}

- name: Apply diff and create PR
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
DATE=$(date +'%Y-%m-%d-%s')
BRANCH="update-weights-weekly-$DATE"

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git switch -c "$BRANCH"

for file in patches/diff-*/diff-*.patch; do
if [ -f "$file" ] && [ -s "$file" ]; then
echo "Applying $file"
git apply "$file" --unidiff-zero --allow-empty || echo "Failed to apply $file"
else
echo "Skipping empty or non-existent patch file: $file"
fi
done
rm -rf patches

git add .
git commit -m "Update all weights weekly for $DATE"
git push --set-upstream origin "$BRANCH"

PR_TITLE="Auto-update of all weights for $DATE"
gh pr create \
--title "$PR_TITLE" \
--head "$BRANCH" \
--base "master" \
--reviewer paritytech/ci \
--reviewer paritytech/release-engineering \
--draft \
--label "R0-silent" \
--body "$PR_TITLE"

subweight compare commits \
--path-pattern "./**/weights/**/*.rs,./**/weights.rs" \
--method asymptotic \
--format markdown \
--no-color \
--change added changed \
--ignore-errors \
--threshold 2 \
origin/master $BRANCH
28 changes: 28 additions & 0 deletions .github/workflows/build-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,34 @@ jobs:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }}

# As part of our test fixtures we build the revive-uapi crate always with the `unstable-hostfn` feature.
# To make sure that it won't break for users downstream which are not setting this feature
# It doesn't need to produce working code so we just use a similar enough RISC-V target
check-revive-stable-uapi-polkavm:
timeout-minutes: 30
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
container:
image: ${{ needs.preflight.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check Rust
run: |
rustup show
rustup +nightly show
- name: Build
id: required
run: forklift cargo +nightly check -p pallet-revive-uapi --no-default-features --target riscv64imac-unknown-none-elf -Zbuild-std=core
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
with:
app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }}
app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }}

build-subkey:
timeout-minutes: 20
needs: [preflight]
Expand Down
Loading
Loading