Skip to content

Commit

Permalink
Merge pull request #585 from opentensor/devnet
Browse files Browse the repository at this point in the history
Testnet 260624
  • Loading branch information
distributedstatemachine committed Jun 26, 2024
2 parents 54d186c + abe7a8a commit 09c146b
Show file tree
Hide file tree
Showing 103 changed files with 112,493 additions and 259,158 deletions.
18 changes: 0 additions & 18 deletions .cargo-husky/hooks/prepare-commit-msg

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Devnet Deploy Check

on:
pull_request:
branches: [devnet]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

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

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

- 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')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"
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/try-runtime-gha@v0.1.0"
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"
53 changes: 53 additions & 0 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Finney Deploy Check

on:
pull_request:
branches: [finney, main]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

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

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

- 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')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"
check-finney-migrations:
name: check finney migrations
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
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"
72 changes: 12 additions & 60 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ concurrency:
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]
branches: [main, devnet-ready, devnet, testnet, finney]

##
# 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:
Expand Down Expand Up @@ -56,7 +50,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential
Expand All @@ -77,7 +71,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -97,7 +91,7 @@ jobs:
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 Down Expand Up @@ -125,7 +119,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand Down Expand Up @@ -166,15 +160,14 @@ jobs:

- 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:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -194,7 +187,7 @@ jobs:
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 Down Expand Up @@ -223,7 +216,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -243,7 +236,7 @@ jobs:
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 Down Expand Up @@ -272,7 +265,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -292,7 +285,7 @@ jobs:
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 Down Expand Up @@ -339,54 +332,13 @@ jobs:
run: cargo install --locked -q zepter && zepter --version

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

- name: Check features
run: zepter run check

check-finney-migrations:
name: check finney migrations
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
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"

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/try-runtime-gha@v0.1.0"
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/try-runtime-gha@v0.1.0"
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"
54 changes: 54 additions & 0 deletions .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Testnet Deploy Check

on:
pull_request:
branches: [testnet]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler
- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

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

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

- 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')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"
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/try-runtime-gha@v0.1.0"
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"
19 changes: 19 additions & 0 deletions .github/workflows/devnet-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tested on Devnet
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
branches: [main]
jobs:
check-labels:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: |
devnet-pass
devnet-skip
17 changes: 17 additions & 0 deletions .github/workflows/devnet-ready-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: devnet-companion Label Check
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
branches: [devnet-ready]
jobs:
check-labels:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: devnet-companion
Loading

0 comments on commit 09c146b

Please sign in to comment.