Skip to content

Commit 9f467a6

Browse files
ci: add temporary benchmark workflows for pr2483 sweep
1 parent 1010d3f commit 9f467a6

9 files changed

+1049
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Bench Cargo Audit
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: Branch or tag to benchmark
8+
required: true
9+
default: fireactions-runners
10+
runner_label:
11+
description: Fireactions benchmark label
12+
required: true
13+
sweep_id:
14+
description: Sweep identifier
15+
required: true
16+
rep:
17+
description: Repetition number
18+
required: true
19+
bench_job_key:
20+
description: Job selector
21+
required: true
22+
default: cargo-audit
23+
24+
run-name: bench-cargo-audit | ${{ inputs.sweep_id }} | ${{ inputs.bench_job_key }} | ${{ inputs.runner_label }} | rep-${{ inputs.rep }}
25+
26+
concurrency:
27+
group: bench-cargo-audit-${{ inputs.sweep_id }}-${{ inputs.runner_label }}-rep-${{ inputs.rep }}
28+
cancel-in-progress: false
29+
30+
jobs:
31+
cargo-audit:
32+
if: ${{ inputs.bench_job_key == 'cargo-audit' }}
33+
runs-on: [self-hosted, ${{ inputs.runner_label }}]
34+
env:
35+
CARGO_BUILD_JOBS: 4
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
ref: ${{ inputs.ref }}
40+
- name: Install dependencies
41+
run: |
42+
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
43+
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" build-essential clang curl libssl-dev llvm libudev-dev protobuf-compiler pkg-config
44+
- uses: actions-rs/toolchain@v1
45+
with:
46+
toolchain: stable
47+
- uses: Swatinem/rust-cache@v2
48+
with:
49+
key: bench-cargo-audit
50+
cache-on-failure: true
51+
- run: cargo install --force cargo-audit
52+
- run: cargo audit --version
53+
- name: cargo audit
54+
run: |
55+
cargo audit --ignore RUSTSEC-2023-0091 \
56+
--ignore RUSTSEC-2024-0438 \
57+
--ignore RUSTSEC-2025-0009 \
58+
--ignore RUSTSEC-2025-0055 \
59+
--ignore RUSTSEC-2025-0073 \
60+
--ignore RUSTSEC-2025-0118
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Bench Check Docker
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: Branch or tag to benchmark
8+
required: true
9+
default: fireactions-runners
10+
runner_label:
11+
description: Fireactions benchmark label
12+
required: true
13+
sweep_id:
14+
description: Sweep identifier
15+
required: true
16+
rep:
17+
description: Repetition number
18+
required: true
19+
bench_job_key:
20+
description: Job selector
21+
required: true
22+
default: build
23+
24+
run-name: bench-check-docker | ${{ inputs.sweep_id }} | ${{ inputs.bench_job_key }} | ${{ inputs.runner_label }} | rep-${{ inputs.rep }}
25+
26+
concurrency:
27+
group: bench-check-docker-${{ inputs.sweep_id }}-${{ inputs.runner_label }}-rep-${{ inputs.rep }}
28+
cancel-in-progress: false
29+
30+
jobs:
31+
build:
32+
if: ${{ inputs.bench_job_key == 'build' }}
33+
runs-on: [self-hosted, ${{ inputs.runner_label }}]
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
ref: ${{ inputs.ref }}
38+
- uses: docker/setup-qemu-action@v2
39+
- uses: docker/setup-buildx-action@v2
40+
- run: docker build .
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Bench Check Node Compat
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: Branch or tag to benchmark
8+
required: true
9+
default: fireactions-runners
10+
runner_label:
11+
description: Fireactions benchmark label
12+
required: true
13+
sweep_id:
14+
description: Sweep identifier
15+
required: true
16+
rep:
17+
description: Repetition number
18+
required: true
19+
bench_job_key:
20+
description: Job selector (build or test)
21+
required: true
22+
default: build
23+
24+
run-name: bench-check-node-compat | ${{ inputs.sweep_id }} | ${{ inputs.bench_job_key }} | ${{ inputs.runner_label }} | rep-${{ inputs.rep }}
25+
26+
concurrency:
27+
group: bench-check-node-compat-${{ inputs.sweep_id }}-${{ inputs.bench_job_key }}-${{ inputs.runner_label }}-rep-${{ inputs.rep }}
28+
cancel-in-progress: false
29+
30+
env:
31+
CARGO_TERM_COLOR: always
32+
CARGO_BUILD_JOBS: 4
33+
34+
jobs:
35+
build:
36+
if: ${{ inputs.bench_job_key == 'build' || inputs.bench_job_key == 'test' }}
37+
name: build ${{ matrix.version.name }}
38+
runs-on: [self-hosted, ${{ inputs.runner_label }}]
39+
env:
40+
RUST_BACKTRACE: full
41+
strategy:
42+
matrix:
43+
version:
44+
- name: old
45+
ref: devnet-ready
46+
- name: new
47+
ref: ${{ inputs.ref }}
48+
steps:
49+
- name: Install dependencies
50+
run: |
51+
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
52+
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" build-essential clang curl git make libssl-dev llvm libudev-dev protobuf-compiler pkg-config unzip
53+
- uses: actions-rs/toolchain@v1
54+
with:
55+
toolchain: stable
56+
- uses: Swatinem/rust-cache@v2
57+
with:
58+
key: bench-check-node-compat-${{ matrix.version.name }}
59+
- name: Checkout ${{ matrix.version.name }}
60+
uses: actions/checkout@v4
61+
with:
62+
ref: ${{ matrix.version.ref }}
63+
path: ${{ matrix.version.name }}
64+
- name: Build ${{ matrix.version.name }}
65+
working-directory: ${{ matrix.version.name }}
66+
run: cargo build --release --locked
67+
- name: Upload ${{ matrix.version.name }} node binary
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: node-subtensor-${{ matrix.version.name }}
71+
path: ${{ matrix.version.name }}/target/release/node-subtensor
72+
retention-days: 1
73+
74+
test:
75+
if: ${{ inputs.bench_job_key == 'test' }}
76+
needs: [build]
77+
runs-on: [self-hosted, ${{ inputs.runner_label }}]
78+
steps:
79+
- uses: actions/download-artifact@v4
80+
with:
81+
name: node-subtensor-old
82+
path: /tmp/node-subtensor-old
83+
- uses: actions/download-artifact@v4
84+
with:
85+
name: node-subtensor-new
86+
path: /tmp/node-subtensor-new
87+
- uses: actions/setup-node@v4
88+
with:
89+
node-version: "24"
90+
- uses: actions/checkout@v4
91+
with:
92+
ref: ${{ inputs.ref }}
93+
- name: Install npm dependencies
94+
working-directory: ${{ github.workspace }}/.github/workflows/check-node-compat
95+
run: npm install
96+
- name: Run test
97+
working-directory: ${{ github.workspace }}/.github/workflows/check-node-compat
98+
run: npm run test

0 commit comments

Comments
 (0)