1
- name : CI
1
+ name : Check Rust
2
2
3
3
concurrency :
4
- group : ci -${{ github.ref }}
4
+ group : check-rust -${{ github.ref }}
5
5
cancel-in-progress : true
6
6
7
7
on :
65
65
- name : cargo fmt
66
66
run : cargo fmt --check --all
67
67
68
- # runs cargo clippy --workspace --all-targets --all-features
69
- cargo-clippy :
68
+ cargo-clippy-default-features :
70
69
name : cargo clippy
71
70
runs-on : SubtensorCI
72
71
strategy :
@@ -111,8 +110,104 @@ jobs:
111
110
with :
112
111
key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
113
112
114
- - name : cargo clippy --workspace --all-targets --all-features
115
- run : cargo clippy --workspace --all-targets --all-features
113
+ - name : cargo clippy --workspace --all-targets -- -D warnings
114
+ run : cargo clippy --workspace --all-targets -- -D warnings
115
+
116
+ cargo-clippy-all-features :
117
+ name : cargo clippy --all-features
118
+ runs-on : SubtensorCI
119
+ strategy :
120
+ matrix :
121
+ rust-branch :
122
+ - nightly-2024-03-05
123
+ rust-target :
124
+ - x86_64-unknown-linux-gnu
125
+ # - x86_64-apple-darwin
126
+ os :
127
+ - ubuntu-latest
128
+ # - macos-latest
129
+ include :
130
+ - os : ubuntu-latest
131
+ # - os: macos-latest
132
+ env :
133
+ RELEASE_NAME : development
134
+ # RUSTFLAGS: -A warnings
135
+ RUSTV : ${{ matrix.rust-branch }}
136
+ RUST_BACKTRACE : full
137
+ RUST_BIN_DIR : target/${{ matrix.rust-target }}
138
+ SKIP_WASM_BUILD : 1
139
+ TARGET : ${{ matrix.rust-target }}
140
+ steps :
141
+ - name : Check-out repository under $GITHUB_WORKSPACE
142
+ uses : actions/checkout@v2
143
+
144
+ - name : Install dependencies
145
+ run : |
146
+ sudo apt-get update &&
147
+ sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
148
+
149
+ - name : Install Rust ${{ matrix.rust-branch }}
150
+ uses : actions-rs/toolchain@v1.0.6
151
+ with :
152
+ toolchain : ${{ matrix.rust-branch }}
153
+ components : rustfmt, clippy
154
+ profile : minimal
155
+
156
+ - name : Utilize Shared Rust Cache
157
+ uses : Swatinem/rust-cache@v2.2.1
158
+ with :
159
+ key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
160
+
161
+ - name : cargo clippy --workspace --all-targets --all-features -- -D warnings
162
+ run : cargo clippy --workspace --all-targets --all-features -- -D warnings
163
+
164
+ cargo-clippy-all-features :
165
+ name : cargo clippy --all-features
166
+ runs-on : SubtensorCI
167
+ strategy :
168
+ matrix :
169
+ rust-branch :
170
+ - nightly-2024-03-05
171
+ rust-target :
172
+ - x86_64-unknown-linux-gnu
173
+ # - x86_64-apple-darwin
174
+ os :
175
+ - ubuntu-latest
176
+ # - macos-latest
177
+ include :
178
+ - os : ubuntu-latest
179
+ # - os: macos-latest
180
+ env :
181
+ RELEASE_NAME : development
182
+ # RUSTFLAGS: -A warnings
183
+ RUSTV : ${{ matrix.rust-branch }}
184
+ RUST_BACKTRACE : full
185
+ RUST_BIN_DIR : target/${{ matrix.rust-target }}
186
+ SKIP_WASM_BUILD : 1
187
+ TARGET : ${{ matrix.rust-target }}
188
+ steps :
189
+ - name : Check-out repository under $GITHUB_WORKSPACE
190
+ uses : actions/checkout@v2
191
+
192
+ - name : Install dependencies
193
+ run : |
194
+ sudo apt-get update &&
195
+ sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
196
+
197
+ - name : Install Rust ${{ matrix.rust-branch }}
198
+ uses : actions-rs/toolchain@v1.0.6
199
+ with :
200
+ toolchain : ${{ matrix.rust-branch }}
201
+ components : rustfmt, clippy
202
+ profile : minimal
203
+
204
+ - name : Utilize Shared Rust Cache
205
+ uses : Swatinem/rust-cache@v2.2.1
206
+ with :
207
+ key : ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
208
+
209
+ - name : cargo clippy --workspace --all-targets --all-features -- -D warnings
210
+ run : cargo clippy --workspace --all-targets --all-features -- -D warnings
116
211
117
212
# runs cargo test --workspace
118
213
cargo-test :
@@ -273,7 +368,7 @@ jobs:
273
368
274
369
check-feature-propagation :
275
370
name : zepter run check
276
- runs-on : ubuntu-22.04
371
+ runs-on : SubtensorCI
277
372
278
373
steps :
279
374
- name : Install stable Rust
@@ -295,7 +390,7 @@ jobs:
295
390
296
391
check-finney-migrations :
297
392
name : check finney migrations
298
- runs-on : ubuntu-22.04
393
+ runs-on : SubtensorCI
299
394
steps :
300
395
- name : Checkout sources
301
396
uses : actions/checkout@v4
@@ -306,40 +401,34 @@ jobs:
306
401
runtime-package : " node-subtensor-runtime"
307
402
node-uri : " wss://entrypoint-finney.opentensor.ai:443"
308
403
checks : " pre-and-post"
309
- extra-args : " --disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
310
-
311
- # ----
312
- # We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
313
- # which time all future migrations should be idempotent and won't start failing after the
314
- # upgrade is deployed.
315
- # ----
316
- # check-devnet-migrations:
317
- # name: check devnet migrations
318
- # runs-on: ubuntu-22.04
319
- # steps:
320
- # - name: Checkout sources
321
- # uses: actions/checkout@v4
322
- #
323
- # - name: Run Try Runtime Checks
324
- # uses: "paritytech/try-runtime-gha@v0.1.0"
325
- # with:
326
- # runtime-package: "node-subtensor-runtime"
327
- # node-uri: "wss://dev.chain.opentensor.ai:443"
328
- # checks: "pre-and-post"
329
- # extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
330
- #
331
- # check-testnet-migrations:
332
- # name: check testnet migrations
333
- # runs-on: ubuntu-22.04
334
- # steps:
335
- # - name: Checkout sources
336
- # uses: actions/checkout@v4
337
- #
338
- # - name: Run Try Runtime Checks
339
- # uses: "paritytech/try-runtime-gha@v0.1.0"
340
- # with:
341
- # runtime-package: "node-subtensor-runtime"
342
- # node-uri: "wss://test.chain.opentensor.ai:443"
343
- # checks: "pre-and-post"
344
- # extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
345
- #
404
+ extra-args : " --disable-spec-version-check --no-weight-warnings"
405
+
406
+ check-devnet-migrations :
407
+ name : check devnet migrations
408
+ runs-on : ubuntu-22.04
409
+ steps :
410
+ - name : Checkout sources
411
+ uses : actions/checkout@v3
412
+
413
+ - name : Run Try Runtime Checks
414
+ uses : " paritytech/try-runtime-gha@v0.1.0"
415
+ with :
416
+ runtime-package : " node-subtensor-runtime"
417
+ node-uri : " wss://dev.chain.opentensor.ai:443"
418
+ checks : " pre-and-post"
419
+ extra-args : " --disable-spec-version-check --no-weight-warnings"
420
+
421
+ check-testnet-migrations :
422
+ name : check testnet migrations
423
+ runs-on : ubuntu-22.04
424
+ steps :
425
+ - name : Checkout sources
426
+ uses : actions/checkout@v3
427
+
428
+ - name : Run Try Runtime Checks
429
+ uses : " paritytech/try-runtime-gha@v0.1.0"
430
+ with :
431
+ runtime-package : " node-subtensor-runtime"
432
+ node-uri : " wss://test.chain.opentensor.ai:443"
433
+ checks : " pre-and-post"
434
+ extra-args : " --disable-spec-version-check --no-weight-warnings"
0 commit comments