-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into change-fork-calculation
- Loading branch information
Showing
1,427 changed files
with
91,098 additions
and
34,169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# If there are new issues related to the async backing feature, | ||
# add it to the parachain team's board and set a custom "meta" field. | ||
|
||
name: Add selected issues to Parachain team board | ||
on: | ||
issues: | ||
types: | ||
- labeled | ||
|
||
jobs: | ||
add-parachain-issues: | ||
if: github.event.label.name == 'T16-async_backing' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: tibdex/[email protected] | ||
with: | ||
app_id: ${{ secrets.PROJECT_APP_ID }} | ||
private_key: ${{ secrets.PROJECT_APP_KEY }} | ||
- name: Sync issues | ||
uses: paritytech/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PROJECT_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
project: 119 # Parachain team board | ||
project_field: 'meta' | ||
project_value: 'async backing' | ||
labels: | | ||
T16-async_backing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
name: Release - Publish draft | ||
|
||
on: | ||
push: | ||
tags: | ||
# Catches v1.2.3 and v1.2.3-rc1 | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Current release/rc version | ||
|
||
jobs: | ||
get-rust-versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
rustc-stable: ${{ steps.get-rust-versions.outputs.stable }} | ||
steps: | ||
- id: get-rust-versions | ||
run: | | ||
RUST_STABLE_VERSION=$(curl -sS https://raw.githubusercontent.com/paritytech/scripts/master/dockerfiles/ci-unified/Dockerfile | grep -oP 'ARG RUST_STABLE_VERSION=\K[^ ]+') | ||
echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT | ||
build-runtimes: | ||
uses: "./.github/workflows/srtool.yml" | ||
with: | ||
excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" | ||
|
||
publish-release-draft: | ||
runs-on: ubuntu-latest | ||
needs: [get-rust-versions, build-runtimes] | ||
outputs: | ||
release_url: ${{ steps.create-release.outputs.html_url }} | ||
asset_upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | ||
|
||
- name: Prepare tooling | ||
run: | | ||
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb | ||
wget $URL -O tera.deb | ||
sudo dpkg -i tera.deb | ||
- name: Download artifacts | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
|
||
- name: Prepare draft | ||
id: draft | ||
env: | ||
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json | ||
ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json | ||
BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json | ||
BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json | ||
COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json | ||
CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json | ||
CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json | ||
CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json | ||
GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json | ||
PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json | ||
PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json | ||
ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json | ||
WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json | ||
run: | | ||
. ./.github/scripts/common/lib.sh | ||
export REF1=$(get_latest_release_tag) | ||
if [[ -z "${{ inputs.version }}" ]]; then | ||
export REF2="${{ github.ref_name }}" | ||
else | ||
export REF2="${{ inputs.version }}" | ||
fi | ||
echo "REL_TAG=$REF2" >> $GITHUB_ENV | ||
export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') | ||
./scripts/release/build-changelogs.sh | ||
- name: Archive artifact context.json | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
with: | ||
name: release-notes-context | ||
path: | | ||
scripts/release/context.json | ||
**/*-srtool-digest.json | ||
- name: Create draft release | ||
id: create-release | ||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.REL_TAG }} | ||
release_name: Polkadot ${{ env.REL_TAG }} | ||
body_path: ${{ github.workspace}}/scripts/release/RELEASE_DRAFT.md | ||
draft: true | ||
|
||
publish-runtimes: | ||
needs: [ build-runtimes, publish-release-draft ] | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: ${{ fromJSON(needs.build-runtimes.outputs.published_runtimes) }} | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
|
||
- name: Get runtime info | ||
env: | ||
JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json | ||
run: | | ||
>>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime -name '*.compact.compressed.wasm') | ||
>>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) | ||
- name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm | ||
if: ${{ matrix.chain != 'rococo-parachain' }} | ||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} | ||
asset_path: ${{ env.ASSET }} | ||
asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm | ||
asset_content_type: application/wasm | ||
|
||
post_to_matrix: | ||
runs-on: ubuntu-latest | ||
needs: publish-release-draft | ||
environment: release | ||
strategy: | ||
matrix: | ||
channel: | ||
- name: "Team: RelEng Internal" | ||
room: '!GvAyzgCDgaVrvibaAF:parity.io' | ||
|
||
steps: | ||
- name: Send Matrix message to ${{ matrix.channel.name }} | ||
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 | ||
with: | ||
room_id: ${{ matrix.channel.room }} | ||
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }} | ||
server: m.parity.io | ||
message: | | ||
**New version of polkadot tagged**: ${{ github.ref_name }}<br/> | ||
Draft release created: ${{ needs.publish-release-draft.outputs.release_url }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,28 +5,41 @@ on: | |
- Review-Trigger | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
inputs: | ||
pr-number: | ||
description: "Number of the PR to evaluate" | ||
required: true | ||
type: number | ||
|
||
jobs: | ||
review-approvals: | ||
runs-on: ubuntu-latest | ||
environment: master | ||
steps: | ||
- name: Generate token | ||
id: app_token | ||
uses: actions/[email protected] | ||
with: | ||
app-id: ${{ secrets.REVIEW_APP_ID }} | ||
private-key: ${{ secrets.REVIEW_APP_KEY }} | ||
- name: Extract content of artifact | ||
if: ${{ !inputs.pr-number }} | ||
id: number | ||
uses: Bullrich/[email protected].0 | ||
uses: Bullrich/[email protected].1 | ||
with: | ||
artifact-name: pr_number | ||
- name: Generate token | ||
id: app_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.REVIEW_APP_ID }} | ||
private_key: ${{ secrets.REVIEW_APP_KEY }} | ||
- name: "Evaluates PR reviews and assigns reviewers" | ||
uses: paritytech/[email protected] | ||
with: | ||
repo-token: ${{ steps.app_token.outputs.token }} | ||
team-token: ${{ steps.app_token.outputs.token }} | ||
checks-token: ${{ steps.app_token.outputs.token }} | ||
pr-number: ${{ steps.number.outputs.content }} | ||
# This is extracted from the triggering event | ||
pr-number: ${{ inputs.pr-number || steps.number.outputs.content }} | ||
request-reviewers: true | ||
- name: Log payload | ||
if: ${{ failure() || runner.debug }} | ||
run: echo "::debug::$payload" | ||
env: | ||
payload: ${{ toJson(github.event) }} |
Oops, something went wrong.