Skip to content

Commit

Permalink
Merge branch 'devnet-ready' into utility-pallet-fees
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnReedV committed Feb 19, 2025
2 parents cd90326 + b76d155 commit 53154e4
Show file tree
Hide file tree
Showing 19 changed files with 611 additions and 350 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "cargo-audit"

- name: Install cargo-audit
run: cargo install --force cargo-audit

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "spec-version"

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n')
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "spec-version"

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')
Expand Down
141 changes: 17 additions & 124 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,8 @@ jobs:
cargo-fmt:
name: cargo fmt
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUST_BACKTRACE: full
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -51,38 +34,22 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y build-essential

- name: Install Rust Nightly
uses: actions-rs/[email protected]
with:
toolchain: nightly
components: rustfmt
profile: minimal
run: |
rustup install nightly
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2

- name: cargo fmt
run: cargo fmt --check --all
run: cargo +nightly fmt --check --all

cargo-clippy-default-features:
name: cargo clippy
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUST_BACKTRACE: full
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
RUST_BIN_DIR: target/${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -94,32 +61,17 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo clippy --workspace --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings

cargo-check-lints:
name: check custom lints
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
env:
RELEASE_NAME: development
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
RUST_BIN_DIR: target/${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -129,17 +81,8 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: check lints
run: |
Expand All @@ -150,27 +93,12 @@ jobs:
cargo-clippy-all-features:
name: cargo clippy --all-features
runs-on: SubtensorCI
strategy:
matrix:
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -179,34 +107,17 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

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

# runs cargo test --workspace
# runs cargo test --workspace --all-features
cargo-test:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -216,10 +127,8 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Utilize Rust shared cached
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo test --workspace --all-features
run: cargo test --workspace --all-features
Expand All @@ -228,26 +137,9 @@ jobs:
cargo-fix:
name: cargo fix
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -257,10 +149,8 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Utilize Rust shared cached
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo fix --workspace
run: |
Expand All @@ -280,13 +170,16 @@ jobs:
runs-on: SubtensorCI

steps:
- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Dont clone historic commits.

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2

- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version

- name: Check features
run: zepter run check
11 changes: 8 additions & 3 deletions .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "spec-version"

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.finney.opentensor.ai:443 | tr -d '\n')
Expand Down
29 changes: 4 additions & 25 deletions .github/workflows/e2e-bittensor-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,20 @@ env:
jobs:
run:
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2

- name: Install dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt
profile: minimal

- name: Clone bittensor repo
run: git clone https://github.com/opentensor/bittensor.git

Expand Down
Loading

0 comments on commit 53154e4

Please sign in to comment.