Skip to content

Commit 41f9d25

Browse files
Merge pull request #492 from opentensor/testnet_290524
Testnet 290524
2 parents 037d7cc + 86b7f6d commit 41f9d25

Some content is hidden

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

79 files changed

+7677
-4428
lines changed

.github/workflows/check-rust.yml

Lines changed: 86 additions & 45 deletions
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:
@@ -71,8 +71,7 @@ jobs:
7171
- name: cargo fmt
7272
run: cargo fmt --check --all
7373

74-
# runs cargo clippy --workspace --all-targets --all-features
75-
cargo-clippy:
74+
cargo-clippy-default-features:
7675
name: cargo clippy
7776
runs-on: SubtensorCI
7877
strategy:
@@ -117,8 +116,56 @@ jobs:
117116
with:
118117
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
119118

120-
- name: cargo clippy --workspace --all-targets --all-features
121-
run: cargo clippy --workspace --all-targets --all-features
119+
- name: cargo clippy --workspace --all-targets -- -D warnings
120+
run: cargo clippy --workspace --all-targets -- -D warnings
121+
122+
cargo-clippy-all-features:
123+
name: cargo clippy --all-features
124+
runs-on: SubtensorCI
125+
strategy:
126+
matrix:
127+
rust-branch:
128+
- nightly-2024-03-05
129+
rust-target:
130+
- x86_64-unknown-linux-gnu
131+
# - x86_64-apple-darwin
132+
os:
133+
- ubuntu-latest
134+
# - macos-latest
135+
include:
136+
- os: ubuntu-latest
137+
# - os: macos-latest
138+
env:
139+
RELEASE_NAME: development
140+
# RUSTFLAGS: -A warnings
141+
RUSTV: ${{ matrix.rust-branch }}
142+
RUST_BACKTRACE: full
143+
RUST_BIN_DIR: target/${{ matrix.rust-target }}
144+
SKIP_WASM_BUILD: 1
145+
TARGET: ${{ matrix.rust-target }}
146+
steps:
147+
- name: Check-out repository under $GITHUB_WORKSPACE
148+
uses: actions/checkout@v2
149+
150+
- name: Install dependencies
151+
run: |
152+
sudo apt-get update &&
153+
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
154+
155+
- name: Install Rust ${{ matrix.rust-branch }}
156+
uses: actions-rs/[email protected]
157+
with:
158+
toolchain: ${{ matrix.rust-branch }}
159+
components: rustfmt, clippy
160+
profile: minimal
161+
162+
- name: Utilize Shared Rust Cache
163+
uses: Swatinem/[email protected]
164+
with:
165+
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
166+
167+
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
168+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
122169

123170
# runs cargo test --workspace
124171
cargo-test:
@@ -279,7 +326,7 @@ jobs:
279326
280327
check-feature-propagation:
281328
name: zepter run check
282-
runs-on: ubuntu-22.04
329+
runs-on: SubtensorCI
283330

284331
steps:
285332
- name: Install stable Rust
@@ -301,7 +348,7 @@ jobs:
301348

302349
check-finney-migrations:
303350
name: check finney migrations
304-
runs-on: ubuntu-22.04
351+
runs-on: SubtensorCI
305352
steps:
306353
- name: Checkout sources
307354
uses: actions/checkout@v3
@@ -312,40 +359,34 @@ jobs:
312359
runtime-package: "node-subtensor-runtime"
313360
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
314361
checks: "pre-and-post"
315-
extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
316-
317-
# ----
318-
# We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
319-
# which time all future migrations should be idempotent and won't start failing after the
320-
# upgrade is deployed.
321-
# ----
322-
# check-devnet-migrations:
323-
# name: check devnet migrations
324-
# runs-on: ubuntu-22.04
325-
# steps:
326-
# - name: Checkout sources
327-
# uses: actions/checkout@v3
328-
#
329-
# - name: Run Try Runtime Checks
330-
# uses: "paritytech/[email protected]"
331-
# with:
332-
# runtime-package: "node-subtensor-runtime"
333-
# node-uri: "wss://dev.chain.opentensor.ai:443"
334-
# checks: "pre-and-post"
335-
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
336-
#
337-
# check-testnet-migrations:
338-
# name: check testnet migrations
339-
# runs-on: ubuntu-22.04
340-
# steps:
341-
# - name: Checkout sources
342-
# uses: actions/checkout@v3
343-
#
344-
# - name: Run Try Runtime Checks
345-
# uses: "paritytech/[email protected]"
346-
# with:
347-
# runtime-package: "node-subtensor-runtime"
348-
# node-uri: "wss://test.chain.opentensor.ai:443"
349-
# checks: "pre-and-post"
350-
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
351-
#
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
370+
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
385+
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: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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/[email protected]
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+
79+
- name: Run tests
80+
working-directory: ${{ github.workspace }}/bittensor
81+
run: |
82+
pwd
83+
ls
84+
LOCALNET_SH_PATH="../scripts/localnet.sh" pytest tests/e2e_tests/ -s

.github/workflows/publish-tag.yml

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

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ specs/*.json
3434
*.orig
3535

3636
# VSCode configuration
37-
.vscode
37+
.vscode
38+
39+
# IntelliJ IDEA configuration
40+
.idea

CITATION.cft

Whitespace-only changes.

0 commit comments

Comments
 (0)