Skip to content

Commit 3955bd7

Browse files
authored
Merge pull request #1324 from opentensor/devnet
testnet deploy 2/19/2025
2 parents f083c8b + a9689ae commit 3955bd7

33 files changed

+1549
-2769
lines changed

.github/workflows/cargo-audit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
sudo apt-get update &&
2525
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
2626
27+
- name: Utilize Shared Rust Cache
28+
uses: Swatinem/rust-cache@v2
29+
with:
30+
key: "cargo-audit"
31+
2732
- name: Install cargo-audit
2833
run: cargo install --force cargo-audit
2934

.github/workflows/check-devnet.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ jobs:
2020
sudo apt-get install -y curl clang curl libssl-dev llvm \
2121
libudev-dev protobuf-compiler
2222
23-
- name: Install substrate-spec-version
24-
run: cargo install substrate-spec-version
25-
2623
- name: Check-out repository under $GITHUB_WORKSPACE
2724
uses: actions/checkout@v4
2825

26+
- name: Utilize Shared Rust Cache
27+
uses: Swatinem/rust-cache@v2
28+
with:
29+
key: "spec-version"
30+
31+
- name: Install substrate-spec-version
32+
run: cargo install substrate-spec-version
33+
2934
- name: Check that spec_version has been bumped
3035
run: |
3136
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n')

.github/workflows/check-finney.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ jobs:
2020
sudo apt-get install -y curl clang curl libssl-dev llvm \
2121
libudev-dev protobuf-compiler
2222
23-
- name: Install substrate-spec-version
24-
run: cargo install substrate-spec-version
25-
2623
- name: Check-out repository under $GITHUB_WORKSPACE
2724
uses: actions/checkout@v4
2825

26+
- name: Utilize Shared Rust Cache
27+
uses: Swatinem/rust-cache@v2
28+
with:
29+
key: "spec-version"
30+
31+
- name: Install substrate-spec-version
32+
run: cargo install substrate-spec-version
33+
2934
- name: Check that spec_version has been bumped
3035
run: |
3136
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')

.github/workflows/check-rust.yml

Lines changed: 22 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,8 @@ jobs:
2424
cargo-fmt:
2525
name: cargo fmt
2626
runs-on: SubtensorCI
27-
strategy:
28-
matrix:
29-
rust-branch:
30-
- nightly-2024-03-05
31-
rust-target:
32-
- x86_64-unknown-linux-gnu
33-
# - x86_64-apple-darwin
34-
os:
35-
- ubuntu-latest
36-
# - macos-latest
37-
include:
38-
- os: ubuntu-latest
39-
# - os: macos-latest
4027
env:
41-
RELEASE_NAME: development
42-
# RUSTFLAGS: -A warnings
4328
RUST_BACKTRACE: full
44-
SKIP_WASM_BUILD: 1
45-
TARGET: ${{ matrix.rust-target }}
4629
steps:
4730
- name: Check-out repository under $GITHUB_WORKSPACE
4831
uses: actions/checkout@v4
@@ -51,38 +34,22 @@ jobs:
5134
run: sudo apt-get update && sudo apt-get install -y build-essential
5235

5336
- name: Install Rust Nightly
54-
uses: actions-rs/[email protected]
55-
with:
56-
toolchain: nightly
57-
components: rustfmt
58-
profile: minimal
37+
run: |
38+
rustup install nightly
39+
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
40+
41+
- name: Utilize Shared Rust Cache
42+
uses: Swatinem/rust-cache@v2
5943

6044
- name: cargo fmt
61-
run: cargo fmt --check --all
45+
run: cargo +nightly fmt --check --all
6246

6347
cargo-clippy-default-features:
6448
name: cargo clippy
6549
runs-on: SubtensorCI
66-
strategy:
67-
matrix:
68-
rust-branch:
69-
- stable
70-
rust-target:
71-
- x86_64-unknown-linux-gnu
72-
# - x86_64-apple-darwin
73-
os:
74-
- ubuntu-latest
75-
# - macos-latest
76-
include:
77-
- os: ubuntu-latest
78-
# - os: macos-latest
7950
env:
80-
RELEASE_NAME: development
81-
# RUSTFLAGS: -A warnings
8251
RUST_BACKTRACE: full
8352
SKIP_WASM_BUILD: 1
84-
TARGET: ${{ matrix.rust-target }}
85-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
8653
steps:
8754
- name: Check-out repository under $GITHUB_WORKSPACE
8855
uses: actions/checkout@v4
@@ -93,33 +60,18 @@ jobs:
9360
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
9461
9562
- name: Utilize Shared Rust Cache
96-
uses: Swatinem/[email protected]
97-
with:
98-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
63+
uses: Swatinem/rust-cache@v2
9964

10065
- name: cargo clippy --workspace --all-targets -- -D warnings
10166
run: cargo clippy --workspace --all-targets -- -D warnings
10267

10368
cargo-check-lints:
10469
name: check custom lints
10570
runs-on: SubtensorCI
106-
strategy:
107-
matrix:
108-
rust-branch:
109-
- stable
110-
rust-target:
111-
- x86_64-unknown-linux-gnu
112-
# - x86_64-apple-darwin
113-
os:
114-
- ubuntu-latest
115-
# - macos-latest
11671
env:
117-
RELEASE_NAME: development
11872
RUSTFLAGS: -D warnings
11973
RUST_BACKTRACE: full
12074
SKIP_WASM_BUILD: 1
121-
TARGET: ${{ matrix.rust-target }}
122-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
12375
steps:
12476
- name: Check-out repository under $GITHUB_WORKSPACE
12577
uses: actions/checkout@v4
@@ -129,17 +81,8 @@ jobs:
12981
sudo apt-get update &&
13082
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
13183
132-
- name: Install Rust ${{ matrix.rust-branch }}
133-
uses: actions-rs/[email protected]
134-
with:
135-
toolchain: ${{ matrix.rust-branch }}
136-
components: rustfmt, clippy
137-
profile: minimal
138-
13984
- name: Utilize Shared Rust Cache
140-
uses: Swatinem/[email protected]
141-
with:
142-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
85+
uses: Swatinem/rust-cache@v2
14386

14487
- name: check lints
14588
run: |
@@ -150,63 +93,31 @@ jobs:
15093
cargo-clippy-all-features:
15194
name: cargo clippy --all-features
15295
runs-on: SubtensorCI
153-
strategy:
154-
matrix:
155-
rust-target:
156-
- x86_64-unknown-linux-gnu
157-
# - x86_64-apple-darwin
158-
os:
159-
- ubuntu-latest
160-
# - macos-latest
161-
include:
162-
- os: ubuntu-latest
163-
# - os: macos-latest
16496
env:
165-
RELEASE_NAME: development
166-
# RUSTFLAGS: -A warnings
16797
RUST_BACKTRACE: full
168-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
16998
SKIP_WASM_BUILD: 1
170-
TARGET: ${{ matrix.rust-target }}
17199
steps:
172100
- name: Check-out repository under $GITHUB_WORKSPACE
173-
uses: actions/checkout@v2
101+
uses: actions/checkout@v4
174102

175103
- name: Install dependencies
176104
run: |
177105
sudo apt-get update &&
178106
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
179107
180108
- name: Utilize Shared Rust Cache
181-
uses: Swatinem/[email protected]
182-
with:
183-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
109+
uses: Swatinem/rust-cache@v2
184110

185111
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
186112
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
187113

188-
# runs cargo test --workspace
114+
# runs cargo test --workspace --all-features
189115
cargo-test:
190116
name: cargo test
191117
runs-on: SubtensorCI
192-
strategy:
193-
matrix:
194-
rust-target:
195-
- x86_64-unknown-linux-gnu
196-
# - x86_64-apple-darwin
197-
os:
198-
- ubuntu-latest
199-
# - macos-latest
200-
include:
201-
- os: ubuntu-latest
202-
# - os: macos-latest
203118
env:
204-
RELEASE_NAME: development
205-
# RUSTFLAGS: -A warnings
206119
RUST_BACKTRACE: full
207-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
208120
SKIP_WASM_BUILD: 1
209-
TARGET: ${{ matrix.rust-target }}
210121
steps:
211122
- name: Check-out repository under $GITHUB_WORKSPACE
212123
uses: actions/checkout@v4
@@ -216,10 +127,8 @@ jobs:
216127
sudo apt-get update &&
217128
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
218129
219-
- name: Utilize Rust shared cached
220-
uses: Swatinem/[email protected]
221-
with:
222-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
130+
- name: Utilize Shared Rust Cache
131+
uses: Swatinem/rust-cache@v2
223132

224133
- name: cargo test --workspace --all-features
225134
run: cargo test --workspace --all-features
@@ -228,26 +137,9 @@ jobs:
228137
cargo-fix:
229138
name: cargo fix
230139
runs-on: SubtensorCI
231-
strategy:
232-
matrix:
233-
rust-branch:
234-
- stable
235-
rust-target:
236-
- x86_64-unknown-linux-gnu
237-
# - x86_64-apple-darwin
238-
os:
239-
- ubuntu-latest
240-
# - macos-latest
241-
include:
242-
- os: ubuntu-latest
243-
# - os: macos-latest
244140
env:
245-
RELEASE_NAME: development
246-
# RUSTFLAGS: -A warnings
247141
RUST_BACKTRACE: full
248-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
249142
SKIP_WASM_BUILD: 1
250-
TARGET: ${{ matrix.rust-target }}
251143
steps:
252144
- name: Check-out repository under $GITHUB_WORKSPACE
253145
uses: actions/checkout@v4
@@ -257,10 +149,8 @@ jobs:
257149
sudo apt-get update &&
258150
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
259151
260-
- name: Utilize Rust shared cached
261-
uses: Swatinem/[email protected]
262-
with:
263-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
152+
- name: Utilize Shared Rust Cache
153+
uses: Swatinem/rust-cache@v2
264154

265155
- name: cargo fix --workspace
266156
run: |
@@ -280,13 +170,16 @@ jobs:
280170
runs-on: SubtensorCI
281171

282172
steps:
283-
- name: Install Zepter
284-
run: cargo install --locked -q zepter && zepter --version
285-
286173
- name: Checkout
287174
uses: actions/checkout@v4
288175
with:
289176
fetch-depth: 0 # Dont clone historic commits.
290177

178+
- name: Utilize Shared Rust Cache
179+
uses: Swatinem/rust-cache@v2
180+
181+
- name: Install Zepter
182+
run: cargo install --locked -q zepter && zepter --version
183+
291184
- name: Check features
292185
run: zepter run check

.github/workflows/check-testnet.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ jobs:
2020
sudo apt-get install -y curl clang curl libssl-dev llvm \
2121
libudev-dev protobuf-compiler
2222
23-
- name: Install substrate-spec-version
24-
run: cargo install substrate-spec-version
25-
2623
- name: Check-out repository under $GITHUB_WORKSPACE
2724
uses: actions/checkout@v4
2825

26+
- name: Utilize Shared Rust Cache
27+
uses: Swatinem/rust-cache@v2
28+
with:
29+
key: "spec-version"
30+
31+
- name: Install substrate-spec-version
32+
run: cargo install substrate-spec-version
33+
2934
- name: Check that spec_version has been bumped
3035
run: |
3136
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.finney.opentensor.ai:443 | tr -d '\n')

.github/workflows/e2e-bittensor-tests.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,20 @@ env:
2222
jobs:
2323
run:
2424
runs-on: SubtensorCI
25-
strategy:
26-
matrix:
27-
rust-branch:
28-
- nightly-2024-03-05
29-
rust-target:
30-
- x86_64-unknown-linux-gnu
31-
# - x86_64-apple-darwin
32-
os:
33-
- ubuntu-latest
34-
# - macos-latest
35-
include:
36-
- os: ubuntu-latest
37-
# - os: macos-latest
3825
env:
39-
RELEASE_NAME: development
40-
RUSTV: ${{ matrix.rust-branch }}
4126
RUST_BACKTRACE: full
42-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
43-
TARGET: ${{ matrix.rust-target }}
4427
steps:
4528
- name: Check-out repository under $GITHUB_WORKSPACE
46-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
30+
31+
- name: Utilize Shared Rust Cache
32+
uses: Swatinem/rust-cache@v2
4733

4834
- name: Install dependencies
4935
run: |
5036
sudo apt-get update &&
5137
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
5238
53-
- name: Install Rust ${{ matrix.rust-branch }}
54-
uses: actions-rs/[email protected]
55-
with:
56-
toolchain: ${{ matrix.rust-branch }}
57-
components: rustfmt
58-
profile: minimal
59-
6039
- name: Clone bittensor repo
6140
run: git clone https://github.com/opentensor/bittensor.git
6241

0 commit comments

Comments
 (0)