Skip to content

ci: include devnet-ready in spec check workflows for benchmarks #5

ci: include devnet-ready in spec check workflows for benchmarks

ci: include devnet-ready in spec check workflows for benchmarks #5

name: Bench Fireactions Docker Localnet Dry-Run
on:
workflow_dispatch:
inputs:
ref:
description: Branch or tag to benchmark
required: true
default: fireactions-runners
runner_label:
description: Fireactions benchmark label
required: true
sweep_id:
description: Sweep identifier
required: true
rep:
description: Repetition number
required: true
bench_job_key:
description: Job selector (artifacts-fast-runtime, artifacts-non-fast-runtime, docker)
required: true
default: artifacts-fast-runtime
run-name: bench-docker-localnet | ${{ github.event.inputs.sweep_id }} | ${{ github.event.inputs.bench_job_key }} | ${{ github.event.inputs.runner_label }} | rep-${{ github.event.inputs.rep }}
concurrency:
group: bench-docker-localnet-${{ github.event.inputs.sweep_id }}-${{ github.event.inputs.bench_job_key }}-${{ github.event.inputs.runner_label }}-rep-${{ github.event.inputs.rep }}
cancel-in-progress: false
permissions:
contents: read
actions: read
packages: read
jobs:
setup:

Check failure on line 36 in .github/workflows/bench-fireactions-docker-localnet-dryrun.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/bench-fireactions-docker-localnet-dryrun.yml

Invalid workflow file

You have an error in your yaml syntax on line 36
runs-on: [self-hosted, ${{ github.event.inputs.runner_label }}]
outputs:
ref: ${{ steps.vars.outputs.ref }}
tag: ${{ steps.vars.outputs.tag }}
steps:
- id: vars
run: |
echo "ref=${{ github.event.inputs.ref }}" >> "$GITHUB_OUTPUT"
echo "tag=dryrun-${{ github.run_id }}" >> "$GITHUB_OUTPUT"
artifacts:
name: Node • ${{ matrix.runtime }} • amd64
needs: setup
if: ${{ github.event.inputs.bench_job_key == 'docker' || github.event.inputs.bench_job_key == matrix.key }}
strategy:
fail-fast: false
matrix:
include:
- runtime: fast-runtime
key: artifacts-fast-runtime
- runtime: non-fast-runtime
key: artifacts-non-fast-runtime
runs-on: [self-hosted, ${{ github.event.inputs.runner_label }}]
timeout-minutes: 120
env:
CARGO_BUILD_JOBS: 6
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.ref }}
- name: Dependency gate
run: |
set -euo pipefail
for cmd in docker clang pkg-config protoc; do
command -v "$cmd"
done
pkg-config --exists openssl
pkg-config --exists libudev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.88.0
- run: rustup target add x86_64-unknown-linux-gnu
- name: Patch limits for local run
run: |
chmod +x ./scripts/localnet_patch.sh
./scripts/localnet_patch.sh
- name: Build binaries
run: |
export PATH="$HOME/.cargo/bin:$PATH"
export CARGO_BUILD_TARGET="x86_64-unknown-linux-gnu"
if [ "${{ matrix.runtime }}" = "fast-runtime" ]; then
./scripts/localnet.sh --build-only
else
./scripts/localnet.sh False --build-only
fi
- name: Prepare artifacts for upload
run: |
RUNTIME="${{ matrix.runtime }}"
TRIPLE="x86_64-unknown-linux-gnu"
mkdir -p build/ci_target/${RUNTIME}/${TRIPLE}/release/
cp -v target/${RUNTIME}/${TRIPLE}/release/node-subtensor build/ci_target/${RUNTIME}/${TRIPLE}/release/
mkdir -p build/ci_target/${RUNTIME}/${TRIPLE}/release/wbuild/node-subtensor-runtime/
cp -v target/${RUNTIME}/${TRIPLE}/release/wbuild/node-subtensor-runtime/node_subtensor_runtime.compact.compressed.wasm build/ci_target/${RUNTIME}/${TRIPLE}/release/wbuild/node-subtensor-runtime/
- uses: actions/upload-artifact@v4
with:
name: dryrun-binaries-x86_64-unknown-linux-gnu-${{ matrix.runtime }}
path: build/
if-no-files-found: error
docker:
if: ${{ github.event.inputs.bench_job_key == 'docker' }}
needs: [setup, artifacts]
runs-on: [self-hosted, ${{ github.event.inputs.runner_label }}]
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.ref }}
- uses: actions/download-artifact@v5
with:
pattern: dryrun-binaries-*
path: build/
merge-multiple: true
- name: Dependency gate
run: |
set -euo pipefail
command -v docker
docker version
- uses: docker/setup-buildx-action@v3
with:
driver: docker
- uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-localnet
build-args: |
BUILT_IN_CI="Boom shakalaka"
push: false
load: false
platforms: linux/amd64
tags: ghcr.io/${{ github.repository }}-localnet:${{ needs.setup.outputs.tag }}