Skip to content

Commit

Permalink
Merge branch 'master' into alexaggh/pvf_execution_analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
alexggh authored May 8, 2024
2 parents 29a8d35 + c3e57c1 commit 08288a2
Show file tree
Hide file tree
Showing 404 changed files with 15,590 additions and 3,687 deletions.
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
1 change: 1 addition & 0 deletions .github/env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"
81 changes: 81 additions & 0 deletions .github/workflows/quick-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Checks that doesn't require heavy lifting, like formatting, linting, etc.
name: quick-checks

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
set-image:
# GitHub Actions allows using 'env' in a container context.
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
# This workaround sets the container image for each job using 'set-image' job output.
runs-on: arc-runners-polkadot-sdk-default
timeout-minutes: 10
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
fmt:
runs-on: arc-runners-polkadot-sdk-default
timeout-minutes: 10
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Cargo fmt
run: cargo +nightly fmt --all -- --check
check-dependency-rules:
runs-on: arc-runners-polkadot-sdk-default
timeout-minutes: 10
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: check dependency rules
run: |
cd substrate/
../.gitlab/ensure-deps.sh
check-rust-feature-propagation:
runs-on: arc-runners-polkadot-sdk-default
# runs-on: ubuntu-latest
timeout-minutes: 10
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: run zepter
run: zepter run check
test-rust-features:
runs-on: arc-runners-polkadot-sdk-default
# runs-on: ubuntu-latest
timeout-minutes: 10
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: run rust features
run: bash .gitlab/rust-features.sh .
check-toml-format:
runs-on: arc-runners-polkadot-sdk-default
timeout-minutes: 10
needs: [set-image]
container:
image: ${{ needs.set-image.outputs.IMAGE }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: check toml format
run: |
taplo format --check --config .config/taplo.toml
echo "Please run `taplo format --config .config/taplo.toml` to fix any toml formatting issues"
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}}
27 changes: 19 additions & 8 deletions .github/workflows/test-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_NET_GIT_FETCH_WITH_CLI: true

jobs:
set-image:
# GitHub Actions allows using 'env' in a container context.
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
# This workaround sets the container image for each job using 'set-image' job output.
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
test-linux-stable-int:
runs-on: arc-runners-polkadot-sdk
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
needs: [set-image]
container:
image: "docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"
image: ${{ needs.set-image.outputs.IMAGE }}
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: 1
Expand All @@ -30,10 +40,11 @@ jobs:
- name: script
run: WASM_BUILD_NO_COLOR=1 time cargo test -p staging-node-cli --release --locked -- --ignored
quick-benchmarks:
runs-on: arc-runners-polkadot-sdk
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
needs: [set-image]
container:
image: "docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"
image: ${{ needs.set-image.outputs.IMAGE }}
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
Expand All @@ -43,4 +54,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
run: time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
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
8 changes: 8 additions & 0 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ zombienet-polkadot-elastic-scaling-0002-elastic-scaling-doesnt-break-parachains:
--local-dir="${LOCAL_DIR}/elastic_scaling"
--test="0002-elastic-scaling-doesnt-break-parachains.zndsl"

zombienet-polkadot-functional-0012-spam-statement-distribution-requests:
extends:
- .zombienet-polkadot-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0012-spam-statement-distribution-requests.zndsl"

zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
Expand Down
Loading

0 comments on commit 08288a2

Please sign in to comment.