Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
nodes
rust
Duniter v2S
Commits
898ccfc8
Commit
898ccfc8
authored
2 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
upgrade srtool to 1.62
parent
99fb985b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtask/src/release_runtime.rs
+27
-3
27 additions, 3 deletions
xtask/src/release_runtime.rs
with
27 additions
and
3 deletions
xtask/src/release_runtime.rs
+
27
−
3
View file @
898ccfc8
...
@@ -42,13 +42,23 @@ struct SrtoolRuntime {
...
@@ -42,13 +42,23 @@ struct SrtoolRuntime {
#[derive(Default,
Deserialize)]
#[derive(Default,
Deserialize)]
struct
SrtoolRuntimeSubWasm
{
struct
SrtoolRuntimeSubWasm
{
core_version
:
String
,
core_version
:
CoreVersion
,
metadata_version
:
u32
,
metadata_version
:
u32
,
size
:
u32
,
size
:
u32
,
blake2_256
:
String
,
blake2_256
:
String
,
proposal_hash
:
String
,
proposal_hash
:
String
,
}
}
#[derive(Default,
Deserialize)]
#[serde(rename_all
=
"camelCase"
)]
struct
CoreVersion
{
//impl_name: String,
//impl_version: u32,
spec_name
:
String
,
spec_version
:
u32
,
//transaction_version: u32,
}
pub
(
super
)
async
fn
release_runtime
(
spec_version
:
u32
)
->
Result
<
()
>
{
pub
(
super
)
async
fn
release_runtime
(
spec_version
:
u32
)
->
Result
<
()
>
{
// Get current dir
// Get current dir
let
pwd
=
std
::
env
::
current_dir
()
?
let
pwd
=
std
::
env
::
current_dir
()
?
...
@@ -60,6 +70,14 @@ pub(super) async fn release_runtime(spec_version: u32) -> Result<()> {
...
@@ -60,6 +70,14 @@ pub(super) async fn release_runtime(spec_version: u32) -> Result<()> {
// TODO: create and push a git tag runtime-{spec_version}
// TODO: create and push a git tag runtime-{spec_version}
// Create target folder for runtime build
Command
::
new
(
"mkdir"
)
.args
([
"-p"
,
"runtime/gdev/target"
])
.status
()
?
;
Command
::
new
(
"chmod"
)
.args
([
"777"
,
"runtime/gdev/target"
])
.status
()
?
;
// Build the new runtime
// Build the new runtime
println!
(
"Build gdev-runtime… (take a while)"
);
println!
(
"Build gdev-runtime… (take a while)"
);
let
output
=
Command
::
new
(
"docker"
)
let
output
=
Command
::
new
(
"docker"
)
...
@@ -73,7 +91,7 @@ pub(super) async fn release_runtime(spec_version: u32) -> Result<()> {
...
@@ -73,7 +91,7 @@ pub(super) async fn release_runtime(spec_version: u32) -> Result<()> {
"RUNTIME_DIR=runtime/gdev"
,
"RUNTIME_DIR=runtime/gdev"
,
"-v"
,
"-v"
,
&
format!
(
"{}:/build"
,
pwd
),
&
format!
(
"{}:/build"
,
pwd
),
"paritytech/srtool:1.6
0
.0"
,
"paritytech/srtool:1.6
2
.0"
,
"build"
,
"build"
,
"--app"
,
"--app"
,
"--json"
,
"--json"
,
...
@@ -128,7 +146,13 @@ async fn gen_release_notes(spec_version: u32, srtool: Srtool) -> Result<String>
...
@@ -128,7 +146,13 @@ async fn gen_release_notes(spec_version: u32, srtool: Srtool) -> Result<String>
format!
(
"{} KB"
,
wasm
.size
/
1_024
),
format!
(
"{} KB"
,
wasm
.size
/
1_024
),
);
);
values
.insert
(
"runtime_size"
.to_owned
(),
wasm
.size
.to_string
());
values
.insert
(
"runtime_size"
.to_owned
(),
wasm
.size
.to_string
());
values
.insert
(
"core_version"
.to_owned
(),
wasm
.core_version
);
values
.insert
(
"core_version"
.to_owned
(),
format!
(
"{}-{}"
,
wasm
.core_version.spec_name
,
wasm
.core_version.spec_version
),
);
values
.insert
(
values
.insert
(
"compression_percent"
.to_owned
(),
"compression_percent"
.to_owned
(),
format!
(
"{:.2}"
,
compression_percent
),
format!
(
"{:.2}"
,
compression_percent
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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