Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
d1a9d33
tests cleanup
andreea-popescu-reef Feb 11, 2025
054f472
rebase
andreea-popescu-reef Feb 20, 2025
c5497be
cargo fmt
andreea-popescu-reef Mar 17, 2025
e18b9dc
liquid alpha 2 impl
andreea-popescu-reef Mar 19, 2025
875a0ff
fix yuma4 tests
andreea-popescu-reef Mar 19, 2025
197fd0b
fix math tests
andreea-popescu-reef Mar 20, 2025
37057d3
cleanup fixes
andreea-popescu-reef Mar 20, 2025
f57481f
clippy refactor
andreea-popescu-reef Mar 20, 2025
9cdef41
add alpha sigmoid steepness param
andreea-popescu-reef Mar 20, 2025
ae6d281
refactor bonds fetching
andreea-popescu-reef Mar 21, 2025
fc06c55
use sigmoid steepness param
andreea-popescu-reef Mar 21, 2025
bf6f6d7
yuma3 rename
andreea-popescu-reef Mar 25, 2025
d6c51f0
more improved tests
andreea-popescu-reef Mar 25, 2025
b5d766b
fix rebase
andreea-popescu-reef Mar 25, 2025
4cda7e2
fix rebase tests
andreea-popescu-reef Mar 25, 2025
fddbf00
Update pallets/subtensor/src/epoch/math.rs
andreea-popescu-reef Apr 1, 2025
eb53de3
Update pallets/subtensor/src/epoch/math.rs
andreea-popescu-reef Apr 1, 2025
d480c6c
simplify alphas matrix computation
andreea-popescu-reef Apr 1, 2025
7fb6555
add Yuma3 toggle
andreea-popescu-reef Apr 8, 2025
be623f0
revert original yuma
andreea-popescu-reef Apr 8, 2025
564745a
revert no liquid alpha tests
andreea-popescu-reef Apr 8, 2025
f511bbb
fix liquid_alpha disabled
andreea-popescu-reef Apr 9, 2025
2a807b5
Use sp_std::vec::Vec
keithtensor Apr 14, 2025
c9c3f6c
cargo fmt
keithtensor Apr 14, 2025
2ceeaac
Add precompile test for UID lookup
keithtensor Apr 16, 2025
c1a6d96
Merge branch 'devnet-ready' into precompile-uid-lookup
keithtensor Apr 16, 2025
8df61d8
Remove unused code
keithtensor Apr 16, 2025
e0d18dd
Assert the right things
keithtensor Apr 16, 2025
585088d
Merge remote-tracking branch 'origin/devnet-ready' into precompile-ui…
sam0x17 Apr 17, 2025
2b16b81
Merge remote-tracking branch 'origin/devnet-ready' into precompile-ui…
sam0x17 Apr 17, 2025
2eb3c8c
impl
camfairchild Apr 17, 2025
13c3466
Use SCALE codec to encode block number
keithtensor Apr 21, 2025
9f6df3b
Remove papi
keithtensor Apr 21, 2025
a6a70f9
Debug
keithtensor Apr 21, 2025
27bcd46
Fixes
keithtensor Apr 21, 2025
41947cf
Fixes
keithtensor Apr 21, 2025
8621f45
Create new subnet
keithtensor Apr 21, 2025
24b6bfc
Merge branch 'devnet-ready' into yuma4
camfairchild Apr 21, 2025
b6b7473
cargo lock
camfairchild Apr 21, 2025
8fdee51
fmt
camfairchild Apr 21, 2025
12527c9
Fund alice account
keithtensor Apr 22, 2025
f06fe52
Refactor
keithtensor Apr 24, 2025
53c35db
Merge remote-tracking branch 'origin/devnet-ready' into precompile-ui…
keithtensor Apr 24, 2025
1d373e5
Fixes
keithtensor Apr 24, 2025
9a97f26
Add startCall
keithtensor Apr 24, 2025
61f0894
Remove burnedRegister
keithtensor Apr 25, 2025
e01fc60
Remove unusued dependency
keithtensor Apr 28, 2025
03ad35f
Merge remote-tracking branch 'origin/devnet-ready' into precompile-ui…
keithtensor Apr 28, 2025
8ea0151
Debug
keithtensor Apr 28, 2025
b4ed364
Debug
keithtensor Apr 28, 2025
3175870
Remove log statements
keithtensor Apr 28, 2025
944b0ad
Comment out assertion
keithtensor Apr 28, 2025
7d8cd02
Re-add assertion
keithtensor Apr 28, 2025
a737fb3
rerun benchmarks on label change
JohnReedV Apr 28, 2025
c14c285
Merge branch 'devnet-ready' into validate-benchmark-label-reruns
JohnReedV Apr 28, 2025
2fea103
Merge branch 'devnet-ready' into feat/stake-limit-precompiles
open-junius Apr 29, 2025
38bb052
test passed
open-junius Apr 29, 2025
5602316
Introduce ZeroMaxAmount error.
shamil-gadelshin Apr 29, 2025
b837b23
Merge pull request #1574 from opentensor/validate-benchmark-label-reruns
JohnReedV Apr 29, 2025
a269acc
wip
camfairchild Apr 30, 2025
fe00273
rebase and fix compilation error
open-junius Apr 30, 2025
68760ce
fix weights
open-junius Apr 30, 2025
4fc60ff
cargo clippy
open-junius Apr 30, 2025
ed23c36
fix test case
open-junius Apr 30, 2025
eb57c0f
update version
open-junius Apr 30, 2025
74d4373
Refactor get_max_amount_move using ZeroMaxStakeAmount error.
shamil-gadelshin Apr 30, 2025
2ce5dd9
Debug
keithtensor Apr 30, 2025
6a0aed5
Debug
keithtensor Apr 30, 2025
7878f01
Debug
keithtensor Apr 30, 2025
6d1a8f3
Upgrade benchmarks to V2
JohnReedV Apr 30, 2025
0638ee2
update benchmark.sh for V2
JohnReedV Apr 30, 2025
e28a8ab
update benchmark_action for V2
JohnReedV Apr 30, 2025
ef14fc4
update weight values for v2
JohnReedV Apr 30, 2025
7a88828
bump spec
JohnReedV Apr 30, 2025
3935399
update more weight values
JohnReedV Apr 30, 2025
7c78a10
update weight
JohnReedV May 1, 2025
50b00c1
update test
JohnReedV May 1, 2025
ff8c1f2
put migration in hook
open-junius May 1, 2025
b311ee1
remove wrong imports
open-junius May 1, 2025
e5b269b
Debug
keithtensor May 1, 2025
aae7de2
fix update_cap/update_min_deposit minimum value check
l0r1s May 1, 2025
0b4194e
fix withdraw to restrict from the origin and not someone else
l0r1s May 1, 2025
0fbc067
Merge branch 'devnet-ready' into yuma4-update-to-upstream
camfairchild May 1, 2025
93d7d7f
fixed withdraw logic for creator
l0r1s May 1, 2025
541d227
Ensure coldkey is signing the tx
keithtensor May 1, 2025
fd710f7
fix refund/dissolve + tests
l0r1s May 1, 2025
121e4f7
fix doc
l0r1s May 1, 2025
392e677
Check that the block number associated is correct
keithtensor May 1, 2025
3ffc874
Debug
keithtensor May 1, 2025
50550ab
update weights
l0r1s May 1, 2025
da99c5b
fix comments
l0r1s May 1, 2025
1c86c67
Merge branch 'devnet-ready' into feat/use-on-chain-subnet-identity
camfairchild May 1, 2025
ca4d2ef
fmt
camfairchild May 1, 2025
e906b32
bump spec_version
l0r1s May 1, 2025
14a86cd
Update get_max_amount_* methods.
shamil-gadelshin Apr 30, 2025
a6e7de8
Compare bytes
keithtensor May 1, 2025
e98df7e
Merge pull request #1552 from opentensor/feat/stake-limit-precompiles
sam0x17 May 1, 2025
fe58185
Merge pull request #1584 from opentensor/upgrade-subtensor-benchmarks-v2
sam0x17 May 1, 2025
aa4ac19
update weights
JohnReedV May 1, 2025
b119199
remove migration
camfairchild May 1, 2025
63b72bb
remove comment
camfairchild May 1, 2025
2dca834
Merge pull request #1501 from opentensor/feat/use-on-chain-subnet-ide…
sam0x17 May 1, 2025
21fb6a5
Merge pull request #1587 from opentensor/l0r1s/fix-crowdloan-logic-is…
sam0x17 May 1, 2025
153e3da
add event for yuma3 toggle
camfairchild May 1, 2025
9f91dad
Debug
keithtensor May 2, 2025
cb46c82
Ensure signature is in EIP191 format
keithtensor May 2, 2025
4e6c6b6
Remove unused imports
keithtensor May 2, 2025
2958ba9
Merge branch 'devnet-ready' into add-stake-limit-fix
shamil-gadelshin May 2, 2025
7748b8e
Merge branch 'devnet-ready' into add-stake-limit-fix
shamil-gadelshin May 2, 2025
a4794f9
Update benchmarks to V2 after merge.
shamil-gadelshin May 2, 2025
e6d17ca
Introduce SameSubnetId error for move and swap stake extrinsics.
shamil-gadelshin May 2, 2025
76d6c36
Ensure recovery ID of signature is normalized to 0 or 1
keithtensor May 2, 2025
ef5ce60
Satisfy linters
keithtensor May 2, 2025
8295710
Restore package.json
keithtensor May 2, 2025
4f192d5
script benchmarks all pallets
JohnReedV May 1, 2025
7086664
update dispatch weights for admin-utils
JohnReedV Apr 29, 2025
aba5d9f
update admin-utils weights
JohnReedV May 1, 2025
c2830ec
update weight
JohnReedV May 1, 2025
91134bf
add commitments benchmarks
JohnReedV May 1, 2025
3e08baf
add commitments weights
JohnReedV May 1, 2025
42bf08b
update commitments weights again
JohnReedV May 1, 2025
888ea8e
raise tolerance threshold 10% => 15%
JohnReedV May 1, 2025
a40792d
update drand weights
JohnReedV May 1, 2025
1d50da2
update drand writes
JohnReedV May 1, 2025
9dc13bd
use benchmarks runner instead of SubtensorCI
JohnReedV May 1, 2025
f9fa3cf
remove crowdloan from `validate-benchmarks`
JohnReedV May 1, 2025
b97326b
Merge branch 'devnet-ready' into precompile-uid-lookup
JohnReedV May 2, 2025
e398731
Merge pull request #1580 from opentensor/feat/allow-reschedule-failed…
open-junius May 4, 2025
3d3796c
Update comments.
shamil-gadelshin May 5, 2025
8efe071
Merge pull request #1518 from opentensor/precompile-uid-lookup
keithtensor May 5, 2025
c28ecc6
chore: fmt
camfairchild May 5, 2025
487c231
added log crate to crowdloan
l0r1s May 5, 2025
39cea2a
keep track of contributors count and allow a maximum of contributors,…
l0r1s May 5, 2025
203a8a3
fix tests
l0r1s May 5, 2025
ea8700e
added MaxContributors to runtime
l0r1s May 5, 2025
6ec5d63
fix migration name
l0r1s May 5, 2025
c0f5129
Add `start-call` patch for non-fast-blocks node
May 5, 2025
1fe18cb
bumping spec_version
May 5, 2025
d49c04e
added migration test
l0r1s May 5, 2025
6b37119
cargo clippy
l0r1s May 5, 2025
96cdf64
cargo fmt
l0r1s May 5, 2025
b4acaf8
Merge pull request #1577 from opentensor/add-stake-limit-fix
sam0x17 May 5, 2025
a4a2bd2
Merge pull request #1592 from opentensor/feat/roman/add-start-call-pa…
sam0x17 May 5, 2025
9d9f384
Merge pull request #1585 from opentensor/benchmark-all-pallets
sam0x17 May 5, 2025
83ad744
remove deprecated commitments storage
JohnReedV May 5, 2025
85fac14
fmt
JohnReedV May 5, 2025
ef47e7a
remove deprecated benchmark
JohnReedV May 5, 2025
5a6acbf
add migrate_remove_commitments_rate_limit
JohnReedV May 5, 2025
17715c1
add test_migrate_remove_commitments_rate_limit
JohnReedV May 5, 2025
6f57b8c
fmt
JohnReedV May 5, 2025
0ac6ea8
remove rate limit config
JohnReedV May 5, 2025
2db3c7d
clippy
JohnReedV May 5, 2025
84d185a
don't fully remove
JohnReedV May 5, 2025
759052e
ci: bump CI
JohnReedV May 5, 2025
e3156db
add to StakingHotkeys on inc stake
camfairchild May 5, 2025
580d42e
Merge pull request #1595 from opentensor/remove-deprecated-commitment…
sam0x17 May 5, 2025
92a4779
Merge pull request #1596 from opentensor/fix/add-to-staking-hotkeys-o…
sam0x17 May 5, 2025
2ff2b94
Ensure we only reset BondsMovingAverage to 975000 only if it exceeds
keithtensor May 6, 2025
6f49d83
reapply Cargo.lock from devnet-ready
l0r1s May 6, 2025
9e475e1
Merge branch 'devnet-ready' into feat/yuma3
l0r1s May 6, 2025
825f793
Merge branch 'devnet-ready' into check-same-netuids
shamil-gadelshin May 6, 2025
ae2d1f0
Merge branch 'devnet-ready' into l0r1s/crowdloan-contributors-limit
l0r1s May 6, 2025
016e7f3
propagate log/std in Cargo.toml
l0r1s May 6, 2025
2665274
Fixes
keithtensor May 6, 2025
d924289
cargo fmt
keithtensor May 6, 2025
632c1c9
Update benchmark weights
shamil-gadelshin May 6, 2025
991832c
ignore test that takes CLI input
camfairchild May 6, 2025
bcfebc4
Merge pull request #1598 from opentensor/fix-bonds-moving-average-reset
sam0x17 May 6, 2025
48a87e2
Rename error SameSubnetId -> SameNetuid
shamil-gadelshin May 6, 2025
08dd35e
move contributors count to Crowdloan struct and update migration
l0r1s May 6, 2025
e79e783
fix benchmark
l0r1s May 6, 2025
3f565fb
fix arithmetic
l0r1s May 6, 2025
3bebc53
fix name of storage value in evm test
camfairchild May 6, 2025
a58750f
extend patch step for localnet docker image
May 6, 2025
c9322a0
bumping spec_version
May 6, 2025
c059205
Merge pull request #1603 from opentensor/feat/roman/extend-patch-for-…
sam0x17 May 6, 2025
9a44538
add set yuma3 enabled to ABI
camfairchild May 6, 2025
79490d3
added freeze_struct to OldCrowdloanInfo
l0r1s May 7, 2025
8215998
Merge branch 'feat/yuma3' into feat/emit-event-on-yuma3-enable
l0r1s May 7, 2025
d3736c2
upgrade polkadot sdk to polkadot-stable2409-7 and frontier to last ma…
l0r1s May 7, 2025
dc7eb20
fix EvmBalance/SubstrateBalance issues
l0r1s May 7, 2025
d8e6c56
fix frontier dependencies commit hash + added fc-aura
l0r1s May 7, 2025
0e603a4
fix tests
l0r1s May 7, 2025
70d01dc
cargo fmt
l0r1s May 7, 2025
c085c39
Merge branch 'devnet-ready' into l0r1s/upgrade-polkadot-sdk-to-2409-7
l0r1s May 7, 2025
32b124f
Merge branch 'devnet-ready' into l0r1s/crowdloan-contributors-limit
l0r1s May 7, 2025
2e2bc58
Merge pull request #1605 from opentensor/feat/emit-event-on-yuma3-enable
sam0x17 May 7, 2025
067cd62
change frontier commit hash following frontier upgrade
l0r1s May 7, 2025
0b0dfd1
Merge pull request #1588 from opentensor/check-same-netuids
sam0x17 May 7, 2025
26ea39a
Merge branch 'devnet-ready' into l0r1s/upgrade-polkadot-sdk-to-2409-7
l0r1s May 7, 2025
b7f2fbb
Merge pull request #1591 from opentensor/l0r1s/crowdloan-contributors…
sam0x17 May 7, 2025
89278bb
remove direct indexing
camfairchild May 7, 2025
ca5d4b2
have Dockerfile use a local user instead of root
sam0x17 May 7, 2025
5f43a5f
clean up
sam0x17 May 7, 2025
ef3698a
Merge pull request #1610 from opentensor/sam-make-docker-secure
sam0x17 May 7, 2025
f8b239b
only respect the `skip-validate-benchmarks` label
JohnReedV May 7, 2025
f15a42f
update exit code
JohnReedV May 7, 2025
f5eec3b
stop moving on in skip case
JohnReedV May 7, 2025
7df461b
update names
JohnReedV May 7, 2025
4c62519
rerun on label removed
JohnReedV May 7, 2025
3b9b9b2
fix?
JohnReedV May 7, 2025
57a8290
fix??
JohnReedV May 7, 2025
c75a1ac
fix?
JohnReedV May 7, 2025
0ab04ce
oops
JohnReedV May 7, 2025
79d16e8
fix?
JohnReedV May 7, 2025
b637720
revert rerun
JohnReedV May 7, 2025
df21554
Ensure we only reset BondsMovingAverage to 975000 only if it exceeds
keithtensor May 6, 2025
8bec162
Fixes
keithtensor May 6, 2025
4610c8b
cargo fmt
keithtensor May 6, 2025
8493bbf
Introduce SameSubnetId error for move and swap stake extrinsics.
shamil-gadelshin May 2, 2025
f974a94
Rename error SameSubnetId -> SameNetuid
shamil-gadelshin May 6, 2025
5862a43
keep track of contributors count and allow a maximum of contributors,…
l0r1s May 5, 2025
774a5fc
fix tests
l0r1s May 5, 2025
d347707
fix migration name
l0r1s May 5, 2025
017f3ff
added migration test
l0r1s May 5, 2025
2918789
cargo clippy
l0r1s May 5, 2025
ae65d49
cargo fmt
l0r1s May 5, 2025
d3c05ee
move contributors count to Crowdloan struct and update migration
l0r1s May 6, 2025
677749a
fix benchmark
l0r1s May 6, 2025
8d23896
fix arithmetic
l0r1s May 6, 2025
f736382
added freeze_struct to OldCrowdloanInfo
l0r1s May 7, 2025
b43e332
have Dockerfile use a local user instead of root
sam0x17 May 7, 2025
7ca5bcb
clean up
sam0x17 May 7, 2025
04a86f8
add yuma4 scenario test
andreea-popescu-reef Feb 4, 2025
4a16441
fix alpha values
andreea-popescu-reef Feb 5, 2025
5cd7527
tests cleanup
andreea-popescu-reef Feb 11, 2025
1b541e6
add BondsResetOn param
andreea-popescu-reef Feb 17, 2025
5d14a1b
add OnMetadataCommitment hook
andreea-popescu-reef Feb 17, 2025
c054429
add bonds reset
andreea-popescu-reef Feb 20, 2025
249901a
add ResetBondsFlag check for set_commitment
andreea-popescu-reef Feb 26, 2025
6222e21
fix bonds reset
andreea-popescu-reef Mar 21, 2025
59bcbf1
fix rebase
andreea-popescu-reef Mar 25, 2025
6ae811b
increased commitment fields to allow for reset_bonds flag
andreea-popescu-reef Apr 4, 2025
f122920
add LastBondsReset tracking
andreea-popescu-reef May 6, 2025
bd8a26b
Merge branch 'devnet-ready' into feat/yuma3
camfairchild May 7, 2025
9bcf700
remove comment
JohnReedV May 8, 2025
a35a6d5
fix?
JohnReedV May 8, 2025
d92946e
Merge branch 'devnet-ready' into l0r1s/upgrade-polkadot-sdk-to-2409-7
l0r1s May 8, 2025
0f9c291
Merge pull request #1593 from opentensor/feat/yuma3
sam0x17 May 8, 2025
c91987b
remove unneeded step
JohnReedV May 8, 2025
8162058
bump CI
JohnReedV May 8, 2025
9db9dd9
add CLI step
JohnReedV May 8, 2025
4920ad8
fix
JohnReedV May 8, 2025
9d12f6c
Update run-benchmarks.yml
JohnReedV May 8, 2025
39daeee
Merge pull request #1607 from opentensor/l0r1s/upgrade-polkadot-sdk-t…
sam0x17 May 8, 2025
b2e7ba5
Merge remote-tracking branch 'origin/devnet-ready' into feat/reset-bo…
sam0x17 May 8, 2025
0194c28
Merge pull request #1612 from opentensor/feat/reset-bonds-on-commitment
sam0x17 May 8, 2025
3c4d403
Merge remote-tracking branch 'origin/devnet-ready' into validate-benc…
sam0x17 May 8, 2025
987cd4b
bump
sam0x17 May 8, 2025
ecd3444
Merge pull request #1611 from opentensor/validate-benchmarks-only-res…
sam0x17 May 8, 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
5 changes: 5 additions & 0 deletions .github/workflows/docker-localnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Patch non-fast-block node
run: |
perl -0777 -i -pe 's|7 \* 24 \* 60 \* 60 / 12 // 7 days|5 // Only 5 blocks for tests|' runtime/src/lib.rs
perl -0777 -i -pe 's|pub fn DefaultPendingCooldown<T: Config>\(\) -> u64 \{\s*if cfg!\(feature = "fast-blocks"\) \{\s*return 15;\s*\}\s*7_200\s*\}|pub fn DefaultPendingCooldown<T: Config>() -> u64 {\n 15\n }|g' pallets/subtensor/src/lib.rs

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-triggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
body: '@opentensor/cerebrum / @opentensor/gyrus / @opentensor/cortex breaking change detected! Please prepare accordingly!'
})
})
78 changes: 75 additions & 3 deletions .github/workflows/run-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Validate-Benchmarks

on:
pull_request:
types:
- opened
- synchronize
workflow_dispatch:

concurrency:
Expand All @@ -11,36 +14,105 @@ concurrency:

jobs:
validate-benchmarks:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-validate-benchmarks') }}
runs-on: SubtensorCI
runs-on: Benchmarking

env:
SKIP_BENCHMARKS: '0'

steps:
- name: Checkout PR branch
- name: Check out PR branch
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Install GitHub CLI
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
sudo apt-get update
sudo apt-get install -y gh
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Install system dependencies
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
sudo apt-get update
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Install Rust toolchain
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Cache Rust build
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: Swatinem/rust-cache@v2
with:
key: bench-${{ hashFiles('**/Cargo.lock') }}

- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Build node with benchmarks
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
cargo build --profile production -p node-subtensor --features runtime-benchmarks

- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Run & validate benchmarks
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
chmod +x scripts/benchmark_action.sh
./scripts/benchmark_action.sh

- name: Check skip label after run
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label was found — but benchmarks already ran."
fi
Loading
Loading