Skip to content

Commit 0c601d1

Browse files
committed
Merge branch 'devnet-ready' into chore/remove-peers-count-subtensor-sh
2 parents 6b1b1db + 61cddb6 commit 0c601d1

File tree

170 files changed

+24898
-12788
lines changed

Some content is hidden

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

170 files changed

+24898
-12788
lines changed

.github/workflows/benchmark-weights.yml

Whitespace-only changes.

.github/workflows/cargo-audit.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
- labeled
66
- unlabeled
77
- synchronize
8+
- opened
89
concurrency:
910
group: cargo-audit-${{ github.ref }}
1011
cancel-in-progress: true
@@ -23,11 +24,25 @@ jobs:
2324
sudo apt-get update &&
2425
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
2526
27+
- name: Utilize Shared Rust Cache
28+
uses: Swatinem/rust-cache@v2
29+
with:
30+
key: "cargo-audit"
31+
2632
- name: Install cargo-audit
27-
run: cargo install --version 0.20.1 --force cargo-audit
33+
run: cargo install --force cargo-audit
2834

2935
- name: Display cargo-audit --version
3036
run: cargo audit --version
3137

3238
- name: cargo audit
33-
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this
39+
run: |
40+
cargo audit --ignore RUSTSEC-2024-0336 \
41+
--ignore RUSTSEC-2021-0127 \
42+
--ignore RUSTSEC-2024-0370 \
43+
--ignore RUSTSEC-2022-0080 \
44+
--ignore RUSTSEC-2022-0061 \
45+
--ignore RUSTSEC-2020-0168 \
46+
--ignore RUSTSEC-2024-0384 \
47+
--ignore RUSTSEC-2024-0388 \
48+
--ignore RUSTSEC-2024-0421

.github/workflows/check-devnet.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Devnet Deploy Check
33
on:
44
pull_request:
55
branches: [devnet, devnet-ready]
6-
types: [labeled, unlabeled, synchronize]
6+
types: [labeled, unlabeled, synchronize, opened]
77

88
env:
99
CARGO_TERM_COLOR: always
@@ -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

+9-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Finney Deploy Check
33
on:
44
pull_request:
55
branches: [finney, main]
6-
types: [labeled, unlabeled, synchronize]
6+
types: [labeled, unlabeled, synchronize, opened]
77

88
env:
99
CARGO_TERM_COLOR: always
@@ -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

+22-132
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ concurrency:
55
cancel-in-progress: true
66

77
on:
8-
push:
9-
branches: [main, devnet-ready, devnet, testnet, finney]
10-
118
pull_request:
129

1310
## Allow running workflow manually from the Actions tab
@@ -27,25 +24,8 @@ jobs:
2724
cargo-fmt:
2825
name: cargo fmt
2926
runs-on: SubtensorCI
30-
strategy:
31-
matrix:
32-
rust-branch:
33-
- nightly-2024-03-05
34-
rust-target:
35-
- x86_64-unknown-linux-gnu
36-
# - x86_64-apple-darwin
37-
os:
38-
- ubuntu-latest
39-
# - macos-latest
40-
include:
41-
- os: ubuntu-latest
42-
# - os: macos-latest
4327
env:
44-
RELEASE_NAME: development
45-
# RUSTFLAGS: -A warnings
4628
RUST_BACKTRACE: full
47-
SKIP_WASM_BUILD: 1
48-
TARGET: ${{ matrix.rust-target }}
4929
steps:
5030
- name: Check-out repository under $GITHUB_WORKSPACE
5131
uses: actions/checkout@v4
@@ -54,38 +34,22 @@ jobs:
5434
run: sudo apt-get update && sudo apt-get install -y build-essential
5535

5636
- name: Install Rust Nightly
57-
uses: actions-rs/toolchain@v1.0.6
58-
with:
59-
toolchain: nightly
60-
components: rustfmt
61-
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
6243

6344
- name: cargo fmt
64-
run: cargo fmt --check --all
45+
run: cargo +nightly fmt --check --all
6546

6647
cargo-clippy-default-features:
6748
name: cargo clippy
6849
runs-on: SubtensorCI
69-
strategy:
70-
matrix:
71-
rust-branch:
72-
- stable
73-
rust-target:
74-
- x86_64-unknown-linux-gnu
75-
# - x86_64-apple-darwin
76-
os:
77-
- ubuntu-latest
78-
# - macos-latest
79-
include:
80-
- os: ubuntu-latest
81-
# - os: macos-latest
8250
env:
83-
RELEASE_NAME: development
84-
# RUSTFLAGS: -A warnings
8551
RUST_BACKTRACE: full
8652
SKIP_WASM_BUILD: 1
87-
TARGET: ${{ matrix.rust-target }}
88-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
8953
steps:
9054
- name: Check-out repository under $GITHUB_WORKSPACE
9155
uses: actions/checkout@v4
@@ -96,33 +60,18 @@ jobs:
9660
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
9761
9862
- name: Utilize Shared Rust Cache
99-
uses: Swatinem/rust-cache@v2.2.1
100-
with:
101-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
63+
uses: Swatinem/rust-cache@v2
10264

10365
- name: cargo clippy --workspace --all-targets -- -D warnings
10466
run: cargo clippy --workspace --all-targets -- -D warnings
10567

10668
cargo-check-lints:
10769
name: check custom lints
10870
runs-on: SubtensorCI
109-
strategy:
110-
matrix:
111-
rust-branch:
112-
- stable
113-
rust-target:
114-
- x86_64-unknown-linux-gnu
115-
# - x86_64-apple-darwin
116-
os:
117-
- ubuntu-latest
118-
# - macos-latest
11971
env:
120-
RELEASE_NAME: development
12172
RUSTFLAGS: -D warnings
12273
RUST_BACKTRACE: full
12374
SKIP_WASM_BUILD: 1
124-
TARGET: ${{ matrix.rust-target }}
125-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
12675
steps:
12776
- name: Check-out repository under $GITHUB_WORKSPACE
12877
uses: actions/checkout@v4
@@ -132,17 +81,8 @@ jobs:
13281
sudo apt-get update &&
13382
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
13483
135-
- name: Install Rust ${{ matrix.rust-branch }}
136-
uses: actions-rs/toolchain@v1.0.6
137-
with:
138-
toolchain: ${{ matrix.rust-branch }}
139-
components: rustfmt, clippy
140-
profile: minimal
141-
14284
- name: Utilize Shared Rust Cache
143-
uses: Swatinem/rust-cache@v2.2.1
144-
with:
145-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
85+
uses: Swatinem/rust-cache@v2
14686

14787
- name: check lints
14888
run: |
@@ -153,63 +93,31 @@ jobs:
15393
cargo-clippy-all-features:
15494
name: cargo clippy --all-features
15595
runs-on: SubtensorCI
156-
strategy:
157-
matrix:
158-
rust-target:
159-
- x86_64-unknown-linux-gnu
160-
# - x86_64-apple-darwin
161-
os:
162-
- ubuntu-latest
163-
# - macos-latest
164-
include:
165-
- os: ubuntu-latest
166-
# - os: macos-latest
16796
env:
168-
RELEASE_NAME: development
169-
# RUSTFLAGS: -A warnings
17097
RUST_BACKTRACE: full
171-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
17298
SKIP_WASM_BUILD: 1
173-
TARGET: ${{ matrix.rust-target }}
17499
steps:
175100
- name: Check-out repository under $GITHUB_WORKSPACE
176-
uses: actions/checkout@v2
101+
uses: actions/checkout@v4
177102

178103
- name: Install dependencies
179104
run: |
180105
sudo apt-get update &&
181106
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
182107
183108
- name: Utilize Shared Rust Cache
184-
uses: Swatinem/rust-cache@v2.2.1
185-
with:
186-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
109+
uses: Swatinem/rust-cache@v2
187110

188111
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
189112
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
190113

191-
# runs cargo test --workspace
114+
# runs cargo test --workspace --all-features
192115
cargo-test:
193116
name: cargo test
194117
runs-on: SubtensorCI
195-
strategy:
196-
matrix:
197-
rust-target:
198-
- x86_64-unknown-linux-gnu
199-
# - x86_64-apple-darwin
200-
os:
201-
- ubuntu-latest
202-
# - macos-latest
203-
include:
204-
- os: ubuntu-latest
205-
# - os: macos-latest
206118
env:
207-
RELEASE_NAME: development
208-
# RUSTFLAGS: -A warnings
209119
RUST_BACKTRACE: full
210-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
211120
SKIP_WASM_BUILD: 1
212-
TARGET: ${{ matrix.rust-target }}
213121
steps:
214122
- name: Check-out repository under $GITHUB_WORKSPACE
215123
uses: actions/checkout@v4
@@ -219,10 +127,8 @@ jobs:
219127
sudo apt-get update &&
220128
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
221129
222-
- name: Utilize Rust shared cached
223-
uses: Swatinem/rust-cache@v2.2.1
224-
with:
225-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
130+
- name: Utilize Shared Rust Cache
131+
uses: Swatinem/rust-cache@v2
226132

227133
- name: cargo test --workspace --all-features
228134
run: cargo test --workspace --all-features
@@ -231,26 +137,9 @@ jobs:
231137
cargo-fix:
232138
name: cargo fix
233139
runs-on: SubtensorCI
234-
strategy:
235-
matrix:
236-
rust-branch:
237-
- stable
238-
rust-target:
239-
- x86_64-unknown-linux-gnu
240-
# - x86_64-apple-darwin
241-
os:
242-
- ubuntu-latest
243-
# - macos-latest
244-
include:
245-
- os: ubuntu-latest
246-
# - os: macos-latest
247140
env:
248-
RELEASE_NAME: development
249-
# RUSTFLAGS: -A warnings
250141
RUST_BACKTRACE: full
251-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
252142
SKIP_WASM_BUILD: 1
253-
TARGET: ${{ matrix.rust-target }}
254143
steps:
255144
- name: Check-out repository under $GITHUB_WORKSPACE
256145
uses: actions/checkout@v4
@@ -260,10 +149,8 @@ jobs:
260149
sudo apt-get update &&
261150
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
262151
263-
- name: Utilize Rust shared cached
264-
uses: Swatinem/rust-cache@v2.2.1
265-
with:
266-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
152+
- name: Utilize Shared Rust Cache
153+
uses: Swatinem/rust-cache@v2
267154

268155
- name: cargo fix --workspace
269156
run: |
@@ -283,13 +170,16 @@ jobs:
283170
runs-on: SubtensorCI
284171

285172
steps:
286-
- name: Install Zepter
287-
run: cargo install --locked -q zepter && zepter --version
288-
289173
- name: Checkout
290174
uses: actions/checkout@v4
291175
with:
292176
fetch-depth: 0 # Dont clone historic commits.
293177

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+
294184
- name: Check features
295185
run: zepter run check

0 commit comments

Comments
 (0)