diff --git a/.github/workflows/parachain.yml b/.github/workflows/parachain.yml index cc1228b39c4c..5d2321d42186 100644 --- a/.github/workflows/parachain.yml +++ b/.github/workflows/parachain.yml @@ -17,7 +17,7 @@ env: RUST_NIGHTLY: "2023-05-23" jobs: - check: + format: runs-on: snowbridge-runner env: CARGO_INCREMENTAL: 0 @@ -54,12 +54,9 @@ jobs: rustup toolchain install nightly rustup component add rustfmt --toolchain nightly rustup show - - name: cargo check - run: cargo check --workspace --all-features - - name: clippy - run: cargo clippy --all-features -- -D warnings - name: format - run: cargo +nightly fmt --all -- --check + working-directory: bridges/snowbridge + run: cargo +nightly fmt -- --check - name: install taplo run: | cargo install taplo-cli --locked @@ -76,6 +73,48 @@ jobs: markdownlint --version markdownlint --config .github/.markdownlint.yaml --ignore target + check: + runs-on: snowbridge-runner + env: + CARGO_INCREMENTAL: 0 + RUST_BACKTRACE: 1 + RUSTFLAGS: -C debuginfo=1 + SKIP_WASM_BUILD: 1 + RUST_NIGHTLY_VERSION: nightly-2024-02-08 + steps: + - uses: actions/checkout@v2 + with: + submodules: "true" + - uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/cache@v1 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - uses: actions/setup-node@v4.0.0 + with: + node-version: "18.x" + registry-url: "https://npm.pkg.github.com" + scope: "@paritytech" + - name: setup rust toolchain + run: | + rustup target add wasm32-unknown-unknown + curl -LO https://github.com/paritytech/rustc-rv32e-toolchain/releases/download/v1.1.0/rust-rve-nightly-2024-01-05-x86_64-unknown-linux-gnu.tar.zst + tar -I zstd -xf rust-rve-nightly-2024-01-05-x86_64-unknown-linux-gnu.tar.zst + mv rve-nightly ~/.rustup/toolchains/ + rustup toolchain install nightly + rustup component add rustfmt --toolchain nightly + rustup show + - name: cargo check + run: cargo check --workspace --all-features + - name: clippy + run: cargo clippy --all-features -- -D warnings + test: needs: check runs-on: snowbridge-runner diff --git a/bridges/snowbridge/primitives/router/src/inbound/mod.rs b/bridges/snowbridge/primitives/router/src/inbound/mod.rs index f76f7f7f9101..c5c5bda11d67 100644 --- a/bridges/snowbridge/primitives/router/src/inbound/mod.rs +++ b/bridges/snowbridge/primitives/router/src/inbound/mod.rs @@ -131,7 +131,8 @@ impl where + > +where CreateAssetCall: Get, CreateAssetDeposit: Get, InboundQueuePalletInstance: Get, diff --git a/bridges/snowbridge/runtime/runtime-common/src/lib.rs b/bridges/snowbridge/runtime/runtime-common/src/lib.rs index aae45520ff4b..0b1a74b232a0 100644 --- a/bridges/snowbridge/runtime/runtime-common/src/lib.rs +++ b/bridges/snowbridge/runtime/runtime-common/src/lib.rs @@ -50,7 +50,8 @@ impl where + > +where Balance: BaseArithmetic + Unsigned + Copy + From + Into + Debug, AccountId: Clone + FullCodec, FeeAssetLocation: Get,