Skip to content

Deploy

Deploy #25

Workflow file for this run

name: Deploy
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
network:
type: choice
description: Which network to deploy to
required: true
default: devnet
options:
- devnet
- testnet
- finney
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
deploy:
name: Deploy to ${{ github.event.inputs.network }}
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Install substrate-spec-version
run: cargo install substrate-spec-version
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
- name: Get live spec_version for ${{ github.event.inputs.network }}
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.chain.opentensor.ai:443 | tr -d '\n')
echo "spec_version: $spec_version"
: ${spec_version:?bad spec version}
echo "spec_version=$spec_version" >> $GITHUB_OUTPUT
- name: cargo build --release -p node-subtensor
run: |
cargo build --release -p node-subtensor
ls -lh target/release/node-subtensor