Skip to content

Commit e6683ab

Browse files
authored
Merge pull request #914 from opentensor/testnet
finney deploy 11/5/2024
2 parents aa521f4 + 21c3b41 commit e6683ab

File tree

151 files changed

+27374
-4281
lines changed

Some content is hidden

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

151 files changed

+27374
-4281
lines changed

.github/workflows/check-devnet.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Devnet Deploy Check
33
on:
44
pull_request:
55
branches: [devnet, devnet-ready]
6+
types: [labeled, unlabeled, synchronize]
67

78
env:
89
CARGO_TERM_COLOR: always
@@ -38,18 +39,3 @@ jobs:
3839
echo "network spec_version: $spec_version"
3940
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
4041
echo "$local_spec_version > $spec_version ✅"
41-
42-
check-devnet-migrations:
43-
name: check devnet migrations
44-
runs-on: ubuntu-22.04
45-
steps:
46-
- name: Checkout sources
47-
uses: actions/checkout@v3
48-
49-
- name: Run Try Runtime Checks
50-
uses: "paritytech/try-runtime-gha@v0.1.0"
51-
with:
52-
runtime-package: "node-subtensor-runtime"
53-
node-uri: "wss://dev.chain.opentensor.ai:443"
54-
checks: "pre-and-post"
55-
extra-args: "--disable-spec-version-check --no-weight-warnings"

.github/workflows/check-finney.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Finney Deploy Check
33
on:
44
pull_request:
55
branches: [finney, main]
6+
types: [labeled, unlabeled, synchronize]
67

78
env:
89
CARGO_TERM_COLOR: always
@@ -30,25 +31,11 @@ jobs:
3031

3132
- name: Check that spec_version has been bumped
3233
run: |
33-
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version ${{ vars.NUCLEUS_ARCHIVE_NODE }} | tr -d '\n')
34+
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')
3435
echo "network spec_version: $spec_version"
3536
: ${spec_version:?bad spec version}
3637
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
3738
echo "local spec_version: $local_spec_version"
3839
echo "network spec_version: $spec_version"
3940
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
4041
echo "$local_spec_version > $spec_version ✅"
41-
42-
check-finney-migrations:
43-
name: check finney migrations
44-
runs-on: SubtensorCI
45-
steps:
46-
- name: Checkout sources
47-
uses: actions/checkout@v4
48-
- name: Run Try Runtime Checks
49-
uses: "paritytech/try-runtime-gha@v0.1.0"
50-
with:
51-
runtime-package: "node-subtensor-runtime"
52-
node-uri: ${{ vars.NUCLEUS_ARCHIVE_NODE }}
53-
checks: "pre-and-post"
54-
extra-args: "--disable-spec-version-check --no-weight-warnings"

.github/workflows/check-rust.yml

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ jobs:
157157

158158
- name: check lints
159159
run: |
160-
set -o pipefail # Ensure the pipeline fails if any command in the pipeline fails
161-
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | tee /dev/tty | grep -q "^warning:" && \
162-
(echo "Build emitted the following warnings:" >&2 && exit 1) || echo "No warnings found."
160+
set -o pipefail
161+
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | grep "warning:" && exit 1
162+
echo "No warnings found."
163163
164164
cargo-clippy-all-features:
165165
name: cargo clippy --all-features
@@ -208,58 +208,41 @@ jobs:
208208

209209
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
210210
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
211-
# runs cargo test --workspace
212-
cargo-test:
213-
name: cargo test
211+
# runs cargo audit
212+
cargo-audit:
213+
name: cargo audit
214214
runs-on: SubtensorCI
215-
strategy:
216-
matrix:
217-
rust-branch:
218-
- stable
219-
rust-target:
220-
- x86_64-unknown-linux-gnu
221-
# - x86_64-apple-darwin
222-
os:
223-
- ubuntu-latest
224-
# - macos-latest
225-
include:
226-
- os: ubuntu-latest
227-
# - os: macos-latest
228-
env:
229-
RELEASE_NAME: development
230-
# RUSTFLAGS: -A warnings
231-
RUSTV: ${{ matrix.rust-branch }}
232-
RUST_BACKTRACE: full
233-
RUST_BIN_DIR: target/${{ matrix.rust-target }}
234-
SKIP_WASM_BUILD: 1
235-
TARGET: ${{ matrix.rust-target }}
215+
if: ${{ github.event_name != 'push' && !contains(github.event.pull_request.labels.*.name, 'skip-cargo-audit') }}
236216
steps:
237-
- name: Check-out repository under $GITHUB_WORKSPACE
217+
- name: Check-out repositoroy under $GITHUB_WORKSPACE
238218
uses: actions/checkout@v4
239219

240220
- name: Install dependencies
241221
run: |
242222
sudo apt-get update &&
243223
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
244224
245-
- name: Install Rust ${{ matrix.rust-branch }}
225+
- name: Install Rust Stable
246226
uses: actions-rs/toolchain@v1.0.6
247227
with:
248-
toolchain: ${{ matrix.rust-branch }}
228+
toolchain: stable
249229
components: rustfmt, clippy
250230
profile: minimal
251231

252-
- name: Utilize Rust shared cached
232+
- name: Utilize Shared Rust Cache
253233
uses: Swatinem/rust-cache@v2.2.1
254234
with:
255-
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
235+
key: ubuntu-latest-${{ env.RUST_BIN_DIR }}
256236

257-
- name: cargo test --workspace
258-
run: cargo test --workspace
237+
- name: Install cargo-audit
238+
run: cargo install cargo-audit
259239

260-
# runs cargo test --workspace --features=runtime-benchmarks
261-
cargo-test-benchmarks:
262-
name: cargo test w/benchmarks
240+
- name: cargo audit
241+
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this
242+
243+
# runs cargo test --workspace
244+
cargo-test:
245+
name: cargo test
263246
runs-on: SubtensorCI
264247
strategy:
265248
matrix:
@@ -303,8 +286,8 @@ jobs:
303286
with:
304287
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
305288

306-
- name: cargo test --workspace --features=runtime-benchmarks
307-
run: cargo test --workspace --features=runtime-benchmarks
289+
- name: cargo test --workspace --all-features
290+
run: cargo test --workspace --all-features
308291

309292
# ensures cargo fix has no trivial changes that can be applied
310293
cargo-fix:

.github/workflows/check-testnet.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Testnet Deploy Check
33
on:
44
pull_request:
55
branches: [testnet, testnet-ready]
6+
types: [labeled, unlabeled, synchronize]
67

78
env:
89
CARGO_TERM_COLOR: always
@@ -38,18 +39,3 @@ jobs:
3839
echo "network spec_version: $spec_version"
3940
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
4041
echo "$local_spec_version > $spec_version ✅"
41-
42-
check-testnet-migrations:
43-
name: check testnet migrations
44-
runs-on: ubuntu-22.04
45-
steps:
46-
- name: Checkout sources
47-
uses: actions/checkout@v3
48-
49-
- name: Run Try Runtime Checks
50-
uses: "paritytech/try-runtime-gha@v0.1.0"
51-
with:
52-
runtime-package: "node-subtensor-runtime"
53-
node-uri: "wss://test.chain.opentensor.ai:443"
54-
checks: "pre-and-post"
55-
extra-args: "--disable-spec-version-check --no-weight-warnings"

.github/workflows/try-runtime.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Try Runtime
2+
3+
on:
4+
pull_request:
5+
branches: [main, devnet-ready, devnet, testnet, finney]
6+
types: [labeled, unlabeled, synchronize]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
check-devnet:
13+
name: check devnet
14+
runs-on: SubtensorCI
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v3
18+
19+
- name: Run Try Runtime Checks
20+
uses: "paritytech/try-runtime-gha@v0.1.0"
21+
with:
22+
runtime-package: "node-subtensor-runtime"
23+
node-uri: "wss://dev.chain.opentensor.ai:443"
24+
checks: "all"
25+
extra-args: "--disable-spec-version-check --no-weight-warnings"
26+
27+
check-testnet:
28+
name: check testnet
29+
runs-on: SubtensorCI
30+
steps:
31+
- name: Checkout sources
32+
uses: actions/checkout@v3
33+
34+
- name: Run Try Runtime Checks
35+
uses: "paritytech/try-runtime-gha@v0.1.0"
36+
with:
37+
runtime-package: "node-subtensor-runtime"
38+
node-uri: "wss://test.chain.opentensor.ai:443"
39+
checks: "all"
40+
extra-args: "--disable-spec-version-check --no-weight-warnings"
41+
42+
check-finney:
43+
name: check finney
44+
runs-on: SubtensorCI
45+
steps:
46+
- name: Checkout sources
47+
uses: actions/checkout@v4
48+
- name: Run Try Runtime Checks
49+
uses: "paritytech/try-runtime-gha@v0.1.0"
50+
with:
51+
runtime-package: "node-subtensor-runtime"
52+
node-uri: "wss://archive.chain.opentensor.ai:443"
53+
checks: "all"
54+
extra-args: "--disable-spec-version-check --no-weight-warnings"

0 commit comments

Comments
 (0)