-
Notifications
You must be signed in to change notification settings - Fork 171
56 lines (47 loc) · 1.65 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 jq nodejs clang curl libssl-dev llvm \
libudev-dev protobuf-compiler &&
npm install -g wscat
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
- name: try on its own
run: |
wscat -c wss://test.finney.opentensor.ai:443 -x '{"id":1, "jsonrpc":"2.0", "method": "state_getRuntimeVersion"}' -w 30 --show-ping-pong
- name: Get live spec_version for ${{ github.event.inputs.network }}
run: |
spec_version=$(wscat -c wss://test.finney.opentensor.ai:443 -x '{"id":1, "jsonrpc":"2.0", "method": "state_getRuntimeVersion"}' -w 1 | jq -r '.result.specVersion' | 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: echo "hey" # cargo build --release -p node-subtensor