1- name : CI
1+ name : Check Rust
22
33concurrency :
4- group : ci -${{ github.ref }}
4+ group : check-rust -${{ github.ref }}
55 cancel-in-progress : true
66
77on :
7171 - name : cargo fmt
7272 run : cargo fmt --check --all
7373
74- # runs cargo clippy --workspace --all-targets --all-features
75- cargo-clippy :
74+ cargo-clippy-default-features :
7675 name : cargo clippy
7776 runs-on : SubtensorCI
7877 strategy :
@@ -117,8 +116,56 @@ jobs:
117116 with :
118117 key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
119118
120- - name : cargo clippy --workspace --all-targets --all-features
121- run : cargo clippy --workspace --all-targets --all-features
119+ - name : cargo clippy --workspace --all-targets -- -D warnings
120+ run : cargo clippy --workspace --all-targets -- -D warnings
121+
122+ cargo-clippy-all-features :
123+ name : cargo clippy --all-features
124+ runs-on : SubtensorCI
125+ strategy :
126+ matrix :
127+ rust-branch :
128+ - nightly-2024-03-05
129+ rust-target :
130+ - x86_64-unknown-linux-gnu
131+ # - x86_64-apple-darwin
132+ os :
133+ - ubuntu-latest
134+ # - macos-latest
135+ include :
136+ - os : ubuntu-latest
137+ # - os: macos-latest
138+ env :
139+ RELEASE_NAME : development
140+ # RUSTFLAGS: -A warnings
141+ RUSTV : ${{ matrix.rust-branch }}
142+ RUST_BACKTRACE : full
143+ RUST_BIN_DIR : target/${{ matrix.rust-target }}
144+ SKIP_WASM_BUILD : 1
145+ TARGET : ${{ matrix.rust-target }}
146+ steps :
147+ - name : Check-out repository under $GITHUB_WORKSPACE
148+ uses : actions/checkout@v2
149+
150+ - name : Install dependencies
151+ run : |
152+ sudo apt-get update &&
153+ sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
154+
155+ - name : Install Rust ${{ matrix.rust-branch }}
156+ uses :
actions-rs/[email protected] 157+ with :
158+ toolchain : ${{ matrix.rust-branch }}
159+ components : rustfmt, clippy
160+ profile : minimal
161+
162+ - name : Utilize Shared Rust Cache
163+ 164+ with :
165+ key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
166+
167+ - name : cargo clippy --workspace --all-targets --all-features -- -D warnings
168+ run : cargo clippy --workspace --all-targets --all-features -- -D warnings
122169
123170 # runs cargo test --workspace
124171 cargo-test :
@@ -279,7 +326,7 @@ jobs:
279326
280327 check-feature-propagation :
281328 name : zepter run check
282- runs-on : ubuntu-22.04
329+ runs-on : SubtensorCI
283330
284331 steps :
285332 - name : Install stable Rust
@@ -301,7 +348,7 @@ jobs:
301348
302349 check-finney-migrations :
303350 name : check finney migrations
304- runs-on : ubuntu-22.04
351+ runs-on : SubtensorCI
305352 steps :
306353 - name : Checkout sources
307354 uses : actions/checkout@v3
@@ -312,40 +359,34 @@ jobs:
312359 runtime-package : " node-subtensor-runtime"
313360 node-uri : " wss://entrypoint-finney.opentensor.ai:443"
314361 checks : " pre-and-post"
315- extra-args : " --disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
316-
317- # ----
318- # We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
319- # which time all future migrations should be idempotent and won't start failing after the
320- # upgrade is deployed.
321- # ----
322- # check-devnet-migrations:
323- # name: check devnet migrations
324- # runs-on: ubuntu-22.04
325- # steps:
326- # - name: Checkout sources
327- # uses: actions/checkout@v3
328- #
329- # - name: Run Try Runtime Checks
330- # uses: "paritytech/[email protected] " 331- # with:
332- # runtime-package: "node-subtensor-runtime"
333- # node-uri: "wss://dev.chain.opentensor.ai:443"
334- # checks: "pre-and-post"
335- # extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
336- #
337- # check-testnet-migrations:
338- # name: check testnet migrations
339- # runs-on: ubuntu-22.04
340- # steps:
341- # - name: Checkout sources
342- # uses: actions/checkout@v3
343- #
344- # - name: Run Try Runtime Checks
345- # uses: "paritytech/[email protected] " 346- # with:
347- # runtime-package: "node-subtensor-runtime"
348- # node-uri: "wss://test.chain.opentensor.ai:443"
349- # checks: "pre-and-post"
350- # extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
351- #
362+ extra-args : " --disable-spec-version-check --no-weight-warnings"
363+
364+ check-devnet-migrations :
365+ name : check devnet migrations
366+ runs-on : ubuntu-22.04
367+ steps :
368+ - name : Checkout sources
369+ uses : actions/checkout@v3
370+
371+ - name : Run Try Runtime Checks
372+ uses :
" paritytech/[email protected] " 373+ with :
374+ runtime-package : " node-subtensor-runtime"
375+ node-uri : " wss://dev.chain.opentensor.ai:443"
376+ checks : " pre-and-post"
377+ extra-args : " --disable-spec-version-check --no-weight-warnings"
378+
379+ check-testnet-migrations :
380+ name : check testnet migrations
381+ runs-on : ubuntu-22.04
382+ steps :
383+ - name : Checkout sources
384+ uses : actions/checkout@v3
385+
386+ - name : Run Try Runtime Checks
387+ uses :
" paritytech/[email protected] " 388+ with :
389+ runtime-package : " node-subtensor-runtime"
390+ node-uri : " wss://test.chain.opentensor.ai:443"
391+ checks : " pre-and-post"
392+ extra-args : " --disable-spec-version-check --no-weight-warnings"
0 commit comments