Skip to content

Commit

Permalink
Merge branch 'master' into umbrella-authorship
Browse files Browse the repository at this point in the history
  • Loading branch information
runcomet authored Dec 28, 2024
2 parents 070abd6 + b7afe48 commit 2db70e9
Show file tree
Hide file tree
Showing 1,061 changed files with 25,103 additions and 16,000 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ rustdocflags = [
CC_x86_64_unknown_linux_musl = { value = ".cargo/musl-gcc", force = true, relative = true }
CXX_x86_64_unknown_linux_musl = { value = ".cargo/musl-g++", force = true, relative = true }
CARGO_WORKSPACE_ROOT_DIR = { value = "", relative = true }

[net]
retry = 5
# git-fetch-with-cli = true # commented because there is a risk that a runner can be banned by github
7 changes: 7 additions & 0 deletions .config/taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ keys = ["workspace.dependencies"]

[rule.formatting]
reorder_keys = true

[[rule]]
include = ["**/Cargo.toml"]
keys = ["build-dependencies", "dependencies", "dev-dependencies"]

[rule.formatting]
reorder_keys = true
1 change: 0 additions & 1 deletion .github/scripts/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ fetch_release_artifacts_from_s3() {
pwd
ls -al --color
popd > /dev/null
unset OUTPUT_DIR
}

# Pass the name of the binary as input, it will
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/build-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./.github/workflows/reusable-preflight.yml

build-runtimes-polkavm:
timeout-minutes: 20
timeout-minutes: 60
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
container:
Expand All @@ -38,11 +38,7 @@ jobs:
env:
SUBSTRATE_RUNTIME_TARGET: riscv
id: required
run: |
forklift cargo check -p minimal-template-runtime
forklift cargo check -p westend-runtime
forklift cargo check -p rococo-runtime
forklift cargo check -p polkadot-test-runtime
run: forklift cargo check -p minimal-template-runtime -p westend-runtime -p rococo-runtime -p polkadot-test-runtime
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: install parity-publish
# Set the target dir to cache the build.
run: CARGO_TARGET_DIR=./target/ cargo install [email protected].2 --locked -q
run: CARGO_TARGET_DIR=./target/ cargo install [email protected].3 --locked -q

- name: check semver
run: |
Expand Down
46 changes: 38 additions & 8 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2.1.0
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.CMD_BOT_APP_ID }}
private_key: ${{ secrets.CMD_BOT_APP_KEY }}
app-id: ${{ secrets.CMD_BOT_APP_ID }}
private-key: ${{ secrets.CMD_BOT_APP_KEY }}

- name: Check if user is a member of the organization
id: is-member
Expand Down Expand Up @@ -292,9 +292,17 @@ jobs:
image: ${{ needs.set-image.outputs.IMAGE }}
timeout-minutes: 1440 # 24 hours per runtime
steps:
- name: Generate token
uses: actions/create-github-app-token@v1
id: generate_token
with:
app-id: ${{ secrets.CMD_BOT_APP_ID }}
private-key: ${{ secrets.CMD_BOT_APP_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
repository: ${{ needs.get-pr-branch.outputs.repo }}
ref: ${{ needs.get-pr-branch.outputs.pr-branch }}

Expand Down Expand Up @@ -392,19 +400,41 @@ jobs:
name: command-output
path: /tmp/cmd/command_output.log

# Generate token for commit, as the earlier token expires after 1 hour, while cmd can take longer
- name: Generate token for commit
uses: actions/create-github-app-token@v1
id: generate_token_commit
with:
app-id: ${{ secrets.CMD_BOT_APP_ID }}
private-key: ${{ secrets.CMD_BOT_APP_KEY }}

- name: Commit changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git config --global user.name command-bot
git config --global user.email "<>"
git config --global pull.rebase false
# Push the results to the target branch
git remote add \
github \
"https://x-access-token:${{ steps.generate_token_commit.outputs.token }}@github.com/${{ needs.get-pr-branch.outputs.repo }}.git" || :
push_changes() {
git push github "HEAD:${{ needs.get-pr-branch.outputs.pr-branch }}"
}
git add .
git restore --staged Cargo.lock # ignore changes in Cargo.lock
git commit -m "Update from ${{ github.actor }} running command '${{ steps.get-pr-comment.outputs.group2 }}'" || true
git pull --rebase origin ${{ needs.get-pr-branch.outputs.pr-branch }}
git push origin ${{ needs.get-pr-branch.outputs.pr-branch }}
# Attempt to push changes
if ! push_changes; then
echo "Push failed, trying to rebase..."
git pull --rebase github "${{ needs.get-pr-branch.outputs.pr-branch }}"
# After successful rebase, try pushing again
push_changes
fi
else
echo "Nothing to commit";
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-check-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
preflight:
uses: ./.github/workflows/reusable-preflight.yml

check-publish:
check-publish-compile:
timeout-minutes: 90
needs: [preflight]
runs-on: ${{ needs.preflight.outputs.RUNNER }}
Expand All @@ -31,7 +31,7 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected].2 --locked -q
run: cargo install [email protected].3 --locked -q

- name: parity-publish update plan
run: parity-publish --color always plan --skip-check --prdoc prdoc/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-check-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected].2 --locked -q
run: cargo install [email protected].3 --locked -q

- name: parity-publish check
run: parity-publish --color always check --allow-unpublished
2 changes: 1 addition & 1 deletion .github/workflows/publish-claim-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
cache-on-failure: true

- name: install parity-publish
run: cargo install [email protected].2 --locked -q
run: cargo install [email protected].3 --locked -q

- name: parity-publish claim
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-50_publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ on:
required: true

stable_tag:
description: Tag matching the actual stable release version in the format stableYYMM or stableYYMM-X for patch releases
description: Tag matching the actual stable release version in the format polkadpt-stableYYMM(-rcX) or plkadot-stableYYMM-X(-rcX) for patch releases
required: true

permissions:
Expand Down Expand Up @@ -311,9 +311,9 @@ jobs:
# TODO: The owner should be used below but buildx does not resolve the VARs
# TODO: It would be good to get rid of this GHA that we don't really need.
tags: |
egorpop/polkadot:${{ steps.fetch-data.outputs.stable }}
egorpop/polkadot:latest
egorpop/polkadot:${{ needs.fetch-latest-debian-package-version.outputs.polkadot_container_tag }}
parity/polkadot:${{ steps.fetch-data.outputs.stable }}
parity/polkadot:latest
parity/polkadot:${{ needs.fetch-latest-debian-package-version.outputs.polkadot_container_tag }}
build-args: |
VCS_REF=${{ github.ref }}
POLKADOT_VERSION=${{ needs.fetch-latest-debian-package-version.outputs.polkadot_apt_version }}
Expand Down
30 changes: 30 additions & 0 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
LOCAL_SDK_TEST: "/builds/parity/mirrors/polkadot-sdk/polkadot/zombienet-sdk-tests"
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
RUN_IN_CONTAINER: "1"
# don't retry sdk tests
NEXTEST_RETRIES: 0
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
Expand Down Expand Up @@ -190,6 +192,7 @@ zombienet-polkadot-elastic-scaling-0001-basic-3cores-6s-blocks:
--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
Expand Down Expand Up @@ -252,6 +255,17 @@ zombienet-polkadot-functional-0018-shared-core-idle-parachain:
--local-dir="${LOCAL_DIR}/functional"
--test="0018-shared-core-idle-parachain.zndsl"

zombienet-polkadot-functional-0019-coretime-collation-fetching-fairness:
extends:
- .zombienet-polkadot-common
before_script:
- !reference [ .zombienet-polkadot-common, before_script ]
- cp --remove-destination ${LOCAL_DIR}/assign-core.js ${LOCAL_DIR}/functional
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0019-coretime-collation-fetching-fairness.zndsl"

zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
Expand Down Expand Up @@ -386,3 +400,19 @@ zombienet-polkadot-malus-0001-dispute-valid:
- unset NEXTEST_FAILURE_OUTPUT
- unset NEXTEST_SUCCESS_OUTPUT
- cargo nextest run --archive-file ./artifacts/polkadot-zombienet-tests.tar.zst --no-capture -- smoke::coretime_revenue::coretime_revenue_test

zombienet-polkadot-elastic-scaling-slot-based-3cores:
extends:
- .zombienet-polkadot-common
needs:
- job: build-polkadot-zombienet-tests
artifacts: true
before_script:
- !reference [ ".zombienet-polkadot-common", "before_script" ]
- export POLKADOT_IMAGE="${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
- export CUMULUS_IMAGE="docker.io/paritypr/test-parachain:${PIPELINE_IMAGE_TAG}"
script:
# we want to use `--no-capture` in zombienet tests.
- unset NEXTEST_FAILURE_OUTPUT
- unset NEXTEST_SUCCESS_OUTPUT
- cargo nextest run --archive-file ./artifacts/polkadot-zombienet-tests.tar.zst --no-capture -- elastic_scaling::slot_based_3cores::slot_based_3cores_test
Loading

0 comments on commit 2db70e9

Please sign in to comment.