Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
38a01f3c
Commit
38a01f3c
authored
5 years ago
by
gabriel klawitter
Committed by
Gavin Wood
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ci: fix runtime version check (#4741)
parent
f39335d6
Branches
gh-readonly-queue/master/pr-7243-7b0ac746e4fc26a9959b0dc1aeac2db32d3f289f
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/.maintain/gitlab/check_runtime.sh
+14
-17
14 additions, 17 deletions
substrate/.maintain/gitlab/check_runtime.sh
with
14 additions
and
17 deletions
substrate/.maintain/gitlab/check_runtime.sh
+
14
−
17
View file @
38a01f3c
...
@@ -9,11 +9,12 @@
...
@@ -9,11 +9,12 @@
set
-e
# fail on any error
set
-e
# fail on any error
# give some context
git log
--graph
--oneline
--decorate
=
short
-n
10
VERSIONS_FILE
=
"bin/node/runtime/src/lib.rs"
VERSIONS_FILE
=
"bin/node/runtime/src/lib.rs"
boldprint
()
{
printf
"|
\n
|
\0
33[1m
${
@
}
\0
33[0m
\n
|
\n
"
;
}
boldcat
()
{
printf
"|
\n
"
;
while
read
l
;
do
printf
"|
\0
33[1m
${
l
}
\0
33[0m
\n
"
;
done
;
printf
"|
\n
"
;
}
github_label
()
{
github_label
()
{
echo
echo
echo
"# run github-api job for labeling it
${
1
}
"
echo
"# run github-api job for labeling it
${
1
}
"
...
@@ -26,21 +27,19 @@ github_label () {
...
@@ -26,21 +27,19 @@ github_label () {
}
}
boldprint
"latest 10 commits of
${
CI_COMMIT_REF_NAME
}
"
git log
--graph
--oneline
--decorate
=
short
-n
10
boldprint
"make sure the master branch is available in shallow clones"
git fetch
--depth
=
${
GIT_DEPTH
:-
100
}
origin master
git fetch
--depth
=
${
GIT_DEPTH
:-
100
}
origin master
# check if master is part of this checkout
if
!
git log
-n
1 origin/master
then
echo
"unable to check for runtime changes: checkout does not contain origin/master branch"
exit
3
fi
#
check if the wasm sources changed
boldprint
"
check if the wasm sources changed
"
if
!
git diff
--name-only
origin/master...
${
CI_COMMIT_SHA
}
\
if
!
git diff
--name-only
origin/master...
${
CI_COMMIT_SHA
}
\
|
grep
-q
-e
'^bin/node/src/runtime'
-e
'^frame/'
-e
'^primitives/sr-'
|
grep
-v
-e
'^primitives/sr-arithmetic/fuzzer'
|
grep
-v
-e
'^primitives/sr-arithmetic/fuzzer'
\
|
grep
-q
-e
'^bin/node/src/runtime'
-e
'^frame/'
-e
'^primitives/sr-'
then
then
cat
<<-
EOT
bold
cat
<<-
EOT
no changes to the runtime source code detected
no changes to the runtime source code detected
...
@@ -61,13 +60,13 @@ sub_spec_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
...
@@ -61,13 +60,13 @@ sub_spec_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
|
sed
-n
-r
"s/^
\-
[[:space:]]+spec_version: +([0-9]+),
$/
\1
/p"
)
"
|
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
}
"
]
if
[
"
${
add_spec_version
}
"
!=
"
${
sub_spec_version
}
"
]
then
then
github_label
"B2-breaksapi"
github_label
"B2-breaksapi"
cat
<<-
EOT
bold
cat
<<-
EOT
changes to the runtime sources and changes in the spec version.
changes to the runtime sources and changes in the spec version.
...
@@ -89,7 +88,7 @@ else
...
@@ -89,7 +88,7 @@ else
# see if the impl version changed
# see if the impl version changed
if
[
"
${
add_impl_version
}
"
!=
"
${
sub_impl_version
}
"
]
if
[
"
${
add_impl_version
}
"
!=
"
${
sub_impl_version
}
"
]
then
then
cat
<<-
EOT
bold
cat
<<-
EOT
changes to the runtime sources and changes in the impl version.
changes to the runtime sources and changes in the impl version.
...
@@ -100,7 +99,7 @@ else
...
@@ -100,7 +99,7 @@ else
fi
fi
cat
<<-
EOT
bold
cat
<<-
EOT
wasm source files changed but not the spec/impl version and the runtime
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'.
binary blob. If changes made do not alter logic, just bump 'impl_version'.
...
@@ -114,8 +113,6 @@ else
...
@@ -114,8 +113,6 @@ else
versions file:
${
VERSIONS_FILE
}
versions file:
${
VERSIONS_FILE
}
EOT
EOT
# drop through into pushing `gotissues` and exit 1...
fi
fi
# dropped through. there's something wrong; exit 1.
# dropped through. there's something wrong; exit 1.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment