-
Notifications
You must be signed in to change notification settings - Fork 157
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 #914 from opentensor/testnet
finney deploy 11/5/2024
- Loading branch information
Showing
151 changed files
with
27,374 additions
and
4,281 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Devnet Deploy Check | |
on: | ||
pull_request: | ||
branches: [devnet, devnet-ready] | ||
types: [labeled, unlabeled, synchronize] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
@@ -38,18 +39,3 @@ jobs: | |
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/[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" |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Finney Deploy Check | |
on: | ||
pull_request: | ||
branches: [finney, main] | ||
types: [labeled, unlabeled, synchronize] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
@@ -30,25 +31,11 @@ jobs: | |
|
||
- name: Check that spec_version has been bumped | ||
run: | | ||
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version ${{ vars.NUCLEUS_ARCHIVE_NODE }} | tr -d '\n') | ||
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/[email protected]" | ||
with: | ||
runtime-package: "node-subtensor-runtime" | ||
node-uri: ${{ vars.NUCLEUS_ARCHIVE_NODE }} | ||
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 |
---|---|---|
|
@@ -157,9 +157,9 @@ jobs: | |
|
||
- name: check lints | ||
run: | | ||
set -o pipefail # Ensure the pipeline fails if any command in the pipeline fails | ||
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | tee /dev/tty | grep -q "^warning:" && \ | ||
(echo "Build emitted the following warnings:" >&2 && exit 1) || echo "No warnings found." | ||
set -o pipefail | ||
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | grep "warning:" && exit 1 | ||
echo "No warnings found." | ||
cargo-clippy-all-features: | ||
name: cargo clippy --all-features | ||
|
@@ -208,58 +208,41 @@ 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 cargo audit | ||
cargo-audit: | ||
name: cargo audit | ||
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 | ||
RUSTV: ${{ matrix.rust-branch }} | ||
RUST_BACKTRACE: full | ||
RUST_BIN_DIR: target/${{ matrix.rust-target }} | ||
SKIP_WASM_BUILD: 1 | ||
TARGET: ${{ matrix.rust-target }} | ||
if: ${{ github.event_name != 'push' && !contains(github.event.pull_request.labels.*.name, 'skip-cargo-audit') }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
- name: Check-out repositoroy under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
|
||
- 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 }} | ||
- name: Install Rust Stable | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: ${{ matrix.rust-branch }} | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
profile: minimal | ||
|
||
- name: Utilize Rust shared cached | ||
- name: Utilize Shared Rust Cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }} | ||
key: ubuntu-latest-${{ env.RUST_BIN_DIR }} | ||
|
||
- name: cargo test --workspace | ||
run: cargo test --workspace | ||
- name: Install cargo-audit | ||
run: cargo install cargo-audit | ||
|
||
# runs cargo test --workspace --features=runtime-benchmarks | ||
cargo-test-benchmarks: | ||
name: cargo test w/benchmarks | ||
- name: cargo audit | ||
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this | ||
|
||
# runs cargo test --workspace | ||
cargo-test: | ||
name: cargo test | ||
runs-on: SubtensorCI | ||
strategy: | ||
matrix: | ||
|
@@ -303,8 +286,8 @@ jobs: | |
with: | ||
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }} | ||
|
||
- name: cargo test --workspace --features=runtime-benchmarks | ||
run: cargo test --workspace --features=runtime-benchmarks | ||
- name: cargo test --workspace --all-features | ||
run: cargo test --workspace --all-features | ||
|
||
# ensures cargo fix has no trivial changes that can be applied | ||
cargo-fix: | ||
|
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Testnet Deploy Check | |
on: | ||
pull_request: | ||
branches: [testnet, testnet-ready] | ||
types: [labeled, unlabeled, synchronize] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
@@ -38,18 +39,3 @@ jobs: | |
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/[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,54 @@ | ||
name: Try Runtime | ||
|
||
on: | ||
pull_request: | ||
branches: [main, devnet-ready, devnet, testnet, finney] | ||
types: [labeled, unlabeled, synchronize] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check-devnet: | ||
name: check devnet | ||
runs-on: SubtensorCI | ||
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: "all" | ||
extra-args: "--disable-spec-version-check --no-weight-warnings" | ||
|
||
check-testnet: | ||
name: check testnet | ||
runs-on: SubtensorCI | ||
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: "all" | ||
extra-args: "--disable-spec-version-check --no-weight-warnings" | ||
|
||
check-finney: | ||
name: check finney | ||
runs-on: SubtensorCI | ||
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://archive.chain.opentensor.ai:443" | ||
checks: "all" | ||
extra-args: "--disable-spec-version-check --no-weight-warnings" |
Oops, something went wrong.