Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into gui-assets-revoke-t…
Browse files Browse the repository at this point in the history
…hrough-status
  • Loading branch information
gui1117 committed Sep 6, 2024
2 parents 6594d94 + 8d81f1e commit 04bd5ae
Show file tree
Hide file tree
Showing 676 changed files with 32,518 additions and 18,638 deletions.
7 changes: 5 additions & 2 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ accept = [
"429",
]

exclude_path = ["./target"]
exclude_path = [
"./prdoc",
"./target",
]

exclude = [
# Place holders (no need to fix these):
Expand All @@ -32,7 +35,6 @@ exclude = [
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot-try-runtime-node.parity-chains.parity.io/",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
Expand All @@ -41,6 +43,7 @@ exclude = [
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
"https://rpc.polkadot.io/",
"https://try-runtime.polkadot.io/",
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
/substrate/primitives/merkle-mountain-range/ @acatangiu

# Contracts
/substrate/frame/contracts/ @athei @paritytech/docs-audit
/substrate/frame/contracts/ @paritytech/smart-contracts @paritytech/docs-audit
/substrate/frame/revive/ @paritytech/smart-contracts @paritytech/docs-audit

# NPoS and election
/substrate/frame/election-provider-multi-phase/ @paritytech/staking-core @paritytech/docs-audit
Expand Down
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

This file was deleted.

47 changes: 47 additions & 0 deletions .github/actions/build-push-image/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'build and push image'
inputs:
dockerfile:
description: "dockerfile to build"
required: true
image-name:
description: ""
required: true
outputs:
branch:
description: 'Branch name for the PR'
value: ${{ steps.branch.outputs.branch }}


runs:
using: "composite"
steps:

# gcloud
# https://github.com/paritytech/ci_cd/wiki/GitHub:-Push-Docker-image-to-GCP-Registry
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
- name: "gcloud info"
shell: bash
run: "gcloud info"
- name: "Auth in gcloud registry"
shell: bash
run: "gcloud auth configure-docker europe-docker.pkg.dev --quiet"

- name: build
shell: bash
env:
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.105"
run: |
export BRANCH_NAME=${{ github.head_ref || github.ref_name }}
export DOCKER_IMAGES_VERSION=${BRANCH_NAME/\//-}
if [[ ${{ github.event_name }} == "merge_group" ]]; then export DOCKER_IMAGES_VERSION="${GITHUB_SHA::8}"; fi
docker build \
--build-arg VCS_REF="${GITHUB_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--build-arg IMAGE_NAME="${{ inputs.image-name }}" \
--build-arg ZOMBIENET_IMAGE="${ZOMBIENET_IMAGE}" \
-t "${{ inputs.image-name }}:$DOCKER_IMAGES_VERSION" \
-f ${{ inputs.dockerfile }} \
.
docker push "${{ inputs.image-name }}:$DOCKER_IMAGES_VERSION"
15 changes: 15 additions & 0 deletions .github/actions/set-up-mac/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How to use

```yml
set-image:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
- name: Install dependencies
uses: ./.github/actions/set-up-mac
with:
IMAGE: ${{ steps.set-image.outputs.IMAGE }}
```
43 changes: 43 additions & 0 deletions .github/actions/set-up-mac/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Set up rust on mac"
description: "Install the required tools for Mac runners"
inputs:
IMAGE:
description: "Rust docker image"
required: true
runs:
using: "composite"
steps:
- name: Install with Hombrew
shell: bash
run: brew install protobuf rustup openssl pkg-config zlib xz zstd llvm jq curl gcc make cmake
- name: Set version
shell: bash
run: |
VERSION=$(echo $IMAGE | sed -E 's/.*:bullseye-([^-]+)-.*/\1/')
echo $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
NIGHTLY=$(echo $IMAGE | sed -E 's/.*([0-9]{4}-[0-9]{2}-[0-9]{2}).*/\1/')
echo $NIGHTLY
echo "NIGHTLY=$NIGHTLY" >> $GITHUB_ENV
env:
IMAGE: ${{ inputs.IMAGE }}

- name: Install rustup
shell: bash
run: |
rustup-init -y
rustup install $VERSION
rustup default $VERSION
rustup toolchain install "nightly-${NIGHTLY}"
- name: MacOS Deps
shell: bash
run: |
rustup target add wasm32-unknown-unknown --toolchain $VERSION
rustup component add rust-src rustfmt clippy --toolchain $VERSION
- name: Check Rust
shell: bash
run: |
rustup show
rustup +nightly show
8 changes: 7 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ coverage:
project:
default:
target: 1.0
threshold: 2.0
threshold: 2.0

comment:
behavior: new

fixes:
- "/__w/polkadot-sdk/polkadot-sdk/::"
Binary file removed .github/command-screnshot.png
Binary file not shown.
Loading

0 comments on commit 04bd5ae

Please sign in to comment.