mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 04:28:01 +00:00
Reorganising the repository - external renames and moves (#4074)
* Adding first rough ouline of the repository structure * Remove old CI stuff * add title * formatting fixes * move node-exits job's script to scripts dir * Move docs into subdir * move to bin * move maintainence scripts, configs and helpers into its own dir * add .local to ignore * move core->client * start up 'test' area * move test client * move test runtime * make test move compile * Add dependencies rule enforcement. * Fix indexing. * Update docs to reflect latest changes * Moving /srml->/paint * update docs * move client/sr-* -> primitives/ * clean old readme * remove old broken code in rhd * update lock * Step 1. * starting to untangle client * Fix after merge. * start splitting out client interfaces * move children and blockchain interfaces * Move trie and state-machine to primitives. * Fix WASM builds. * fixing broken imports * more interface moves * move backend and light to interfaces * move CallExecutor * move cli off client * moving around more interfaces * re-add consensus crates into the mix * fix subkey path * relieve client from executor * starting to pull out client from grandpa * move is_decendent_of out of client * grandpa still depends on client directly * lemme tests pass * rename srml->paint * Make it compile. * rename interfaces->client-api * Move keyring to primitives. * fixup libp2p dep * fix broken use * allow dependency enforcement to fail * move fork-tree * Moving wasm-builder * make env * move build-script-utils * fixup broken crate depdencies and names * fix imports for authority discovery * fix typo * update cargo.lock * fixing imports * Fix paths and add missing crates * re-add missing crates
This commit is contained in:
committed by
Bastian Köcher
parent
becc3b0a4f
commit
60e5011c72
@@ -1,52 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# check if line width of rust source files is not beyond x characters
|
||||
#
|
||||
|
||||
|
||||
BASE_BRANCH="origin/master"
|
||||
LINE_WIDTH="121"
|
||||
GOOD_LINE_WIDTH="101"
|
||||
|
||||
|
||||
git diff --name-only ${BASE_BRANCH}...${CI_COMMIT_SHA} \*.rs | ( while read file
|
||||
do
|
||||
if [ ! -f ${file} ];
|
||||
then
|
||||
echo "Skipping removed file."
|
||||
elif git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} | grep -q "^+.\{${LINE_WIDTH}\}"
|
||||
then
|
||||
if [ -z "${FAIL}" ]
|
||||
then
|
||||
echo "| warning!"
|
||||
echo "| Lines should not be longer than 120 characters."
|
||||
echo "| "
|
||||
echo "| see more https://wiki.parity.io/Substrate-Style-Guide"
|
||||
echo "|"
|
||||
FAIL="true"
|
||||
fi
|
||||
echo "| file: ${file}"
|
||||
git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} \
|
||||
| grep -n "^+.\{${LINE_WIDTH}\}"
|
||||
echo "|"
|
||||
else
|
||||
if git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} | grep -q "^+.\{${GOOD_LINE_WIDTH}\}"
|
||||
then
|
||||
if [ -z "${FAIL}" ]
|
||||
then
|
||||
echo "| warning!"
|
||||
echo "| Lines should be longer than 100 characters only in exceptional circumstances!"
|
||||
echo "| "
|
||||
echo "| see more https://wiki.parity.io/Substrate-Style-Guide"
|
||||
echo "|"
|
||||
fi
|
||||
echo "| file: ${file}"
|
||||
git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} \
|
||||
| grep -n "^+.\{${LINE_WIDTH}\}"
|
||||
echo "|"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
test -z "${FAIL}"
|
||||
)
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
# check for any changes in the node/src/runtime, srml/ and core/sr_* trees. if
|
||||
# there are any changes found, it should mark the PR breaksconsensus and
|
||||
# "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file
|
||||
# that alters the version.
|
||||
|
||||
set -e # fail on any error
|
||||
|
||||
|
||||
# give some context
|
||||
git log --graph --oneline --decorate=short -n 10
|
||||
|
||||
|
||||
RUNTIME="node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm"
|
||||
VERSIONS_FILE="node/runtime/src/lib.rs"
|
||||
|
||||
github_label () {
|
||||
echo
|
||||
echo "# run github-api job for labeling it ${1}"
|
||||
curl -sS -X POST \
|
||||
-F "token=${CI_JOB_TOKEN}" \
|
||||
-F "ref=master" \
|
||||
-F "variables[LABEL]=${1}" \
|
||||
-F "variables[PRNO]=${CI_COMMIT_REF_NAME}" \
|
||||
${GITLAB_API}/projects/${GITHUB_API_PROJECT}/trigger/pipeline
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# check if the wasm sources changed
|
||||
if ! git diff --name-only origin/master...${CI_COMMIT_SHA} \
|
||||
| grep -q -e '^node/src/runtime' -e '^srml/' -e '^core/sr-' | grep -v -e '^core/sr-arithmetic/fuzzer'
|
||||
then
|
||||
cat <<-EOT
|
||||
|
||||
no changes to the runtime source code detected
|
||||
|
||||
EOT
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# check for spec_version updates: if the spec versions changed, then there is
|
||||
# consensus-critical logic that has changed. the runtime wasm blobs must be
|
||||
# rebuilt.
|
||||
|
||||
add_spec_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
|
||||
| sed -n -r "s/^\+[[:space:]]+spec_version: +([0-9]+),$/\1/p")"
|
||||
sub_spec_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
|
||||
| sed -n -r "s/^\-[[:space:]]+spec_version: +([0-9]+),$/\1/p")"
|
||||
|
||||
|
||||
# see if the version and the binary blob changed
|
||||
if [ "${add_spec_version}" != "${sub_spec_version}" ]
|
||||
then
|
||||
|
||||
github_label "B2-breaksapi"
|
||||
|
||||
cat <<-EOT
|
||||
|
||||
changes to the runtime sources and changes in the spec version.
|
||||
|
||||
spec_version: ${sub_spec_version} -> ${add_spec_version}
|
||||
|
||||
EOT
|
||||
exit 0
|
||||
|
||||
else
|
||||
# check for impl_version updates: if only the impl versions changed, we assume
|
||||
# there is no consensus-critical logic that has changed.
|
||||
|
||||
add_impl_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
|
||||
| sed -n -r 's/^\+[[:space:]]+impl_version: +([0-9]+),$/\1/p')"
|
||||
sub_impl_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
|
||||
| sed -n -r 's/^\-[[:space:]]+impl_version: +([0-9]+),$/\1/p')"
|
||||
|
||||
|
||||
# see if the impl version changed
|
||||
if [ "${add_impl_version}" != "${sub_impl_version}" ]
|
||||
then
|
||||
cat <<-EOT
|
||||
|
||||
changes to the runtime sources and changes in the impl version.
|
||||
|
||||
impl_version: ${sub_impl_version} -> ${add_impl_version}
|
||||
|
||||
EOT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
cat <<-EOT
|
||||
|
||||
wasm source files changed but not the spec/impl version and the runtime
|
||||
binary blob. If changes made do not alter logic, just bump 'impl_version'.
|
||||
If they do change logic, bump 'spec_version' and rebuild wasm.
|
||||
|
||||
source file directories:
|
||||
- node/src/runtime
|
||||
- srml
|
||||
- core/sr-*
|
||||
|
||||
versions file: ${VERSIONS_FILE}
|
||||
|
||||
EOT
|
||||
|
||||
# drop through into pushing `gotissues` and exit 1...
|
||||
fi
|
||||
|
||||
# dropped through. there's something wrong; exit 1.
|
||||
|
||||
exit 1
|
||||
|
||||
# vim: noexpandtab
|
||||
Reference in New Issue
Block a user