Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to polkadot 1.0 #252

Merged
merged 177 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 174 commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
650747a
set version to 1.0 and rename sc-finality-grandpa => sc-consensus-gra…
sam0x17 Mar 11, 2024
049ee2c
fix some versions
sam0x17 Mar 11, 2024
ca94936
sp-finality-grandpa => sp-consensus-grandpa
sam0x17 Mar 11, 2024
053229e
more versions fixed
sam0x17 Mar 11, 2024
d1071b6
update crates
sam0x17 Mar 11, 2024
caf7fad
set rust version to 1.78 nightly
sam0x17 Mar 11, 2024
8b3e946
fix GenesisBuild re-export issue
sam0x17 Mar 11, 2024
266dc6e
use 2.0 resolver
sam0x17 Mar 11, 2024
47c9800
BlockNumber => BlockNumberFor<T>
sam0x17 Mar 11, 2024
7d3c04e
Weight::from_ref_time(N) => Weight::from_parts(N, 0)
sam0x17 Mar 11, 2024
440ffae
Weight::from_proof_size(N) => Weight::from_parts(0, N)
sam0x17 Mar 11, 2024
b81233a
workaround for From<OldWeight> impl removed
sam0x17 Mar 11, 2024
ee0cf6b
frame_support::inherent::Vec => sp_std::vec::Vec
sam0x17 Mar 11, 2024
505c607
cargo fmt
sam0x17 Mar 11, 2024
bcaf453
remove trailing whitespace, cargo fmt passing :tada:
sam0x17 Mar 11, 2024
f68940c
GenesisBuild => BuildGenesisConfig
sam0x17 Mar 11, 2024
306e1f0
add two things the regex missed
sam0x17 Mar 11, 2024
9aa1d10
fix more genesis configs
sam0x17 Mar 11, 2024
323ac1c
migrate more block numbers
sam0x17 Mar 11, 2024
7e52e55
remove Index
sam0x17 Mar 11, 2024
90891a0
remove Header and BlockNumber since they are now included by default
sam0x17 Mar 11, 2024
62b8cb6
set AllowMultipleBlocksPerSlot = Get<false>;
sam0x17 Mar 11, 2024
7ef5d89
add missing metadata methods
sam0x17 Mar 11, 2024
2720911
fix Block and Nonce
sam0x17 Mar 11, 2024
0d1b7d0
specify defaults for new HoldReason-related types
sam0x17 Mar 12, 2024
b4903a7
specify WeightInfo for pallet_sudo
sam0x17 Mar 12, 2024
5493ffc
finality_grandpa => consensus_grandpa
sam0x17 Mar 12, 2024
94cca44
fix sc-network and sc-offchain
sam0x17 Mar 12, 2024
e5565d3
fix keystore access
sam0x17 Mar 12, 2024
b75e7e4
fix config
sam0x17 Mar 12, 2024
e7ab626
fix _rpc_handlers
sam0x17 Mar 12, 2024
9367185
upgrade localnet_genesis()
sam0x17 Mar 12, 2024
7eb0fd4
fix testnet_genesis()
sam0x17 Mar 12, 2024
3a5d7c2
fix finney_genesis()
sam0x17 Mar 12, 2024
7f57821
clean up chain_spec
sam0x17 Mar 12, 2024
6226ffe
remove check for keystore support
sam0x17 Mar 12, 2024
26e9c97
remove check for remote keystore on new_full
sam0x17 Mar 12, 2024
9c0b149
use new add_notification_protocol syntax to add grandpa protocol info
sam0x17 Mar 12, 2024
d7b749d
fix config.offchain_worker settings in new_full
sam0x17 Mar 12, 2024
1697e68
add missing clone(), services.rs is green :tada:
sam0x17 Mar 12, 2024
49d1f37
remove native_runtime_version from SubstrateCli impl
sam0x17 Mar 12, 2024
4c8b568
all green on `cargo check`, haven't tried --workspace :tada:
sam0x17 Mar 12, 2024
df12d81
cargo check --workspace passing :tada:
sam0x17 Mar 12, 2024
cddc78a
Merge remote-tracking branch 'origin/sam-cargo-fmt' into sam-upgrade-…
sam0x17 Mar 12, 2024
336dc56
fix sudo_set_network_min_lock_cost weight syntax
sam0x17 Mar 12, 2024
1e93030
cargo check --workspace green again :tada:
sam0x17 Mar 12, 2024
eb0a084
add missing hold reasons for test config
sam0x17 Mar 12, 2024
3651e0a
try to fix AccountStore for pallet_balances config test impl
sam0x17 Mar 12, 2024
3f72542
T::BlockNumber => BlockNumberFor<T>
sam0x17 Mar 12, 2024
6d024e4
replace BlockNumber TryIntos
sam0x17 Mar 12, 2024
c8454e5
bring BuildStorage into scope in test mock pallet
sam0x17 Mar 12, 2024
449b1b3
cargo fix
sam0x17 Mar 12, 2024
69c7efb
fix more warnings
sam0x17 Mar 12, 2024
2bad57e
cargo fmt
sam0x17 Mar 12, 2024
8318db3
fix commitments pallet test config
sam0x17 Mar 12, 2024
352b25f
fix subtensor pallet test mock config
sam0x17 Mar 12, 2024
b9824bf
fix admin-utils mock test config
sam0x17 Mar 12, 2024
33d4b74
try to fix construct_runtime!
sam0x17 Mar 12, 2024
8992430
try to fix collective construct_runtime!
sam0x17 Mar 12, 2024
cb0da7c
fix collective pallet test config
sam0x17 Mar 12, 2024
00ebd86
fix missing BuildStorage import
sam0x17 Mar 12, 2024
37a5b36
fix several new_test_ext()s
sam0x17 Mar 12, 2024
a567211
apply auto formatting to all files
sam0x17 Mar 12, 2024
fd585c3
Merge remote-tracking branch 'origin/sam-cargo-fmt' into sam-upgrade-…
sam0x17 Mar 12, 2024
053726b
more fixes
sam0x17 Mar 12, 2024
83bc3f6
fix commitments pallet test construct_runtime!
sam0x17 Mar 13, 2024
fd42f35
fix admin-utils mock runtime and pallet_balances config
sam0x17 Mar 13, 2024
1345aee
fix subtensor mock/test construct_runtime and config
sam0x17 Mar 13, 2024
b223b86
remove deprecated Where section
sam0x17 Mar 15, 2024
49c2bfc
fix compile error :tada: :tada: :tada: :tada: :tada:
sam0x17 Mar 18, 2024
1f82090
Merge remote-tracking branch 'origin/main' into sam-upgrade-polkadot-1.0
sam0x17 Mar 18, 2024
4a57e9a
Add clippy to CI
keithtensor Mar 19, 2024
506b524
Perform cargo fmt check on all targets and features
keithtensor Mar 19, 2024
79044e8
Fix some clippy warnings
keithtensor Mar 19, 2024
6417b47
Fix compilation errors
keithtensor Mar 19, 2024
65af4e3
Merge pull request #266 from opentensor/keith-add-clippy-ci
sam0x17 Mar 19, 2024
2f3aa14
Fix CI
keithtensor Mar 19, 2024
e789084
Install rustfmt and clippy on CI
keithtensor Mar 19, 2024
4e626ba
Disable checking of all targets and features
keithtensor Mar 19, 2024
667b4a5
Install the right nightly
keithtensor Mar 19, 2024
6e23b3f
Make sure we're using the right year of the nightly
keithtensor Mar 19, 2024
1b2b526
Remove try-runtime subcommand
keithtensor Mar 19, 2024
e8c6a91
fix existential deposit issue
sam0x17 Mar 19, 2024
e5e2235
fix: clippy
Mar 19, 2024
86ef251
sam revamp CI
sam0x17 Mar 19, 2024
297ae3b
fix typo
sam0x17 Mar 19, 2024
9f6f3c9
make CI names shorter because omg it's so long
sam0x17 Mar 19, 2024
64bc003
add CI check asserting that cargo fix --workspace has no local changes
sam0x17 Mar 19, 2024
73007b4
temporary fix for test_registration_difficulty_adjustment failure
sam0x17 Mar 19, 2024
05e1026
Move Cargo.toml lints into CLI flags
keithtensor Mar 20, 2024
e6fa919
Fix YAML syntax
keithtensor Mar 20, 2024
e1dcc70
Fix YAML syntax
keithtensor Mar 20, 2024
260023d
Fix clippy CLI syntax
keithtensor Mar 20, 2024
7fef8c9
Deny panics
keithtensor Mar 20, 2024
8e64ffc
Do proper multiline syntax
keithtensor Mar 21, 2024
e849d1c
Allow unreachable macros again in clippy
keithtensor Mar 21, 2024
83e7e3b
Merge remote-tracking branch 'origin/main' into sam-upgrade-polkadot-1.0
sam0x17 Mar 22, 2024
d0c6639
add comment
sam0x17 Mar 22, 2024
8d0395d
fix deprecation warning for NativeElseWasmExecutor::new
sam0x17 Mar 22, 2024
0e991b4
remove remote_keystore function (no longer needed)
sam0x17 Mar 22, 2024
8de291c
remove unnecessary mut
sam0x17 Mar 22, 2024
8d490e4
remove some unused imports
sam0x17 Mar 22, 2024
34cb539
fix a bunch of data_type deprecation warnings
sam0x17 Mar 22, 2024
cd54ab0
remove deprecated generate_store
sam0x17 Mar 22, 2024
7dfddef
remove unused param
sam0x17 Mar 22, 2024
b47c2bb
remove more deprecations and unused imports
sam0x17 Mar 22, 2024
48fda02
remove deprecated `close_old_weight`
sam0x17 Mar 22, 2024
04cadac
use dev_mode for mock test pallet instead of deprecated #[weight(0)]
sam0x17 Mar 22, 2024
3ef1942
GenesisConfig => RuntimeGenesisConfig for collective pallet
sam0x17 Mar 22, 2024
8e86851
silence useless warning coming from a macro expansion
sam0x17 Mar 22, 2024
7d55509
comment out dead code
sam0x17 Mar 22, 2024
0c66fca
collective pallet clean / no warnings :tada:
sam0x17 Mar 22, 2024
0dea481
add missing unwrap() to test
sam0x17 Mar 22, 2024
59a7101
comment out unused method
sam0x17 Mar 22, 2024
798762b
fix commitments pallet test warnings
sam0x17 Mar 22, 2024
0fd50c0
fix commitments pallet data types warnings
sam0x17 Mar 22, 2024
182a2d3
remove unused import
sam0x17 Mar 22, 2024
35444ae
fix root pallet test warnings
sam0x17 Mar 22, 2024
0ee4f0e
fix imporperly named enum variant
sam0x17 Mar 22, 2024
c0862ff
fix several mispellings
sam0x17 Mar 22, 2024
d87bf88
fix mispelled type name
sam0x17 Mar 22, 2024
c9b2477
fix more warnings
sam0x17 Mar 22, 2024
d47e2ce
fix a really weird/annoying warning
sam0x17 Mar 22, 2024
0d707c5
fix another, similar weird warning
sam0x17 Mar 22, 2024
2e9f93c
fix more warnings and spelling errors
sam0x17 Mar 22, 2024
c1c58e7
fix more warnings
sam0x17 Mar 22, 2024
f23cf38
fix more warnings
sam0x17 Mar 22, 2024
0d20682
remove unused deposit event
sam0x17 Mar 22, 2024
835a0f5
add missing unwraps to tests
sam0x17 Mar 22, 2024
afc7bf8
fix more warnings
sam0x17 Mar 22, 2024
3554b41
fix more warnings
sam0x17 Mar 22, 2024
f77d90e
fix improper use of pub (crate)
sam0x17 Mar 22, 2024
4adbb6b
another improper import
sam0x17 Mar 22, 2024
ceb563d
fix more warnings
sam0x17 Mar 22, 2024
37c7554
no more warnings :tada: :tada: :boom: :boom:
sam0x17 Mar 22, 2024
b77984e
sanity check block number
sam0x17 Mar 22, 2024
fd7e6a6
verify issue
sam0x17 Mar 22, 2024
3bff4c5
WIP
sam0x17 Mar 24, 2024
6a2133d
don't assume block number is 0 at start of test
sam0x17 Mar 25, 2024
125d42f
test_bond now passing, use new `next_block()` abstraction
sam0x17 Mar 25, 2024
2def33b
fix test_active_stake()
sam0x17 Mar 25, 2024
cdcf600
fix test_registration_invalid_block_number
sam0x17 Mar 25, 2024
e96925d
fix test_registration_get_uid_to_prune_node_in_immunity_period
sam0x17 Mar 25, 2024
1755064
fix test_registration_get_uid_to_prune_all_in_immunity_period
sam0x17 Mar 25, 2024
f4127f2
fix test_root_set_weights()
sam0x17 Mar 25, 2024
aaa9e85
fix test_root_set_weights_out_of_order_netuids
sam0x17 Mar 25, 2024
5cee3a5
fix test_root_subnet_creation_deletion
sam0x17 Mar 25, 2024
2a3deee
fix test_network_pruning
sam0x17 Mar 25, 2024
c09aa1b
fix misspellings
sam0x17 Mar 25, 2024
ea79fa2
hard-code block number 0 in subtensor mock tests
sam0x17 Mar 25, 2024
0eb6b61
never mind
sam0x17 Mar 25, 2024
5f23061
Migrate from Currency trait to fungible traits
keithtensor Mar 25, 2024
ac2c04d
cargo fmt
keithtensor Mar 25, 2024
a7da937
Disable some clippy lints
keithtensor Mar 28, 2024
965f494
Try indenting
keithtensor Mar 28, 2024
9cac574
Remove commented out lines
keithtensor Mar 28, 2024
696a893
Active CI when pushing or PRing against development branch
keithtensor Mar 28, 2024
1b30fdc
bump CI for sanity purposes
sam0x17 Mar 29, 2024
667a97a
Merge remote-tracking branch 'origin/development' into sam-upgrade-po…
sam0x17 Mar 29, 2024
4fcf5f8
Fix tests and prevent accounts from dropping below ED while staking
keithtensor Mar 29, 2024
6e78810
Fixes
keithtensor Mar 29, 2024
f6fc0ab
Pre-check for a 0 amount before withdrawal
keithtensor Mar 29, 2024
b4ea027
Merge branch 'development' into sam-upgrade-polkadot-1.0
keithtensor Mar 29, 2024
1cd2d10
Update test expectations
keithtensor Apr 2, 2024
8504e1d
Use actual block number instead of assuming 0
keithtensor Apr 2, 2024
8ee0b70
Merge branch 'development' into sam-upgrade-polkadot-1.0
keithtensor Apr 2, 2024
da56cae
Make block number a parameter to new_test_ext
keithtensor Apr 2, 2024
94e6e39
fix benchmarking test
open-junius Apr 4, 2024
8b5e73d
clean compile cache
open-junius Apr 4, 2024
abfda0a
Merge remote-tracking branch 'origin/development' into sam-upgrade-po…
keithtensor Apr 4, 2024
855c451
Fix compilation errors
keithtensor Apr 4, 2024
412de1b
Fix test
keithtensor Apr 4, 2024
9e76569
Assign u64 to the Currency::Balance type in subtensor pallet
keithtensor Apr 5, 2024
7c8839d
cargo fmt
keithtensor Apr 5, 2024
895c3cf
Update spec version to 145
keithtensor Apr 5, 2024
257e883
comment out unneeded line
sam0x17 Apr 5, 2024
6b9c827
fix missing newline
sam0x17 Apr 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
289 changes: 258 additions & 31 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Rust build, benchmarks, and tests
name: CI

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

##

on:
##
# Run automatically for any push that changes Rust file(s)
## Run automatically for all PRs against main, regardless of what the changes are
## to be safe and so we can more easily force re-run the CI when github is being
## weird by using a blank commit
push:
branches: [main, development, staging]

Expand All @@ -24,83 +25,309 @@ on:
required: false
default: ""

##
env:
CARGO_TERM_COLOR: always
VERBOSE: ${{ github.events.input.verbose }}

##
#
jobs:
check:
name: Tests targeting ${{ matrix.rust-target }} for OS ${{ matrix.os }}
# runs cargo fmt
cargo-fmt:
name: cargo fmt
runs-on: SubtensorCI

##
# Define multiple targets for builds and tests
strategy:
matrix:
rust-branch:
- nightly-2023-01-18

- nightly-2024-03-05
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 }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt
profile: minimal

- name: cargo fmt
run: cargo fmt --check --all

# runs cargo check --workspace
cargo-check:
name: cargo check
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
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 }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- 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 }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo check --workspace
run: cargo check --workspace

# runs cargo test --workspace
cargo-test:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
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 }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- 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 }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

##
- name: cargo test --workspace
run: cargo test --workspace

# runs cargo test --workspace --features=runtime-benchmarks
cargo-test-benchmarks:
name: cargo test w/benchmarks
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
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
# 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:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- 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 }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo test --workspace --features=runtime-benchmarks
run: cargo test --workspace --features=runtime-benchmarks

# runs cargo clippy
clippy:
name: cargo clippy
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
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 }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo fmt
run: cargo fmt --check
- name: cargo clippy
run: |
cargo clippy -- -D clippy::panic \
-D clippy::todo \
-D clippy::unimplemented
# -D clippy::indexing_slicing \
# -D clippy::unwrap_used \

## TODO: maybe use `if` conditions in tests to target `--package <name>`
- name: cargo test
# timeout-minutes: 30
run: cargo test --workspace
# ensures cargo fix has no trivial changes that can be applied
cargo-fix:
name: cargo fix
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
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 }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Run benchmarks
# timeout-minutes: 30
- name: Install dependencies
run: |
pushd node &&
cargo build --features=runtime-benchmarks --release
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Build executable
# timeout-minutes: 30
run: cargo build --release
- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo fix --workspace
run: |
# Run cargo fix on the project
cargo fix --workspace

# Check for local git changes
if ! git diff --exit-code; then
echo "There are local changes after running 'cargo fix --workspace' ❌"
exit 1
else
echo "No changes detected after running 'cargo fix --workspace' ✅"
fi
Loading
Loading