-
Notifications
You must be signed in to change notification settings - Fork 164
38 lines (32 loc) · 1.42 KB
/
check-devnet.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
name: Devnet Deploy Check
on:
pull_request:
branches: [devnet, devnet-ready]
types: [labeled, unlabeled, synchronize]
env:
CARGO_TERM_COLOR: always
jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }}
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Install substrate-spec-version
run: cargo install substrate-spec-version
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"