Skip to content

Commit 09c146b

Browse files
Merge pull request #585 from opentensor/devnet
Testnet 260624
2 parents 54d186c + abe7a8a commit 09c146b

File tree

103 files changed

+112493
-259158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+112493
-259158
lines changed

.cargo-husky/hooks/prepare-commit-msg

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/check-devnet.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Devnet Deploy Check
2+
3+
on:
4+
pull_request:
5+
branches: [devnet]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
check-spec-version:
12+
name: Check spec_version bump
13+
runs-on: SubtensorCI
14+
steps:
15+
- name: Dependencies
16+
run: |
17+
sudo apt-get update &&
18+
sudo apt-get install -y curl clang curl libssl-dev llvm \
19+
libudev-dev protobuf-compiler
20+
21+
- name: Set up Rust Toolchain
22+
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
23+
24+
- name: Install substrate-spec-version
25+
run: cargo install substrate-spec-version
26+
27+
- name: Check-out repository under $GITHUB_WORKSPACE
28+
uses: actions/checkout@v4
29+
30+
- name: Check that spec_version has been bumped
31+
run: |
32+
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n')
33+
echo "network spec_version: $spec_version"
34+
: ${spec_version:?bad spec version}
35+
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
36+
echo "local spec_version: $local_spec_version"
37+
echo "network spec_version: $spec_version"
38+
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
39+
echo "$local_spec_version > $spec_version ✅"
40+
41+
check-devnet-migrations:
42+
name: check devnet migrations
43+
runs-on: ubuntu-22.04
44+
steps:
45+
- name: Checkout sources
46+
uses: actions/checkout@v3
47+
48+
- name: Run Try Runtime Checks
49+
uses: "paritytech/[email protected]"
50+
with:
51+
runtime-package: "node-subtensor-runtime"
52+
node-uri: "wss://dev.chain.opentensor.ai:443"
53+
checks: "pre-and-post"
54+
extra-args: "--disable-spec-version-check --no-weight-warnings"

.github/workflows/check-finney.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Finney Deploy Check
2+
3+
on:
4+
pull_request:
5+
branches: [finney, main]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
check-spec-version:
12+
name: Check spec_version bump
13+
runs-on: SubtensorCI
14+
steps:
15+
- name: Dependencies
16+
run: |
17+
sudo apt-get update &&
18+
sudo apt-get install -y curl clang curl libssl-dev llvm \
19+
libudev-dev protobuf-compiler
20+
21+
- name: Set up Rust Toolchain
22+
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
23+
24+
- name: Install substrate-spec-version
25+
run: cargo install substrate-spec-version
26+
27+
- name: Check-out repository under $GITHUB_WORKSPACE
28+
uses: actions/checkout@v4
29+
30+
- name: Check that spec_version has been bumped
31+
run: |
32+
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')
33+
echo "network spec_version: $spec_version"
34+
: ${spec_version:?bad spec version}
35+
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
36+
echo "local spec_version: $local_spec_version"
37+
echo "network spec_version: $spec_version"
38+
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
39+
echo "$local_spec_version > $spec_version ✅"
40+
41+
check-finney-migrations:
42+
name: check finney migrations
43+
runs-on: SubtensorCI
44+
steps:
45+
- name: Checkout sources
46+
uses: actions/checkout@v4
47+
- name: Run Try Runtime Checks
48+
uses: "paritytech/[email protected]"
49+
with:
50+
runtime-package: "node-subtensor-runtime"
51+
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
52+
checks: "pre-and-post"
53+
extra-args: "--disable-spec-version-check --no-weight-warnings"

.github/workflows/check-rust.yml

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,10 @@ concurrency:
55
cancel-in-progress: true
66

77
on:
8-
## Run automatically for all PRs against main, regardless of what the changes are
9-
## to be safe and so we can more easily force re-run the CI when github is being
10-
## weird by using a blank commit
118
push:
12-
branches: [main, development, staging]
9+
branches: [main, devnet-ready, devnet, testnet, finney]
1310

14-
##
15-
# Run automatically for PRs against default/main branch if Rust files change
1611
pull_request:
17-
branches: [main, development, staging]
1812

1913
## Allow running workflow manually from the Actions tab
2014
workflow_dispatch:
@@ -56,7 +50,7 @@ jobs:
5650
TARGET: ${{ matrix.rust-target }}
5751
steps:
5852
- name: Check-out repository under $GITHUB_WORKSPACE
59-
uses: actions/checkout@v2
53+
uses: actions/checkout@v4
6054

6155
- name: Install dependencies
6256
run: sudo apt-get update && sudo apt-get install -y build-essential
@@ -77,7 +71,7 @@ jobs:
7771
strategy:
7872
matrix:
7973
rust-branch:
80-
- nightly-2024-03-05
74+
- stable
8175
rust-target:
8276
- x86_64-unknown-linux-gnu
8377
# - x86_64-apple-darwin
@@ -97,7 +91,7 @@ jobs:
9791
TARGET: ${{ matrix.rust-target }}
9892
steps:
9993
- name: Check-out repository under $GITHUB_WORKSPACE
100-
uses: actions/checkout@v2
94+
uses: actions/checkout@v4
10195

10296
- name: Install dependencies
10397
run: |
@@ -125,7 +119,7 @@ jobs:
125119
strategy:
126120
matrix:
127121
rust-branch:
128-
- nightly-2024-03-05
122+
- stable
129123
rust-target:
130124
- x86_64-unknown-linux-gnu
131125
# - x86_64-apple-darwin
@@ -166,15 +160,14 @@ jobs:
166160

167161
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
168162
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
169-
170163
# runs cargo test --workspace
171164
cargo-test:
172165
name: cargo test
173166
runs-on: SubtensorCI
174167
strategy:
175168
matrix:
176169
rust-branch:
177-
- nightly-2024-03-05
170+
- stable
178171
rust-target:
179172
- x86_64-unknown-linux-gnu
180173
# - x86_64-apple-darwin
@@ -194,7 +187,7 @@ jobs:
194187
TARGET: ${{ matrix.rust-target }}
195188
steps:
196189
- name: Check-out repository under $GITHUB_WORKSPACE
197-
uses: actions/checkout@v2
190+
uses: actions/checkout@v4
198191

199192
- name: Install dependencies
200193
run: |
@@ -223,7 +216,7 @@ jobs:
223216
strategy:
224217
matrix:
225218
rust-branch:
226-
- nightly-2024-03-05
219+
- stable
227220
rust-target:
228221
- x86_64-unknown-linux-gnu
229222
# - x86_64-apple-darwin
@@ -243,7 +236,7 @@ jobs:
243236
TARGET: ${{ matrix.rust-target }}
244237
steps:
245238
- name: Check-out repository under $GITHUB_WORKSPACE
246-
uses: actions/checkout@v2
239+
uses: actions/checkout@v4
247240

248241
- name: Install dependencies
249242
run: |
@@ -272,7 +265,7 @@ jobs:
272265
strategy:
273266
matrix:
274267
rust-branch:
275-
- nightly-2024-03-05
268+
- stable
276269
rust-target:
277270
- x86_64-unknown-linux-gnu
278271
# - x86_64-apple-darwin
@@ -292,7 +285,7 @@ jobs:
292285
TARGET: ${{ matrix.rust-target }}
293286
steps:
294287
- name: Check-out repository under $GITHUB_WORKSPACE
295-
uses: actions/checkout@v2
288+
uses: actions/checkout@v4
296289

297290
- name: Install dependencies
298291
run: |
@@ -339,54 +332,13 @@ jobs:
339332
run: cargo install --locked -q zepter && zepter --version
340333

341334
- name: Checkout
342-
uses: actions/checkout@v3
335+
uses: actions/checkout@v4
343336
with:
344337
fetch-depth: 0 # Dont clone historic commits.
345338

346339
- name: Check features
347340
run: zepter run check
348341

349-
check-finney-migrations:
350-
name: check finney migrations
351-
runs-on: SubtensorCI
352-
steps:
353-
- name: Checkout sources
354-
uses: actions/checkout@v3
355342

356-
- name: Run Try Runtime Checks
357-
uses: "paritytech/[email protected]"
358-
with:
359-
runtime-package: "node-subtensor-runtime"
360-
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
361-
checks: "pre-and-post"
362-
extra-args: "--disable-spec-version-check --no-weight-warnings"
363-
364-
check-devnet-migrations:
365-
name: check devnet migrations
366-
runs-on: ubuntu-22.04
367-
steps:
368-
- name: Checkout sources
369-
uses: actions/checkout@v3
370343

371-
- name: Run Try Runtime Checks
372-
uses: "paritytech/[email protected]"
373-
with:
374-
runtime-package: "node-subtensor-runtime"
375-
node-uri: "wss://dev.chain.opentensor.ai:443"
376-
checks: "pre-and-post"
377-
extra-args: "--disable-spec-version-check --no-weight-warnings"
378-
379-
check-testnet-migrations:
380-
name: check testnet migrations
381-
runs-on: ubuntu-22.04
382-
steps:
383-
- name: Checkout sources
384-
uses: actions/checkout@v3
385344

386-
- name: Run Try Runtime Checks
387-
uses: "paritytech/[email protected]"
388-
with:
389-
runtime-package: "node-subtensor-runtime"
390-
node-uri: "wss://test.chain.opentensor.ai:443"
391-
checks: "pre-and-post"
392-
extra-args: "--disable-spec-version-check --no-weight-warnings"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Testnet Deploy Check
2+
3+
on:
4+
pull_request:
5+
branches: [testnet]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
check-spec-version:
12+
name: Check spec_version bump
13+
runs-on: SubtensorCI
14+
steps:
15+
- name: Dependencies
16+
run: |
17+
sudo apt-get update &&
18+
sudo apt-get install -y curl clang curl libssl-dev llvm \
19+
libudev-dev protobuf-compiler
20+
21+
- name: Set up Rust Toolchain
22+
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
23+
24+
- name: Install substrate-spec-version
25+
run: cargo install substrate-spec-version
26+
27+
- name: Check-out repository under $GITHUB_WORKSPACE
28+
uses: actions/checkout@v4
29+
30+
- name: Check that spec_version has been bumped
31+
run: |
32+
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.finney.opentensor.ai:443 | tr -d '\n')
33+
echo "network spec_version: $spec_version"
34+
: ${spec_version:?bad spec version}
35+
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
36+
echo "local spec_version: $local_spec_version"
37+
echo "network spec_version: $spec_version"
38+
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
39+
echo "$local_spec_version > $spec_version ✅"
40+
41+
check-testnet-migrations:
42+
name: check testnet migrations
43+
runs-on: ubuntu-22.04
44+
steps:
45+
- name: Checkout sources
46+
uses: actions/checkout@v3
47+
48+
- name: Run Try Runtime Checks
49+
uses: "paritytech/[email protected]"
50+
with:
51+
runtime-package: "node-subtensor-runtime"
52+
node-uri: "wss://test.chain.opentensor.ai:443"
53+
checks: "pre-and-post"
54+
extra-args: "--disable-spec-version-check --no-weight-warnings"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Tested on Devnet
2+
on:
3+
pull_request:
4+
types: [opened, labeled, unlabeled, synchronize]
5+
branches: [main]
6+
jobs:
7+
check-labels:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
steps:
13+
- uses: mheap/github-action-required-labels@v5
14+
with:
15+
mode: minimum
16+
count: 1
17+
labels: |
18+
devnet-pass
19+
devnet-skip
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: devnet-companion Label Check
2+
on:
3+
pull_request:
4+
types: [opened, labeled, unlabeled, synchronize]
5+
branches: [devnet-ready]
6+
jobs:
7+
check-labels:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
steps:
13+
- uses: mheap/github-action-required-labels@v5
14+
with:
15+
mode: minimum
16+
count: 1
17+
labels: devnet-companion

0 commit comments

Comments
 (0)