Skip to content

Commit

Permalink
Merge pull request #56 from CherryNetwork/mainnet-upgrade-to-v0.9.38
Browse files Browse the repository at this point in the history
Mainnet upgrade to v0.9.38
  • Loading branch information
zycon91 authored Dec 10, 2023
2 parents 9b12e0c + baccf96 commit ddc0abb
Show file tree
Hide file tree
Showing 486 changed files with 24,300 additions and 10,857 deletions.
5 changes: 3 additions & 2 deletions .github/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ rules:
condition:
include: .*
# excluding files from 'Runtime files' and 'CI files' rules
exclude: ^runtime/(kusama|polkadot)/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
exclude: ^runtime/(kusama|polkadot)/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^(?!.*\.dic$|.*spellcheck\.toml$)scripts/ci/.*|^\.github/.*
min_approvals: 2
teams:
- core-devs

- name: CI files
check_type: changed_files
condition:
include: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
# dictionary files are excluded
include: ^\.gitlab-ci\.yml|^(?!.*\.dic$|.*spellcheck\.toml$)scripts/ci/.*|^\.github/.*
min_approvals: 2
teams:
- ci
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/auto-label-prs.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/check-D-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Check D labels

on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]
paths:
- runtime/polkadot/**
- runtime/kusama/**
- runtime/common/**
- primitives/src/**

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- name: Pull image
env:
IMAGE: paritytech/ruled_labels:0.4.0
run: docker pull $IMAGE

- name: Check labels
env:
IMAGE: paritytech/ruled_labels:0.4.0
MOUNT: /work
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: specs_polkadot.yaml
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
# Clone repo with labels specs
git clone https://github.com/paritytech/labels
# Fetch the labels for the PR under test
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
if [ -z "${labels}" ]; then
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags audit --no-label
fi
labels_args=${labels: :-1}
printf "Checking labels: %s\n" "${labels_args}"
# Prevent the shell from splitting labels with spaces
IFS=","
# --dev is more useful to debug mode to debug
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags audit
40 changes: 31 additions & 9 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,38 @@ jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Pull image
env:
IMAGE: paritytech/ruled_labels:0.4.0
run: docker pull $IMAGE

- name: Check labels
run: bash ${{ github.workspace }}/scripts/ci/github/check_labels.sh
env:
IMAGE: paritytech/ruled_labels:0.4.0
MOUNT: /work
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: specs_polkadot.yaml
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
# Clone repo with labels specs
git clone https://github.com/paritytech/labels
# Fetch the labels for the PR under test
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
if [ -z "${labels}" ]; then
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags PR --no-label
fi
labels_args=${labels: :-1}
printf "Checking labels: %s\n" "${labels_args}"
# Prevent the shell from splitting labels with spaces
IFS=","
# --dev is more useful to debug mode to debug
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags PR
10 changes: 5 additions & 5 deletions .github/workflows/release-10_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
# Get last rc tag if exists, else set it to {version}-rc1
version=${GITHUB_REF#refs/heads/release-}
echo "$version"
echo "::set-output name=version::$version"
echo "version=$version" >> $GITHUB_OUTPUT
git tag -l
last_rc=$(git tag -l "$version-rc*" | sort -V | tail -n 1)
if [ -n "$last_rc" ]; then
suffix=$(echo "$last_rc" | grep -Eo '[0-9]+$')
echo $suffix
((suffix++))
echo $suffix
echo "::set-output name=new_tag::$version-rc$suffix"
echo "::set-output name=first_rc::false"
echo "new_tag=$version-rc$suffix" >> $GITHUB_OUTPUT
echo "first_rc=false" >> $GITHUB_OUTPUT
else
echo "::set-output name=new_tag::$version-rc1"
echo "::set-output name=first_rc::true"
echo "new_tag=$version-rc1" >> $GITHUB_OUTPUT
echo "first_rc=true" >> $GITHUB_OUTPUT
fi
- name: Apply new tag
uses: tvdias/github-tagger@ed7350546e3e503b5e942dffd65bc8751a95e49d # v0.0.2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-30_publish-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
steps:
- id: get-rust-versions
run: |
echo "::set-output name=stable::$(rustc +stable --version)"
echo "::set-output name=nightly::$(rustc +nightly --version)"
echo "stable=$(rustc +stable --version)" >> $GITHUB_OUTPUT
echo "nightly=$(rustc +nightly --version)" >> $GITHUB_OUTPUT
build-runtimes:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
ls "$RUNTIME_DIR/${{ matrix.runtime }}"
runtime_ver=$(ruby script.rb)
echo "Found version: >$runtime_ver<"
echo "::set-output name=runtime_ver::$runtime_ver"
echo "runtime_ver=$runtime_ver" >> $GITHUB_OUTPUT
- name: Upload compressed ${{ matrix.runtime }} wasm
uses: actions/upload-release-asset@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-50_publish-docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Build and push
uses: docker/build-push-action@v2
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-51_publish-docker-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
file: scripts/ci/dockerfiles/polkadot_injected_release.Dockerfile
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ runtime/wasm/target/
.vscode
polkadot.*
!polkadot.service
!.rpm/*
.DS_Store
.env
customSpec.json
Expand Down
Loading

0 comments on commit ddc0abb

Please sign in to comment.