Skip to content

Commit 703bdbd

Browse files
Merge pull request #519 from opentensor/finney_deployment_11062024
Finney deployment 11062024
2 parents 0c77062 + b82a57e commit 703bdbd

Some content is hidden

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

75 files changed

+7352
-3926
lines changed

Diff for: .github/workflows/check-rust.yml

+134-45
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: CI
1+
name: Check Rust
22

33
concurrency:
4-
group: ci-${{ github.ref }}
4+
group: check-rust-${{ github.ref }}
55
cancel-in-progress: true
66

77
on:
@@ -65,8 +65,7 @@ jobs:
6565
- name: cargo fmt
6666
run: cargo fmt --check --all
6767

68-
# runs cargo clippy --workspace --all-targets --all-features
69-
cargo-clippy:
68+
cargo-clippy-default-features:
7069
name: cargo clippy
7170
runs-on: SubtensorCI
7271
strategy:
@@ -111,8 +110,104 @@ jobs:
111110
with:
112111
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
113112

114-
- name: cargo clippy --workspace --all-targets --all-features
115-
run: cargo clippy --workspace --all-targets --all-features
113+
- name: cargo clippy --workspace --all-targets -- -D warnings
114+
run: cargo clippy --workspace --all-targets -- -D warnings
115+
116+
cargo-clippy-all-features:
117+
name: cargo clippy --all-features
118+
runs-on: SubtensorCI
119+
strategy:
120+
matrix:
121+
rust-branch:
122+
- nightly-2024-03-05
123+
rust-target:
124+
- x86_64-unknown-linux-gnu
125+
# - x86_64-apple-darwin
126+
os:
127+
- ubuntu-latest
128+
# - macos-latest
129+
include:
130+
- os: ubuntu-latest
131+
# - os: macos-latest
132+
env:
133+
RELEASE_NAME: development
134+
# RUSTFLAGS: -A warnings
135+
RUSTV: ${{ matrix.rust-branch }}
136+
RUST_BACKTRACE: full
137+
RUST_BIN_DIR: target/${{ matrix.rust-target }}
138+
SKIP_WASM_BUILD: 1
139+
TARGET: ${{ matrix.rust-target }}
140+
steps:
141+
- name: Check-out repository under $GITHUB_WORKSPACE
142+
uses: actions/checkout@v2
143+
144+
- name: Install dependencies
145+
run: |
146+
sudo apt-get update &&
147+
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
148+
149+
- name: Install Rust ${{ matrix.rust-branch }}
150+
uses: actions-rs/toolchain@v1.0.6
151+
with:
152+
toolchain: ${{ matrix.rust-branch }}
153+
components: rustfmt, clippy
154+
profile: minimal
155+
156+
- name: Utilize Shared Rust Cache
157+
uses: Swatinem/rust-cache@v2.2.1
158+
with:
159+
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
160+
161+
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
162+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
163+
164+
cargo-clippy-all-features:
165+
name: cargo clippy --all-features
166+
runs-on: SubtensorCI
167+
strategy:
168+
matrix:
169+
rust-branch:
170+
- nightly-2024-03-05
171+
rust-target:
172+
- x86_64-unknown-linux-gnu
173+
# - x86_64-apple-darwin
174+
os:
175+
- ubuntu-latest
176+
# - macos-latest
177+
include:
178+
- os: ubuntu-latest
179+
# - os: macos-latest
180+
env:
181+
RELEASE_NAME: development
182+
# RUSTFLAGS: -A warnings
183+
RUSTV: ${{ matrix.rust-branch }}
184+
RUST_BACKTRACE: full
185+
RUST_BIN_DIR: target/${{ matrix.rust-target }}
186+
SKIP_WASM_BUILD: 1
187+
TARGET: ${{ matrix.rust-target }}
188+
steps:
189+
- name: Check-out repository under $GITHUB_WORKSPACE
190+
uses: actions/checkout@v2
191+
192+
- name: Install dependencies
193+
run: |
194+
sudo apt-get update &&
195+
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
196+
197+
- name: Install Rust ${{ matrix.rust-branch }}
198+
uses: actions-rs/toolchain@v1.0.6
199+
with:
200+
toolchain: ${{ matrix.rust-branch }}
201+
components: rustfmt, clippy
202+
profile: minimal
203+
204+
- name: Utilize Shared Rust Cache
205+
uses: Swatinem/rust-cache@v2.2.1
206+
with:
207+
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
208+
209+
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
210+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
116211

117212
# runs cargo test --workspace
118213
cargo-test:
@@ -273,7 +368,7 @@ jobs:
273368
274369
check-feature-propagation:
275370
name: zepter run check
276-
runs-on: ubuntu-22.04
371+
runs-on: SubtensorCI
277372

278373
steps:
279374
- name: Install stable Rust
@@ -295,7 +390,7 @@ jobs:
295390

296391
check-finney-migrations:
297392
name: check finney migrations
298-
runs-on: ubuntu-22.04
393+
runs-on: SubtensorCI
299394
steps:
300395
- name: Checkout sources
301396
uses: actions/checkout@v4
@@ -306,40 +401,34 @@ jobs:
306401
runtime-package: "node-subtensor-runtime"
307402
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
308403
checks: "pre-and-post"
309-
extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
310-
311-
# ----
312-
# We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
313-
# which time all future migrations should be idempotent and won't start failing after the
314-
# upgrade is deployed.
315-
# ----
316-
# check-devnet-migrations:
317-
# name: check devnet migrations
318-
# runs-on: ubuntu-22.04
319-
# steps:
320-
# - name: Checkout sources
321-
# uses: actions/checkout@v4
322-
#
323-
# - name: Run Try Runtime Checks
324-
# uses: "paritytech/try-runtime-gha@v0.1.0"
325-
# with:
326-
# runtime-package: "node-subtensor-runtime"
327-
# node-uri: "wss://dev.chain.opentensor.ai:443"
328-
# checks: "pre-and-post"
329-
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
330-
#
331-
# check-testnet-migrations:
332-
# name: check testnet migrations
333-
# runs-on: ubuntu-22.04
334-
# steps:
335-
# - name: Checkout sources
336-
# uses: actions/checkout@v4
337-
#
338-
# - name: Run Try Runtime Checks
339-
# uses: "paritytech/try-runtime-gha@v0.1.0"
340-
# with:
341-
# runtime-package: "node-subtensor-runtime"
342-
# node-uri: "wss://test.chain.opentensor.ai:443"
343-
# checks: "pre-and-post"
344-
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
345-
#
404+
extra-args: "--disable-spec-version-check --no-weight-warnings"
405+
406+
check-devnet-migrations:
407+
name: check devnet migrations
408+
runs-on: ubuntu-22.04
409+
steps:
410+
- name: Checkout sources
411+
uses: actions/checkout@v3
412+
413+
- name: Run Try Runtime Checks
414+
uses: "paritytech/try-runtime-gha@v0.1.0"
415+
with:
416+
runtime-package: "node-subtensor-runtime"
417+
node-uri: "wss://dev.chain.opentensor.ai:443"
418+
checks: "pre-and-post"
419+
extra-args: "--disable-spec-version-check --no-weight-warnings"
420+
421+
check-testnet-migrations:
422+
name: check testnet migrations
423+
runs-on: ubuntu-22.04
424+
steps:
425+
- name: Checkout sources
426+
uses: actions/checkout@v3
427+
428+
- name: Run Try Runtime Checks
429+
uses: "paritytech/try-runtime-gha@v0.1.0"
430+
with:
431+
runtime-package: "node-subtensor-runtime"
432+
node-uri: "wss://test.chain.opentensor.ai:443"
433+
checks: "pre-and-post"
434+
extra-args: "--disable-spec-version-check --no-weight-warnings"

Diff for: .github/workflows/e2e-bittensor-tests.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: E2E Bittensor Tests
2+
3+
concurrency:
4+
group: e2e-bittensor-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
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
11+
push:
12+
branches: [main, development, staging]
13+
14+
##
15+
# Run automatically for PRs against default/main branch if Rust files change
16+
pull_request:
17+
branches: [main, development, staging]
18+
19+
## Allow running workflow manually from the Actions tab
20+
workflow_dispatch:
21+
inputs:
22+
verbose:
23+
description: "Output more information when triggered manually"
24+
required: false
25+
default: ""
26+
27+
env:
28+
CARGO_TERM_COLOR: always
29+
VERBOSE: ${{ github.events.input.verbose }}
30+
31+
jobs:
32+
run:
33+
runs-on: SubtensorCI
34+
strategy:
35+
matrix:
36+
rust-branch:
37+
- nightly-2024-03-05
38+
rust-target:
39+
- x86_64-unknown-linux-gnu
40+
# - x86_64-apple-darwin
41+
os:
42+
- ubuntu-latest
43+
# - macos-latest
44+
include:
45+
- os: ubuntu-latest
46+
# - os: macos-latest
47+
env:
48+
RELEASE_NAME: development
49+
RUSTV: ${{ matrix.rust-branch }}
50+
RUST_BACKTRACE: full
51+
RUST_BIN_DIR: target/${{ matrix.rust-target }}
52+
TARGET: ${{ matrix.rust-target }}
53+
steps:
54+
- name: Check-out repository under $GITHUB_WORKSPACE
55+
uses: actions/checkout@v2
56+
57+
- name: Install dependencies
58+
run: |
59+
sudo apt-get update &&
60+
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
61+
62+
- name: Install Rust ${{ matrix.rust-branch }}
63+
uses: actions-rs/toolchain@v1.0.6
64+
with:
65+
toolchain: ${{ matrix.rust-branch }}
66+
components: rustfmt
67+
profile: minimal
68+
69+
- name: Clone bittensor repo
70+
run: git clone https://github.com/opentensor/bittensor.git
71+
72+
- name: Setup bittensor repo
73+
working-directory: ${{ github.workspace }}/bittensor
74+
run: |
75+
git checkout staging
76+
python3 -m pip install -e .
77+
python3 -m pip install torch
78+
python3 -m pip install pytest
79+
80+
- name: Run tests
81+
working-directory: ${{ github.workspace }}/bittensor
82+
run: |
83+
pwd
84+
ls
85+
LOCALNET_SH_PATH="${{ github.workspace }}/scripts/localnet.sh" pytest tests/e2e_tests/ -s

Diff for: .gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,10 @@ specs/*.json
3434
*.orig
3535

3636
# VSCode configuration
37-
.vscode
37+
.vscode
38+
39+
# IntelliJ IDEA configuration
40+
.idea
41+
42+
# Runtime upgrade snapshot
43+
bt.snap

Diff for: CITATION.cft

Whitespace-only changes.

0 commit comments

Comments
 (0)