Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into nix
Browse files Browse the repository at this point in the history
  • Loading branch information
parity-processbot committed May 19, 2023
2 parents aaf1253 + 2c3b923 commit 07465c6
Show file tree
Hide file tree
Showing 857 changed files with 39,171 additions and 25,868 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ rustflags = [
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters" # stylistic
]
6 changes: 3 additions & 3 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dir = "target/nextest"
# * retries = 3
# * retries = { backoff = "fixed", count = 2, delay = "1s" }
# * retries = { backoff = "exponential", count = 10, delay = "1s", jitter = true, max-delay = "10s" }
retries = 0
retries = 5

# The number of threads to run tests with. Supported values are either an integer or
# the string "num-cpus". Can be overridden through the `--test-threads` option.
Expand Down Expand Up @@ -89,12 +89,12 @@ leak-timeout = "100ms"
# Output a JUnit report into the given file inside 'store.dir/<profile-name>'.
# If unspecified, JUnit is not written out.

# path = "junit.xml"
path = "junit.xml"

# The name of the top-level "report" element in JUnit report. If aggregating
# reports across different test runs, it may be useful to provide separate names
# for each report.
report-name = "nextest-run"
report-name = "substrate"

# Whether standard output and standard error for passing tests should be stored in the JUnit report.
# Output is stored in the <system-out> and <system-err> elements of the <testcase> element.
Expand Down
16 changes: 14 additions & 2 deletions .github/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,24 @@ rules:
check_type: changed_files
condition:
include: .*
# excluding files from 'CI team' rules
exclude: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*|^\.config/nextest.toml
# excluding files from 'CI team' and 'FRAME coders' rules
exclude: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*|^\.config/nextest.toml|^frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
min_approvals: 2
teams:
- core-devs

- name: FRAME coders
check_type: changed_files
condition:
include: ^frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
all:
- min_approvals: 2
teams:
- core-devs
- min_approvals: 1
teams:
- frame-coders

- name: CI team
check_type: changed_files
condition:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ rls*.log
.cargo-remote.toml
*.bin
*.iml
scripts/ci/node-template-release/Cargo.lock
bin/node-template/Cargo.lock
substrate.code-workspace
.direnv/
Expand Down
86 changes: 37 additions & 49 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ stages:
- test
- build
- publish
- notify
- zombienet
- deploy
- notify

workflow:
rules:
Expand All @@ -46,40 +46,32 @@ variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
DOCKER_OS: "debian:stretch"
DOCKER_OS: "debian:bullseye"
ARCH: "x86_64"
CI_IMAGE: "paritytech/ci-linux:production"
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27"
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29"
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"

RUSTY_CACHIER_SINGLE_BRANCH: master
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
RUSTY_CACHIER_MINIO_ALIAS: rustycachier_gcs
RUSTY_CACHIER_MINIO_BUCKET: parity-build-rusty-cachier
RUSTY_CACHIER_COMPRESSION_METHOD: zstd

NEXTEST_FAILURE_OUTPUT: immediate-final
NEXTEST_SUCCESS_OUTPUT: final
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.37"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.52"

.shared-default: &shared-default
default:
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
cache: {}

.default-pipeline-definitions:
default:
<<: *shared-default
interruptible: true

.crate-publishing-pipeline-definitions:
default:
<<: *shared-default
# The crate-publishing pipeline defaults to `interruptible: false` so that we'll be able to
# reach and run the publishing jobs despite the "Auto-cancel redundant pipelines" CI setting.
# The setting is relevant because the crate-publishing pipeline runs on `master`, thus future
# pipelines on `master` (e.g. created for new commits or other schedules) might unintendedly
# cancel the publishing jobs or its dependencies before we get to actually publish the crates.
interruptible: false
interruptible: true

.collect-artifacts:
artifacts:
Expand All @@ -105,6 +97,8 @@ variables:
# $WASM_BUILD_WORKSPACE_HINT enables wasm-builder to find the Cargo.lock from within generated
# packages
- export WASM_BUILD_WORKSPACE_HINT="$PWD"
# ensure that RUSTFLAGS are set correctly
- echo $RUSTFLAGS

.job-switcher:
before_script:
Expand Down Expand Up @@ -151,7 +145,7 @@ variables:
after_script:
- !reference [.rusty-cachier, after_script]
tags:
- linux-docker
- linux-docker-vm-c2

# rusty-cachier's hidden job. Parts of this job are used to instrument the pipeline's other real jobs with rusty-cachier
# Description of the commands is available here - https://gitlab.parity.io/parity/infrastructure/ci_cd/rusty-cachier/client#description
Expand All @@ -176,7 +170,7 @@ variables:
# exclude cargo-check-benches from such runs
.test-refs-check-benches:
rules:
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "parent_pipeline" && $CI_IMAGE =~ /staging$/
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "pipeline" && $CI_IMAGE =~ /staging$/
when: never
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
Expand Down Expand Up @@ -226,11 +220,6 @@ variables:
.zombienet-refs:
extends: .build-refs

.nightly-pipeline:
rules:
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"

.crates-publishing-variables:
variables:
CRATESIO_CRATES_OWNER: parity-crate-owner
Expand All @@ -256,23 +245,12 @@ variables:
- artifacts/
variables:
SPUB_TMP: artifacts
# disable timestamping for the crate publishing jobs, they leave stray child processes behind
# which don't interact well with the timestamping script
CI_DISABLE_TIMESTAMP: 1

#### stage: .pre

skip-if-draft:
extends: .kubernetes-env
variables:
CI_IMAGE: "paritytech/tools:latest"
stage: .pre
rules:
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
script:
- echo "Commit message is ${CI_COMMIT_MESSAGE}"
- echo "Ref is ${CI_COMMIT_REF_NAME}"
- echo "pipeline source is ${CI_PIPELINE_SOURCE}"
- ./scripts/ci/gitlab/skip_if_draft.sh
allow_failure: true

check-crates-publishing-pipeline:
stage: .pre
extends:
Expand All @@ -285,6 +263,23 @@ check-crates-publishing-pipeline:
https://github.com/paritytech/releng-scripts.git
- ONLY_CHECK_PIPELINE=true ./releng-scripts/publish-crates

# By default our pipelines are interruptible, but some special pipelines shouldn't be interrupted:
# * multi-project pipelines such as the ones triggered by the scripts repo
# * the scheduled automatic-crate-publishing pipeline
#
# In those cases, we add an uninterruptible .pre job; once that one has started,
# the entire pipeline becomes uninterruptible
uninterruptible-pipeline:
extends: .kubernetes-env
variables:
CI_IMAGE: "paritytech/tools:latest"
stage: .pre
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "automatic-crate-publishing"
script: "true"

include:
# check jobs
- scripts/ci/gitlab/pipeline/check.yml
Expand All @@ -305,15 +300,8 @@ include:
# pipeline is made uninterruptible to ensure that test jobs also get a chance to run to
# completion, because the publishing jobs depends on them AS INTENDED: crates should not be
# published before their source code is checked.
- local: scripts/ci/gitlab/crate-publishing-pipeline.yml
rules:
- if: $PIPELINE == "automatic-crate-publishing"
# For normal pipelines: run it with defaults + `interruptible: true`
- local: scripts/ci/gitlab/default-pipeline.yml
rules:
- if: $PIPELINE != "automatic-crate-publishing"
- project: parity/infrastructure/ci_cd/shared
ref: v0.1
ref: v0.2
file: /common/timestamp.yml

#### stage: notify
Expand Down
3 changes: 2 additions & 1 deletion .maintain/frame-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
use core::marker::PhantomData;

/// Weight functions needed for {{pallet}}.
pub trait WeightInfo {
Expand Down
Loading

0 comments on commit 07465c6

Please sign in to comment.