-
Notifications
You must be signed in to change notification settings - Fork 163
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 #1016 from opentensor/testnet
finney deploy 11-25-2025
- Loading branch information
Showing
69 changed files
with
58,350 additions
and
52,273 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: cargo audit | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- unlabeled | ||
- synchronize | ||
concurrency: | ||
group: cargo-audit-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cargo-audit: | ||
name: cargo audit | ||
runs-on: SubtensorCI | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-cargo-audit') }} | ||
steps: | ||
- 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 cargo-audit | ||
run: cargo install --version 0.20.1 --force cargo-audit | ||
|
||
- name: Display cargo-audit --version | ||
run: cargo audit --version | ||
|
||
- name: cargo audit | ||
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this |
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
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
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 |
---|---|---|
|
@@ -43,9 +43,7 @@ jobs: | |
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: | ||
|
@@ -55,10 +53,10 @@ jobs: | |
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y build-essential | ||
|
||
- name: Install Rust ${{ matrix.rust-branch }} | ||
- name: Install Rust Nightly | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: ${{ matrix.rust-branch }} | ||
toolchain: nightly | ||
components: rustfmt | ||
profile: minimal | ||
|
||
|
@@ -84,11 +82,10 @@ jobs: | |
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 }} | ||
RUST_BIN_DIR: target/${{ matrix.rust-target }} | ||
steps: | ||
- name: Check-out repository under $GITHUB_WORKSPACE | ||
uses: actions/checkout@v4 | ||
|
@@ -98,13 +95,6 @@ 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/[email protected] | ||
with: | ||
|
@@ -128,12 +118,11 @@ jobs: | |
# - macos-latest | ||
env: | ||
RELEASE_NAME: development | ||
RUSTV: ${{ matrix.rust-branch }} | ||
RUSTFLAGS: -D warnings | ||
RUST_BACKTRACE: full | ||
RUST_BIN_DIR: target/${{ matrix.rust-target }} | ||
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 | ||
|
@@ -166,8 +155,6 @@ jobs: | |
runs-on: SubtensorCI | ||
strategy: | ||
matrix: | ||
rust-branch: | ||
- stable | ||
rust-target: | ||
- x86_64-unknown-linux-gnu | ||
# - x86_64-apple-darwin | ||
|
@@ -180,7 +167,6 @@ jobs: | |
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 | ||
|
@@ -194,60 +180,20 @@ 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/[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 audit | ||
cargo-audit: | ||
name: cargo audit | ||
runs-on: SubtensorCI | ||
if: ${{ github.event_name != 'push' && !contains(github.event.pull_request.labels.*.name, 'skip-cargo-audit') }} | ||
steps: | ||
- 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 Stable | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
profile: minimal | ||
|
||
- name: Utilize Shared Rust Cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
key: ubuntu-latest-${{ env.RUST_BIN_DIR }} | ||
|
||
- name: Install cargo-audit | ||
run: cargo install cargo-audit | ||
|
||
- 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: | ||
rust-branch: | ||
- stable | ||
rust-target: | ||
- x86_64-unknown-linux-gnu | ||
# - x86_64-apple-darwin | ||
|
@@ -260,7 +206,6 @@ jobs: | |
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 | ||
|
@@ -274,13 +219,6 @@ 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 Rust shared cached | ||
uses: Swatinem/[email protected] | ||
with: | ||
|
@@ -309,7 +247,6 @@ jobs: | |
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 | ||
|
@@ -323,13 +260,6 @@ 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 Rust shared cached | ||
uses: Swatinem/[email protected] | ||
with: | ||
|
@@ -353,12 +283,6 @@ jobs: | |
runs-on: SubtensorCI | ||
|
||
steps: | ||
- name: Install stable Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
|
||
- name: Install Zepter | ||
run: cargo install --locked -q zepter && zepter --version | ||
|
||
|
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
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,62 @@ | ||
name: Handle Hotfix PRs | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
handle-hotfix-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if PR is a hotfix into `main` | ||
if: > | ||
github.event.pull_request.base.ref == 'main' && | ||
github.event.pull_request.head.ref != 'testnet' | ||
run: | | ||
echo "Hotfix PR detected. Proceeding to label and comment." | ||
- name: Add `hotfix` label | ||
if: > | ||
github.event.pull_request.base.ref == 'main' && | ||
github.event.pull_request.head.ref != 'testnet' | ||
run: | | ||
curl -X POST \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \ | ||
-d '{"labels":["hotfix"]}' | ||
- name: Add hotfix bot comment | ||
if: > | ||
github.event.pull_request.base.ref == 'main' && | ||
github.event.pull_request.head.ref != 'testnet' | ||
run: | | ||
COMMENT_BODY=$(cat <<EOF | ||
## 🚨🚨🚨 HOTFIX DETECTED 🚨🚨🚨 | ||
It looks like you are trying to merge a hotfix PR into `main`. If this isn't what you wanted to do, and you just wanted to make a regular PR, please close this PR, base your changes off the `devnet-ready` branch and open a new PR into `devnet ready`. | ||
If you _are_ trying to merge a hotfix PR, please complete the following essential steps: | ||
1. [ ] go ahead and get this PR into \`main\` merged, so we can get the change in as quickly as possible! | ||
2. [ ] merge \`main\` into \`testnet\`, bumping \`spec_version\` | ||
3. [ ] deploy \`testnet\` | ||
4. [ ] merge \`testnet\` into \`devnet\`, bumping \`spec_version\` | ||
5. [ ] deploy \`devnet\` | ||
6. [ ] merge \`devnet\` into \`devnet-ready\` | ||
If you do not complete these steps, your hotfix may be inadvertently removed in the future when branches are promoted to \`main\`, so it is essential that you do so. | ||
EOF | ||
) | ||
curl -X POST \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ | ||
-d "$(jq -n --arg body "$COMMENT_BODY" '{body: $body}')" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
runs-on: SubtensorCI | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Try Runtime Checks | ||
uses: "paritytech/[email protected]" | ||
|
@@ -29,7 +29,7 @@ jobs: | |
runs-on: SubtensorCI | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Try Runtime Checks | ||
uses: "paritytech/[email protected]" | ||
|
Oops, something went wrong.