-
Notifications
You must be signed in to change notification settings - Fork 798
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 umbrella-authority-discovery
- Loading branch information
Showing
1,260 changed files
with
31,771 additions
and
18,326 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
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
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,111 @@ | ||
name: Networking Benchmarks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
preflight: | ||
uses: ./.github/workflows/reusable-preflight.yml | ||
|
||
build: | ||
timeout-minutes: 50 | ||
needs: [preflight] | ||
runs-on: ${{ needs.preflight.outputs.RUNNER_BENCHMARK }} | ||
container: | ||
image: ${{ needs.preflight.outputs.IMAGE }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
features: | ||
[ | ||
{ bench: "notifications_protocol" }, | ||
{ bench: "request_response_protocol" }, | ||
] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Benchmarks | ||
id: run-benchmarks | ||
run: | | ||
mkdir -p ./charts | ||
forklift cargo bench -p sc-network --bench ${{ matrix.features.bench }} -- --output-format bencher | grep "^test" | tee ./charts/${{ matrix.features.bench }}.txt || echo "Benchmarks failed" | ||
ls -lsa ./charts | ||
- name: Upload artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.features.bench }}-${{ github.sha }} | ||
path: ./charts | ||
|
||
publish-benchmarks: | ||
timeout-minutes: 60 | ||
needs: [build] | ||
if: github.ref == 'refs/heads/master' | ||
environment: subsystem-benchmarks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
fetch-depth: 0 | ||
|
||
- run: git checkout master -- | ||
|
||
- name: Download artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: notifications_protocol-${{ github.sha }} | ||
path: ./charts | ||
|
||
- name: Download artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: request_response_protocol-${{ github.sha }} | ||
path: ./charts | ||
|
||
- name: Setup git | ||
run: | | ||
# Fixes "detected dubious ownership" error in the ci | ||
git config --global --add safe.directory '*' | ||
ls -lsR ./charts | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ secrets.POLKADOTSDK_GHPAGES_APP_ID }} | ||
private-key: ${{ secrets.POLKADOTSDK_GHPAGES_APP_KEY }} | ||
|
||
- name: Generate ${{ env.BENCH }} | ||
env: | ||
BENCH: notifications_protocol | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
tool: "cargo" | ||
name: ${{ env.BENCH }} | ||
output-file-path: ./charts/${{ env.BENCH }}.txt | ||
benchmark-data-dir-path: ./bench/${{ env.BENCH }} | ||
github-token: ${{ steps.app-token.outputs.token }} | ||
auto-push: true | ||
|
||
- name: Generate ${{ env.BENCH }} | ||
env: | ||
BENCH: request_response_protocol | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
tool: "cargo" | ||
name: ${{ env.BENCH }} | ||
output-file-path: ./charts/${{ env.BENCH }}.txt | ||
benchmark-data-dir-path: ./bench/${{ env.BENCH }} | ||
github-token: ${{ steps.app-token.outputs.token }} | ||
auto-push: true |
File renamed without changes.
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Check semver | |
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
workflow_dispatch: | ||
merge_group: | ||
|
||
|
@@ -62,21 +62,29 @@ jobs: | |
echo "PRDOC_EXTRA_ARGS=--max-bump minor" >> $GITHUB_ENV | ||
- name: Echo Skip | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'R0-silent') }} | ||
run: echo "Skipping this PR because it is labeled as R0-silent." | ||
|
||
- name: Rust Cache | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} | ||
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Rust compilation prerequisites | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} | ||
run: | | ||
rustup default $TOOLCHAIN | ||
rustup component add rust-src --toolchain $TOOLCHAIN | ||
- name: install parity-publish | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} | ||
# 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 | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} | ||
run: | | ||
if [ -z "$PR" ]; then | ||
echo "Skipping master/merge queue" | ||
|
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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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 }} | ||
|
||
|
@@ -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 | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ on: | |
required: true | ||
options: | ||
- "TODO" | ||
- "no_change" | ||
- "none" | ||
- "patch" | ||
- "minor" | ||
- "major" | ||
|
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
Oops, something went wrong.