Skip to content

Commit

Permalink
Merge branch 'master' into sv-add-subcommand-to-relay-messages-range
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik authored May 13, 2024
2 parents 81b4578 + 805d54d commit 446be3e
Show file tree
Hide file tree
Showing 257 changed files with 12,001 additions and 1,760 deletions.
1 change: 1 addition & 0 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exclude = [
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot-try-runtime-node.parity-chains.parity.io/",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
Expand Down
9 changes: 9 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
precision: 2
round: down
range: "1...100"
status:
project:
default:
target: 1.0
threshold: 2.0
4 changes: 2 additions & 2 deletions .github/workflows/check-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install parity-publish@0.3.0
run: cargo install parity-publish@0.5.1

- name: parity-publish check
run: parity-publish check --allow-unpublished
run: parity-publish --color always check --allow-unpublished
55 changes: 55 additions & 0 deletions .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check semver

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- prdoc/*.prdoc

jobs:
check-semver:
runs-on: ubuntu-latest
container:
image: docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Rust Cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
cache-on-failure: true

- name: Rust compilation prerequisites
run: |
rustup default nightly-2024-03-01
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-01
rustup component add rust-src --toolchain nightly-2024-03-01
- name: install parity-publish
run: cargo install parity-publish@0.5.1

- name: extra git setup
run: |
git config --global --add safe.directory '*'
git fetch --no-tags --no-recurse-submodules --depth=1 origin master
git branch old origin/master
- name: check semver
run: |
export CARGO_TARGET_DIR=target
export RUSTFLAGS='-A warnings -A missing_docs'
if ! parity-publish --color always prdoc --since old --validate prdoc/pr_$PR.prdoc --toolchain nightly-2024-03-01 -v; then
cat <<EOF
👋 Hello developer! The SemVer information that you declared in the prdoc file did not match what the CI detected.
Please check the output above and see the following links for more help:
- https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/prdoc.md#record-semver-changes
- https://forum.polkadot.network/t/psa-polkadot-sdk-to-use-semver
Otherwise feel free to ask in the Merge Request or in Matrix chat.
EOF
exit 1
fi
env:
PR: ${{ github.event.pull_request.number }}
4 changes: 2 additions & 2 deletions .github/workflows/claim-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install parity-publish@0.3.0
run: cargo install parity-publish@0.5.1

- name: parity-publish claim
env:
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ secrets.CRATESIO_PUBLISH_CLAIM_TOKEN }}
run: parity-publish claim
run: parity-publish --color always claim
1 change: 1 addition & 0 deletions .github/workflows/release-30_publish_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
post_to_matrix:
runs-on: ubuntu-latest
needs: publish-release-draft
environment: release
strategy:
matrix:
channel:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release-99_notif-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ jobs:
Release version: [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
-----
${{github.event.release.body}}
107 changes: 107 additions & 0 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,113 @@
- job: job-starter
artifacts: false

#
#
#
.codecov-check:
script:
- >
if command -v codecovcli -h >/dev/null 2>&1; then
codecovcli --version;
else
echo "downloading codecovcli";
curl -s -o codecovcli https://cli.codecov.io/latest/linux/codecov;
chmod +x codecovcli;
mv codecovcli /usr/local/bin/codecovcli;
fi
#
- codecovcli --version

#
#
#
codecov-start:
stage: test
when: manual
allow_failure: false
extends:
- .kubernetes-env
- .common-refs
- .pipeline-stopper-artifacts
- .run-immediately
script:
- !reference [.codecov-check, script]
- >
if [ "$CI_COMMIT_REF_NAME" != "master" ]; then
codecovcli -v create-commit -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --pr ${CI_COMMIT_REF_NAME} --git-service github;
codecovcli -v create-report -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --pr ${CI_COMMIT_REF_NAME} --git-service github;
else
codecovcli -v create-commit -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --git-service github;
codecovcli -v create-report -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --git-service github;
fi
#
#
#
codecov-finish:
stage: test
extends:
- .kubernetes-env
- .common-refs
- .pipeline-stopper-artifacts
needs:
- test-linux-stable-codecov
script:
- !reference [.codecov-check, script]
- codecovcli -v create-report-results -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --git-service github
- codecovcli -v get-report-results -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --git-service github
- codecovcli -v send-notifications -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --git-service github

#
#
#
test-linux-stable-codecov:
stage: test
needs:
- codecov-start
extends:
- .docker-env
- .common-refs
- .pipeline-stopper-artifacts
variables:
CI_IMAGE: europe-docker.pkg.dev/parity-build/ci-images/ci-unified:bullseye-1.77.0
RUST_TOOLCHAIN: stable
RUSTFLAGS: "-Cdebug-assertions=y -Cinstrument-coverage"
LLVM_PROFILE_FILE: "target/coverage/cargo-test-${CI_NODE_INDEX}-%p-%m.profraw"
CARGO_INCREMENTAL: 0
FORKLIFT_BYPASS: "true"
parallel: 2
script:
# tools
- !reference [.codecov-check, script]
- rustup component add llvm-tools-preview
- mkdir -p target/coverage/result/
# Place real test call here
- >
time cargo nextest run -p polkadot \
--locked \
--release \
--no-fail-fast \
--partition count:${CI_NODE_INDEX}/${CI_NODE_TOTAL}
# generate and upload reports
- >
grcov \
target/coverage/ \
--binary-path ./target/release/ \
-s . \
-t lcov \
--branch \
-o target/coverage/result/report-${CI_NODE_INDEX}.lcov
- ls -l target/coverage/result/
- >
if [ "$CI_COMMIT_REF_NAME" != "master" ]; then
codecovcli -v do-upload -f target/coverage/result/report-${CI_NODE_INDEX}.lcov --disable-search -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --pr ${CI_COMMIT_REF_NAME} --git-service github;
else
codecovcli -v do-upload -f target/coverage/result/report-${CI_NODE_INDEX}.lcov --disable-search -t ${CODECOV_TOKEN} -r paritytech/polkadot-sdk --commit-sha ${CI_COMMIT_SHA} --fail-on-error --git-service github;
fi
#

test-linux-stable:
stage: test
extends:
Expand Down
Loading

0 comments on commit 446be3e

Please sign in to comment.