Skip to content

Commit e79b099

Browse files
authored
Merge pull request #770 from opentensor/testnet
Finney Deployment 280824
2 parents 6a37d4b + 460f175 commit e79b099

File tree

128 files changed

+17515
-13171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+17515
-13171
lines changed

Diff for: .dockerignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.devcontainer
22
.github
33
.vscode
4-
!scripts/init.sh
5-
target
4+
target/
5+
.dockerignore
6+
Dockerfile

Diff for: .github/workflows/benchmark-weights.yml

Whitespace-only changes.

Diff for: .github/workflows/check-devnet.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Devnet Deploy Check
22

33
on:
44
pull_request:
5-
branches: [devnet]
5+
branches: [devnet, devnet-ready]
66

77
env:
88
CARGO_TERM_COLOR: always
@@ -11,6 +11,7 @@ jobs:
1111
check-spec-version:
1212
name: Check spec_version bump
1313
runs-on: SubtensorCI
14+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }}
1415
steps:
1516
- name: Dependencies
1617
run: |
@@ -37,7 +38,7 @@ jobs:
3738
echo "network spec_version: $spec_version"
3839
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
3940
echo "$local_spec_version > $spec_version ✅"
40-
41+
4142
check-devnet-migrations:
4243
name: check devnet migrations
4344
runs-on: ubuntu-22.04
@@ -51,4 +52,4 @@ jobs:
5152
runtime-package: "node-subtensor-runtime"
5253
node-uri: "wss://dev.chain.opentensor.ai:443"
5354
checks: "pre-and-post"
54-
extra-args: "--disable-spec-version-check --no-weight-warnings"
55+
extra-args: "--disable-spec-version-check --no-weight-warnings"

Diff for: .github/workflows/check-finney.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Check that spec_version has been bumped
3232
run: |
33-
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')
33+
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version ${{ secrets.NUCLEUS_ARCHIVE_NODE }} | tr -d '\n')
3434
echo "network spec_version: $spec_version"
3535
: ${spec_version:?bad spec version}
3636
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
@@ -49,6 +49,6 @@ jobs:
4949
uses: "paritytech/try-runtime-gha@v0.1.0"
5050
with:
5151
runtime-package: "node-subtensor-runtime"
52-
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
52+
node-uri: ${{ secrets.NUCLEUS_ARCHIVE_NODE }}
5353
checks: "pre-and-post"
54-
extra-args: "--disable-spec-version-check --no-weight-warnings"
54+
extra-args: "--disable-spec-version-check --no-weight-warnings"

Diff for: .github/workflows/check-rust.yml

+48-4
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,54 @@ jobs:
113113
- name: cargo clippy --workspace --all-targets -- -D warnings
114114
run: cargo clippy --workspace --all-targets -- -D warnings
115115

116+
cargo-check-lints:
117+
name: check custom lints
118+
runs-on: SubtensorCI
119+
strategy:
120+
matrix:
121+
rust-branch:
122+
- stable
123+
rust-target:
124+
- x86_64-unknown-linux-gnu
125+
# - x86_64-apple-darwin
126+
os:
127+
- ubuntu-latest
128+
# - macos-latest
129+
env:
130+
RELEASE_NAME: development
131+
RUSTV: ${{ matrix.rust-branch }}
132+
RUSTFLAGS: -D warnings
133+
RUST_BACKTRACE: full
134+
RUST_BIN_DIR: target/${{ matrix.rust-target }}
135+
SKIP_WASM_BUILD: 1
136+
TARGET: ${{ matrix.rust-target }}
137+
steps:
138+
- name: Check-out repository under $GITHUB_WORKSPACE
139+
uses: actions/checkout@v4
140+
141+
- name: Install dependencies
142+
run: |
143+
sudo apt-get update &&
144+
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
145+
146+
- name: Install Rust ${{ matrix.rust-branch }}
147+
uses: actions-rs/toolchain@v1.0.6
148+
with:
149+
toolchain: ${{ matrix.rust-branch }}
150+
components: rustfmt, clippy
151+
profile: minimal
152+
153+
- name: Utilize Shared Rust Cache
154+
uses: Swatinem/rust-cache@v2.2.1
155+
with:
156+
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
157+
158+
- name: check lints
159+
run: |
160+
set -o pipefail # Ensure the pipeline fails if any command in the pipeline fails
161+
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | tee /dev/tty | grep -q "^warning:" && \
162+
(echo "Build emitted the following warnings:" >&2 && exit 1) || echo "No warnings found."
163+
116164
cargo-clippy-all-features:
117165
name: cargo clippy --all-features
118166
runs-on: SubtensorCI
@@ -338,7 +386,3 @@ jobs:
338386

339387
- name: Check features
340388
run: zepter run check
341-
342-
343-
344-

Diff for: .github/workflows/check-testnet.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Testnet Deploy Check
22

33
on:
44
pull_request:
5-
branches: [testnet]
5+
branches: [testnet, testnet-ready]
66

77
env:
88
CARGO_TERM_COLOR: always
@@ -11,6 +11,7 @@ jobs:
1111
check-spec-version:
1212
name: Check spec_version bump
1313
runs-on: SubtensorCI
14+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }}
1415
steps:
1516
- name: Dependencies
1617
run: |

Diff for: .github/workflows/devnet-labels.yml

-19
This file was deleted.

Diff for: .github/workflows/devnet-ready-labels.yml

-17
This file was deleted.

Diff for: .github/workflows/docker.yml

+13-20
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,42 @@
11
name: Publish Docker Image
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
tags:
8-
- '*'
9-
pull_request:
10-
branches:
11-
- main
12-
workflow_dispatch:
4+
release:
5+
types: [published]
136

147
permissions:
15-
contents: read
16-
packages: write
17-
actions: read
18-
security-events: write
8+
contents: read
9+
packages: write
10+
actions: read
11+
security-events: write
1912

2013
jobs:
2114
publish:
2215
runs-on: SubtensorCI
23-
16+
2417
steps:
2518
- name: Checkout code
2619
uses: actions/checkout@v4
27-
20+
2821
- name: Set up QEMU
2922
uses: docker/setup-qemu-action@v2
30-
23+
3124
- name: Set up Docker Buildx
3225
uses: docker/setup-buildx-action@v2
33-
26+
3427
- name: Login to GHCR
3528
uses: docker/login-action@v2
3629
with:
3730
registry: ghcr.io
3831
username: ${{ github.actor }}
3932
password: ${{ secrets.GITHUB_TOKEN }}
40-
33+
4134
- name: Extract metadata (tags, labels) for Docker
4235
id: meta
4336
uses: docker/metadata-action@v4
4437
with:
4538
images: ghcr.io/${{ github.repository }}
46-
39+
4740
- name: Build and push Docker image
4841
uses: docker/build-push-action@v4
4942
with:
@@ -52,4 +45,4 @@ jobs:
5245
tags: |
5346
${{ steps.meta.outputs.tags }}
5447
ghcr.io/${{ github.repository }}:latest
55-
labels: ${{ steps.meta.outputs.labels }}
48+
labels: ${{ steps.meta.outputs.labels }}

Diff for: .github/workflows/testnet-labels.yml

-19
This file was deleted.

Diff for: .github/workflows/testnet-ready-labels.yml

-17
This file was deleted.

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**/*.lock
88

9+
*.ipynb
10+
911
# Generated by code coverage
1012
*.profraw
1113
*.profdata

Diff for: .rustfmt.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
##
77
# rustup run nightly -- rustfmt node/src/main.rs
88

9-
# max_width = 100
9+
# max_width = 180
1010
# hard_tabs = false
1111
# tab_spaces = 4
1212
# newline_style = "Auto"

0 commit comments

Comments
 (0)