Remove cargo unleash CI job (#10482)

* Remove cargo unleash CI job

The CI job is currently breaking, because we released some crates. We also don't need the job
currently because releases are not done. So, the job currently just annoys people and eats CPU time.
This brings us to the conclusion that this job is currently not required and can be readded at a
later point when we are sure that we need it.

* Hopefully fix UI test

* Another try

* Remove `reserved_keyword` ui
This commit is contained in:
Bastian Köcher
2021-12-14 23:44:04 +01:00
committed by GitHub
parent 187663e1f1
commit bc0ecf8d40
8 changed files with 12 additions and 154 deletions
-30
View File
@@ -39,9 +39,6 @@ variables: &default-vars
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
CI_IMAGE: "paritytech/ci-linux:production"
# FIXME set to release
CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.13"
CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example-* subkey chain-spec-builder"
VAULT_SERVER_URL: "https://vault.parity-mgmt-vault.parity.io"
VAULT_AUTH_PATH: "gitlab-parity-io-jwt"
VAULT_AUTH_ROLE: "cicd_gitlab_parity_${CI_PROJECT_NAME}"
@@ -458,21 +455,6 @@ test-linux-stable: &test-linux
- SUBSTRATE_TEST_TIMEOUT=1 time cargo test -p substrate-test-utils --release --verbose --locked -- --ignored timeout
- sccache -s
unleash-check:
stage: test
<<: *docker-env
<<: *test-refs-no-trigger
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash de-dev-deps
# Reuse build artifacts when running checks (cuts down check time by 3x)
# TODO: Implement this optimization in cargo-unleash rather than here
- mkdir -p target/unleash
- export CARGO_TARGET_DIR=target/unleash
- cargo unleash check ${CARGO_UNLEASH_PKG_DEF}
# FIXME: this job must not fail, or unleash-to-crates-io will publish broken stuff
allow_failure: true
test-frame-examples-compile-to-wasm:
# into one job
stage: test
@@ -869,18 +851,6 @@ publish-draft-release:
- ./.maintain/gitlab/publish_draft_release.sh
allow_failure: true
unleash-to-crates-io:
stage: publish
<<: *docker-env
<<: *vault-secrets
rules:
- if: $CI_COMMIT_REF_NAME =~ /^ci-release-.*$/
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash em-dragons --no-check --owner github:paritytech:core-devs ${CARGO_UNLEASH_PKG_DEF}
allow_failure: true
#### stage: deploy
deploy-prometheus-alerting-rules:
@@ -1,8 +1,8 @@
#[frame_support::pallet]
mod pallet {
use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
use codec::{Decode, Encode};
use frame_support::pallet_prelude::{DispatchResultWithPostInfo, Hooks};
use frame_system::pallet_prelude::{BlockNumberFor, OriginFor};
use codec::{Encode, Decode};
#[pallet::config]
pub trait Config: frame_system::Config {}
@@ -13,7 +13,7 @@ mod pallet {
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
#[derive(Encode, Decode, scale_info::TypeInfo)]
#[derive(Encode, Decode, scale_info::TypeInfo, PartialEq, Clone)]
struct Bar;
#[pallet::call]
@@ -25,5 +25,4 @@ mod pallet {
}
}
fn main() {
}
fn main() {}
@@ -8,21 +8,3 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
= note: add `#[derive(Debug)]` to `Bar` or manually `impl std::fmt::Debug for Bar`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&Bar`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: the trait bound `Bar: Clone` is not satisfied
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:22:36
|
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
| ^^^ the trait `Clone` is not implemented for `Bar`
|
note: required by `clone`
--> $RUST/core/src/clone.rs
|
| fn clone(&self) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0369]: binary operation `==` cannot be applied to type `&Bar`
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:22:36
|
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
| ^^^
@@ -1,6 +1,9 @@
#[frame_support::pallet]
mod pallet {
use frame_support::pallet_prelude::{Hooks, StorageNMap, Twox64Concat, NMapKey};
use frame_support::{
pallet_prelude::{Hooks, Twox64Concat},
storage::types::{StorageNMap, Key},
};
use frame_system::pallet_prelude::BlockNumberFor;
#[pallet::config]
@@ -20,8 +23,7 @@ mod pallet {
struct Bar;
#[pallet::storage]
type Foo<T> = StorageNMap<_, NMapKey<Twox64Concat, Bar>, u32>;
type Foo<T> = StorageNMap<_, Key<Twox64Concat, Bar>, u32>;
}
fn main() {
}
fn main() {}
@@ -1,7 +1,7 @@
error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
--> tests/pallet_ui/storage_info_unsatisfied_nmap.rs:10:12
--> tests/pallet_ui/storage_info_unsatisfied_nmap.rs:13:12
|
10 | #[pallet::generate_storage_info]
13 | #[pallet::generate_storage_info]
| ^^^^^^^^^^^^^^^^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `Key<frame_support::Twox64Concat, Bar>`
@@ -1,26 +0,0 @@
// This file is part of Substrate.
// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[rustversion::attr(not(stable), ignore)]
#[test]
fn reserved_keyword() {
// As trybuild is using `cargo check`, we don't need the real WASM binaries.
std::env::set_var("SKIP_WASM_BUILD", "1");
let t = trybuild::TestCases::new();
t.compile_fail("tests/reserved_keyword/*.rs");
}
@@ -1,30 +0,0 @@
macro_rules! reserved {
($($reserved:ident)*) => {
$(
mod $reserved {
pub use frame_support::dispatch;
pub trait Config: frame_support_test::Config {}
pub mod system {
use frame_support::dispatch;
pub fn ensure_root<R>(_: R) -> dispatch::DispatchResult {
Ok(())
}
}
frame_support::decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin, system=frame_support_test {
#[weight = 0]
fn $reserved(_origin) -> dispatch::DispatchResult { unreachable!() }
}
}
}
)*
}
}
reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
fn main() {}
@@ -1,39 +0,0 @@
error: Invalid call fn name: `on_finalize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
error: Invalid call fn name: `on_initialize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
error: Invalid call fn name: `on_runtime_upgrade`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
error: Invalid call fn name: `offchain_worker`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)
error: Invalid call fn name: `deposit_event`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword.
--> tests/reserved_keyword/on_initialize.rs:28:1
|
28 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::__check_reserved_fn_name` (in Nightly builds, run with -Z macro-backtrace for more info)