-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #523 from opentensor/spiigot/liquid_alpha
Spiigot/liquid alpha
- Loading branch information
Showing
79 changed files
with
7,541 additions
and
3,951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
name: CI | ||
name: Check Rust | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }} | ||
group: check-rust-${{ 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, devnet-ready, devnet, testnet, finney] | ||
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: | ||
|
@@ -50,7 +56,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y build-essential | ||
|
@@ -65,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: | ||
|
@@ -92,7 +97,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -111,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: | ||
|
@@ -141,7 +194,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -190,7 +243,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -239,7 +292,7 @@ jobs: | |
TARGET: ${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
@@ -273,7 +326,7 @@ jobs: | |
check-feature-propagation: | ||
name: zepter run check | ||
runs-on: ubuntu-22.04 | ||
runs-on: SubtensorCI | ||
|
||
steps: | ||
- name: Install stable Rust | ||
|
@@ -286,7 +339,7 @@ jobs: | |
run: cargo install --locked -q zepter && zepter --version | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Dont clone historic commits. | ||
|
||
|
@@ -295,51 +348,45 @@ jobs: | |
|
||
check-finney-migrations: | ||
name: check finney migrations | ||
runs-on: ubuntu-22.04 | ||
runs-on: SubtensorCI | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Try Runtime Checks | ||
uses: "paritytech/[email protected]" | ||
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 --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@v4 | ||
# | ||
# - 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@v4 | ||
# | ||
# - 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,7 @@ specs/*.json | |
*.orig | ||
|
||
# VSCode configuration | ||
.vscode | ||
.vscode | ||
|
||
# IntelliJ IDEA configuration | ||
.idea |
Empty file.
Oops, something went wrong.