-
Notifications
You must be signed in to change notification settings - Fork 747
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 coretime-sale-id
- Loading branch information
Showing
501 changed files
with
28,403 additions
and
16,288 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,28 @@ | ||
name: "stop all workflows" | ||
description: "Action stops all workflows in a PR to save compute resources." | ||
inputs: | ||
app-id: | ||
description: "App id" | ||
required: true | ||
app-key: | ||
description: "App token" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Worfklow stopper - Generate token | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ inputs.app-id }} | ||
private-key: ${{ inputs.app-key }} | ||
owner: "paritytech" | ||
repositories: "workflow-stopper" | ||
- name: Workflow stopper - Stop all workflows | ||
uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/paritytech/workflow-stopper/actions/workflows/stopper.yml/dispatches | ||
ref: main | ||
inputs: '${{ format(''{{ "github_sha": "{0}", "github_repository": "{1}", "github_ref_name": "{2}", "github_workflow_id": "{3}", "github_job_name": "{4}" }}'', github.event.pull_request.head.sha, github.repository, github.ref_name, github.run_id, github.job) }}' | ||
env: | ||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} |
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,36 @@ | ||
#!/bin/bash | ||
echo "Running script relative to `pwd`" | ||
# Find all README.docify.md files | ||
DOCIFY_FILES=$(find . -name "README.docify.md") | ||
|
||
# Initialize a variable to track directories needing README regeneration | ||
NEED_REGENERATION="" | ||
|
||
for file in $DOCIFY_FILES; do | ||
echo "Processing $file" | ||
|
||
# Get the directory containing the docify file | ||
DIR=$(dirname "$file") | ||
|
||
# Go to the directory and run cargo build | ||
cd "$DIR" | ||
cargo check --features generate-readme || { echo "Readme generation for $DIR failed. Ensure the crate compiles successfully and has a `generate-readme` feature which guards markdown compilation in the crate as follows: https://docs.rs/docify/latest/docify/macro.compile_markdown.html#conventions." && exit 1; } | ||
|
||
# Check if README.md has any uncommitted changes | ||
git diff --exit-code README.md | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Error: Found uncommitted changes in $DIR/README.md" | ||
NEED_REGENERATION="$NEED_REGENERATION $DIR" | ||
fi | ||
|
||
# Return to the original directory | ||
cd - > /dev/null | ||
done | ||
|
||
# Check if any directories need README regeneration | ||
if [ -n "$NEED_REGENERATION" ]; then | ||
echo "The following directories need README regeneration:" | ||
echo "$NEED_REGENERATION" | ||
exit 1 | ||
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
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,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is used to build our binaries: | ||
# - polkadot | ||
# - polkadot-parachain | ||
# - polkadot-omni-node | ||
# set -e | ||
|
||
BIN=$1 | ||
PACKAGE=${2:-$BIN} | ||
|
||
PROFILE=${PROFILE:-production} | ||
# parity-macos runner needs a path where it can | ||
# write, so make it relative to github workspace. | ||
ARTIFACTS=$GITHUB_WORKSPACE/artifacts/$BIN | ||
VERSION=$(git tag -l --contains HEAD | grep -E "^v.*") | ||
|
||
echo "Artifacts will be copied into $ARTIFACTS" | ||
mkdir -p "$ARTIFACTS" | ||
|
||
git log --pretty=oneline -n 1 | ||
time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE | ||
|
||
echo "Artifact target: $ARTIFACTS" | ||
|
||
cp ./target/$PROFILE/$BIN "$ARTIFACTS" | ||
pushd "$ARTIFACTS" > /dev/null | ||
sha256sum "$BIN" | tee "$BIN.sha256" | ||
|
||
EXTRATAG="$($ARTIFACTS/$BIN --version | | ||
sed -n -r 's/^'$BIN' ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p')" | ||
|
||
EXTRATAG="${VERSION}-${EXTRATAG}-$(cut -c 1-8 $ARTIFACTS/$BIN.sha256)" | ||
|
||
echo "$BIN version = ${VERSION} (EXTRATAG = ${EXTRATAG})" | ||
echo -n ${VERSION} > "$ARTIFACTS/VERSION" | ||
echo -n ${EXTRATAG} > "$ARTIFACTS/EXTRATAG" |
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
Oops, something went wrong.