Skip to content

Commit

Permalink
Merge pull request #492 from opentensor/testnet_290524
Browse files Browse the repository at this point in the history
Testnet 290524
  • Loading branch information
distributedstatemachine authored May 29, 2024
2 parents 037d7cc + 86b7f6d commit 41f9d25
Show file tree
Hide file tree
Showing 79 changed files with 7,677 additions and 4,428 deletions.
131 changes: 86 additions & 45 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
name: Check Rust

concurrency:
group: ci-${{ github.ref }}
group: check-rust-${{ github.ref }}
cancel-in-progress: true

on:
Expand Down Expand Up @@ -71,8 +71,7 @@ jobs:
- name: cargo fmt
run: cargo fmt --check --all

# runs cargo clippy --workspace --all-targets --all-features
cargo-clippy:
cargo-clippy-default-features:
name: cargo clippy
runs-on: SubtensorCI
strategy:
Expand Down Expand Up @@ -117,8 +116,56 @@ jobs:
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

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

cargo-clippy-all-features:
name: cargo clippy --all-features
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
RUSTV: ${{ matrix.rust-branch }}
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

- 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, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/[email protected]
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
cargo-test:
Expand Down Expand Up @@ -279,7 +326,7 @@ jobs:
check-feature-propagation:
name: zepter run check
runs-on: ubuntu-22.04
runs-on: SubtensorCI

steps:
- name: Install stable Rust
Expand All @@ -301,7 +348,7 @@ jobs:

check-finney-migrations:
name: check finney migrations
runs-on: ubuntu-22.04
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -312,40 +359,34 @@ jobs:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"

# ----
# We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
# which time all future migrations should be idempotent and won't start failing after the
# upgrade is deployed.
# ----
# check-devnet-migrations:
# name: check devnet migrations
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
#
# - name: Run Try Runtime Checks
# uses: "paritytech/[email protected]"
# with:
# runtime-package: "node-subtensor-runtime"
# node-uri: "wss://dev.chain.opentensor.ai:443"
# checks: "pre-and-post"
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
#
# check-testnet-migrations:
# name: check testnet migrations
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
#
# - name: Run Try Runtime Checks
# uses: "paritytech/[email protected]"
# with:
# runtime-package: "node-subtensor-runtime"
# node-uri: "wss://test.chain.opentensor.ai:443"
# checks: "pre-and-post"
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
#
extra-args: "--disable-spec-version-check --no-weight-warnings"

check-devnet-migrations:
name: check devnet migrations
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/[email protected]"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://dev.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"

check-testnet-migrations:
name: check testnet migrations
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/[email protected]"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://test.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"
84 changes: 84 additions & 0 deletions .github/workflows/e2e-bittensor-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: E2E Bittensor Tests

concurrency:
group: e2e-bittensor-${{ github.ref }}
cancel-in-progress: true

on:
## Run automatically for all PRs against main, regardless of what the changes are
## to be safe and so we can more easily force re-run the CI when github is being
## weird by using a blank commit
push:
branches: [main, development, staging]

##
# Run automatically for PRs against default/main branch if Rust files change
pull_request:
branches: [main, development, staging]

## Allow running workflow manually from the Actions tab
workflow_dispatch:
inputs:
verbose:
description: "Output more information when triggered manually"
required: false
default: ""

env:
CARGO_TERM_COLOR: always
VERBOSE: ${{ github.events.input.verbose }}

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

- 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

- name: Setup bittensor repo
working-directory: ${{ github.workspace }}/bittensor
run: |
git checkout staging
python3 -m pip install -e .
python3 -m pip install torch
- name: Run tests
working-directory: ${{ github.workspace }}/bittensor
run: |
pwd
ls
LOCALNET_SH_PATH="../scripts/localnet.sh" pytest tests/e2e_tests/ -s
102 changes: 0 additions & 102 deletions .github/workflows/publish-tag.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ specs/*.json
*.orig

# VSCode configuration
.vscode
.vscode

# IntelliJ IDEA configuration
.idea
Empty file added CITATION.cft
Empty file.
Loading

0 comments on commit 41f9d25

Please sign in to comment.