Skip to content

Commit

Permalink
Add rust-toolchain.toml (#435)
Browse files Browse the repository at this point in the history
* Add rust-toolchain.toml
* Remove ConvertInto import
  • Loading branch information
KaiserKarel authored and aettran committed Jan 4, 2022
1 parent 30de696 commit 547f1b5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- dali-chachacha
- picasso
workflow_dispatch:
concurrency: ci-check
jobs:
check:
runs-on:
Expand All @@ -20,15 +19,12 @@ jobs:
- sre
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
- name: Setup toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin:$PATH" >> $GITHUB_PATH
- name: Check
run: |
rustup target add wasm32-unknown-unknown
SKIP_WASM_BUILD=1 cargo check --all --benches
- name: Benchmark
run: |
Expand All @@ -51,20 +47,17 @@ jobs:
- sre
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Install Rust components and targets
- name: Setup toolchain
run: |
rustup target add wasm32-unknown-unknown
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
rustup target add wasm32-unknown-unknown --toolchain nightly
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin:$PATH" >> $GITHUB_PATH
- run: |
rustup show
rustup override unset
rustup show
- name: Cargo fmt
run: |
cargo +nightly fmt -- --check
cargo fmt -- --check
- name: Hadolint
env:
HADOLINT_VERSION: v2.8.0
Expand All @@ -81,7 +74,7 @@ jobs:
exit $total_exit_code
- name: Cargo clippy
run: |
cargo +nightly clippy -- -D warnings
cargo clippy -- -D warnings
- name: Cargo udeps
env:
UDEPS_VERSION: v0.1.24
Expand All @@ -94,7 +87,7 @@ jobs:
total_exit_code=0
while IFS= read -r crate; do
echo "=== $crate ==="
(cd "$crate"; SKIP_WASM_BUILD=1 cargo +nightly udeps -q --all-targets) || total_exit_code=$?
(cd "$crate"; SKIP_WASM_BUILD=1 cargo udeps -q --all-targets) || total_exit_code=$?
echo ""
done < <(find . -name "Cargo.toml" -not -path "./polkadot-launch/*" -not -path "./target/*" -exec dirname '{}' \;)
exit $total_exit_code
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions runtime/dali/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{
AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Zero,
},
traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Zero},
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult,
};
Expand Down Expand Up @@ -791,7 +789,7 @@ impl crowdloan_rewards::Config for Runtime {
type AdminOrigin = EnsureRootOrHalfCouncil;
// TODO(hussein-aitlahcen): should be the proxy account
type AssociationOrigin = EnsureRootOrHalfCouncil;
type Convert = ConvertInto;
type Convert = sp_runtime::traits::ConvertInto;
type RelayChainAccountId = [u8; 32];
type InitialPayment = InitialPayment;
type VestingStep = VestingStep;
Expand Down
5 changes: 5 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[toolchain]
channel = "nightly-2021-11-29"
components = [ "rustfmt", "rustc", "rust-std", "cargo", "clippy", ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"

0 comments on commit 547f1b5

Please sign in to comment.