From 25d5ae3f79629dbb29060a94f838d321160aca69 Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Fri, 22 Apr 2022 09:43:56 +0100 Subject: [PATCH 1/6] The 2022-02-10 nightly can't build some deps There's a sig that returns `impl IntoIterator` and an Option is being retured but it's incorrectly not allowing a `?` in the method. --- shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 023946ce16de4..c318995605a38 100644 --- a/shell.nix +++ b/shell.nix @@ -5,7 +5,7 @@ let rev = "15b7a05f20aab51c4ffbefddb1b448e862dccb7d"; }); nixpkgs = import { overlays = [ mozillaOverlay ]; }; - rust-nightly = with nixpkgs; ((rustChannelOf { date = "2022-02-10"; channel = "nightly"; }).rust.override { + rust-nightly = with nixpkgs; ((rustChannelOf { date = "2022-04-20"; channel = "nightly"; }).rust.override { extensions = [ "rust-src" ]; targets = [ "wasm32-unknown-unknown" ]; }); From 690157d7decd7ade0ac1b4e018edb7a7a9b30340 Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Mon, 25 Apr 2022 13:03:23 +0100 Subject: [PATCH 2/6] removing duplicate test --- utils/frame/remote-externalities/src/lib.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/utils/frame/remote-externalities/src/lib.rs b/utils/frame/remote-externalities/src/lib.rs index 018ad2f4e0ad8..a717a93f072bc 100644 --- a/utils/frame/remote-externalities/src/lib.rs +++ b/utils/frame/remote-externalities/src/lib.rs @@ -1098,21 +1098,6 @@ mod remote_tests { } } - #[tokio::test] - async fn can_build_child_tree() { - init_logger(); - Builder::::new() - .mode(Mode::Online(OnlineConfig { - transport: "wss://rpc.polkadot.io:443".to_owned().into(), - pallets: vec!["Crowdloan".to_owned()], - ..Default::default() - })) - .build() - .await - .expect(REMOTE_INACCESSIBLE) - .execute_with(|| {}); - } - #[tokio::test] async fn can_create_child_snapshot() { init_logger(); @@ -1196,9 +1181,7 @@ mod remote_tests { init_logger(); Builder::::new() .mode(Mode::Online(OnlineConfig { - // transport: "wss://kusama-rpc.polkadot.io".to_owned().into(), - transport: "ws://kianenigma-archive:9924".to_owned().into(), - // transport: "ws://localhost:9999".to_owned().into(), + transport: "wss://rpc.polkadot.io:443".to_owned().into(), pallets: vec!["Crowdloan".to_owned()], ..Default::default() })) From de5f0f438b8f08c01fde340488e5ee3133f3c8bd Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 27 Apr 2022 15:35:22 +0200 Subject: [PATCH 3/6] [ci] add job cargo-check-nixos --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62684ffebd987..2ca516ab7b304 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -263,6 +263,18 @@ cargo-clippy: script: - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets +cargo-check-nixos: + stage: test + <<: *docker-env + <<: *test-refs + before_script: [] + variables: + CI_IMAGE: "nixos/nix" + script: + - nix-channel --update + - nix-shell shell.nix + - nix-shell --run "cargo check --workspace --all-targets --all-features" + cargo-check-benches: stage: test <<: *docker-env From 444c0ea66368437dc9891d2adbe0fbcafc4770d1 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 27 Apr 2022 16:22:56 +0200 Subject: [PATCH 4/6] add dummy variables nix check --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ca516ab7b304..6b554f0036d78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -270,6 +270,8 @@ cargo-check-nixos: before_script: [] variables: CI_IMAGE: "nixos/nix" + SNAP: "DUMMY" + WS_API: "DUMMY" script: - nix-channel --update - nix-shell shell.nix From ff3d156bc74badd425a00959d2cfd6c3ec53af0e Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 27 Apr 2022 16:54:51 +0200 Subject: [PATCH 5/6] fix check-dependent jobs --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b554f0036d78..83a836d88a8b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -497,13 +497,12 @@ check-dependent-polkadot: <<: *check-dependent-project variables: DEPENDENT_REPO: polkadot - CARGO_UPDATE_CRATES: "sp-io" check-dependent-cumulus: <<: *check-dependent-project variables: DEPENDENT_REPO: cumulus - CARGO_UPDATE_CRATES: "sp-io polkadot-runtime-common" + EXTRA_DEPENDENCIES: polkadot build-linux-substrate: From 05583cd8298aec69e650ffadd98ae85d95196800 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 27 Apr 2022 17:01:26 +0200 Subject: [PATCH 6/6] fix check-dependent-project template --- .gitlab-ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 83a836d88a8b7..9c6a2da5de918 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -482,12 +482,10 @@ cargo-check-macos: "--branch=$PIPELINE_SCRIPTS_TAG" https://github.com/paritytech/pipeline-scripts - ./pipeline-scripts/check_dependent_project.sh - paritytech - substrate - --substrate - "$DEPENDENT_REPO" - "$GITHUB_PR_TOKEN" - "$CARGO_UPDATE_CRATES" + --org paritytech + --dependent-repo "$DEPENDENT_REPO" + --github-api-token "$GITHUB_PR_TOKEN" + --extra-dependencies "$EXTRA_DEPENDENCIES" # Individual jobs are set up for each dependent project so that they can be ran in parallel. # Arguably we could generate a job for each companion in the PR's description using Gitlab's