Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crates-io): introduce crates-io manager #3103

Merged
merged 61 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ed14be8
feat(crates-io): serialize packages to be published with version and …
clearloop Aug 18, 2023
4efa995
feat(crates-io): publish packages in order
clearloop Aug 18, 2023
9c9f161
feat(crates-io): serde manifest with cargo_toml
clearloop Aug 19, 2023
f755f4c
chore(codegen): force default features for syn
clearloop Aug 19, 2023
eb40006
chore(crates-io): update version of detailed dep
clearloop Aug 19, 2023
4e469f0
feat(crates-io): verify package before publishing
clearloop Aug 19, 2023
a2f9ea5
feat(crates-io): patch core-processor, subxt and sp-arithmetic in cra…
clearloop Aug 19, 2023
c9c25a2
feat(crates-io): merge functions
clearloop Aug 19, 2023
4f30285
ci(crates-io): introduce CI for publishing packages
clearloop Aug 19, 2023
52d249a
feat(crates-io): show case in CI
clearloop Aug 19, 2023
1982768
ci(clippy): make clippy happy
clearloop Aug 19, 2023
9a3f4af
chore(crates-io): clean workspace
clearloop Aug 19, 2023
42cc3ee
Merge branch 'master' into cl/issue-2832
clearloop Aug 19, 2023
7601972
chore(lock): update Cargo.lock
clearloop Aug 19, 2023
3fbdccf
Merge branch 'master' into cl/issue-2832
clearloop Aug 20, 2023
20c3875
Merge branch 'master' into cl/issue-2832
clearloop Aug 31, 2023
508cf63
Merge branch 'master' into cl/issue-2832
clearloop Sep 4, 2023
1d7a34f
chore(crates-io): queue sandbox deps to manager
clearloop Sep 4, 2023
8a417d6
chore(wasm-instrument): clean dep features
clearloop Sep 5, 2023
80dced3
chore(utils): add actor-system-error
clearloop Sep 5, 2023
c65856b
chore(utils): metadata for actor-system-error
clearloop Sep 5, 2023
d7066e2
chore(host): specify wasmi version
clearloop Sep 5, 2023
7cdba5e
chore(sandbox-host): pin version to workspace
clearloop Sep 5, 2023
c673227
chore(gcli): disable command meta
clearloop Sep 6, 2023
b79ea94
chore(crates-io): disable gear-sandbox-host
clearloop Sep 6, 2023
76987a3
chore(clippy): make clippy happy
clearloop Sep 6, 2023
002f9f5
ci(crates-io): test publishing
clearloop Sep 6, 2023
0fc801f
chore(lock): update Cargo.lock
clearloop Sep 6, 2023
68bbd6d
ci(crates-io): trigger only on dispatch
clearloop Sep 6, 2023
c9a6782
chore(gcli): ignore metadata tests
clearloop Sep 7, 2023
d2470d4
chore(clippy): make clippy happy
clearloop Sep 7, 2023
3bc7b81
Merge branch 'master' into cl/issue-2832
clearloop Sep 11, 2023
21df62f
ci(clippy): happy clippy
clearloop Sep 11, 2023
e8672cc
ci(crates-io): show case
clearloop Sep 11, 2023
f04a52e
ci(crates-io): trigger only on dispatching
clearloop Sep 11, 2023
e667982
ci(clippy): happy clippy
clearloop Sep 11, 2023
8200d91
Merge branch 'master' into cl/issue-2832
clearloop Sep 17, 2023
63dba93
chore(lock): update Cargo.lock
clearloop Sep 17, 2023
cf14ca2
Merge branch 'master' into cl/issue-2832
clearloop Oct 28, 2023
cfdd4c9
feat(crates-io): remove more pkgs
clearloop Oct 30, 2023
f530af9
chore(wasm-instrument): rename syscall table tests to core-backend
clearloop Oct 30, 2023
1e1d652
Merge branch 'cl/rename-sys-call-tests' into cl/issue-2832
clearloop Oct 30, 2023
24b31ee
chore(crates-io): remove patches for core-processor
clearloop Oct 30, 2023
294991d
chore(gcli): address comments
clearloop Oct 30, 2023
cb54eed
Merge branch 'master' into cl/issue-2832
clearloop Oct 30, 2023
f5b6a6f
chore(crates-io): test with pre.11
clearloop Oct 31, 2023
47e67dc
ci(crates-io): test with ci
clearloop Oct 31, 2023
7865e45
chore(gcli): remove lazy page
clearloop Nov 1, 2023
0e9e6d2
ci(crates-io): back to on workflow dispatch
clearloop Nov 1, 2023
3b9f297
ci(build): trigger
clearloop Nov 2, 2023
a2e76e6
Merge branch 'master' into cl/issue-2832
clearloop Nov 7, 2023
7a07875
Merge branch 'master' into cl/issue-2832
clearloop Nov 11, 2023
254a1de
ci(crates-io): test release still works
clearloop Nov 11, 2023
ec8907e
ci(crates-io): only work on dispatch
clearloop Nov 11, 2023
a83b466
ci(clippy): make clippy happy
clearloop Nov 11, 2023
6f55d0c
Merge branch 'master' into cl/issue-2832
clearloop Nov 15, 2023
271a9e2
chore(sandbox-host): inherit deps from workspace
clearloop Nov 15, 2023
5155633
ci(crates-io): preview publishing still works
clearloop Nov 15, 2023
d9d776b
ci(crates-io): retrive version
clearloop Nov 15, 2023
9c05fa3
Merge branch 'master' into cl/issue-2832
clearloop Nov 17, 2023
fb25c97
ci(build): trigger build
clearloop Nov 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/crates-io.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Crates IO

on:
workflow_dispatch:

env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
TERM: xterm-256color

jobs:
publish:
runs-on: ubuntu-latest
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v3

- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1

- name: "Publish packages"
run: cargo run --release -p crates-io-manager
90 changes: 84 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ async-trait = "0.1.68"
base64 = "0.21.0"
blake2-rfc = { version = "0.2.18", default-features = false }
bs58 = { version = "0.4.0", default-features = false }
# TODO: upgrade this package ( issue #2694 )
cargo_metadata = "=0.15.3"
clap = { version = "4.3.21" }
codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false }
color-eyre = "0.6.2"
Expand Down Expand Up @@ -407,8 +409,6 @@ demo-wat = { path = "examples/wat" }
#
# TODO: remove these dependencies (from this file?) or add more docs.
cfg-if = "1.0.0" # gear-lazy-pages
# TODO: upgrade this package ( issue #2694 )
cargo_metadata = "=0.15.3" # utils/wasm-builder
errno = "0.3" # gear-lazy-pages
impl-trait-for-tuples = "0.2.2" # pallets/staking-rewards
indexmap = "2.0.0" # utils/weight-diff
Expand Down Expand Up @@ -441,6 +441,9 @@ scale-value = "^0.10" # gsdk
heck = "0.4.1" # gsdk-api-gen
etc = "0.1.16" # gcli
scale-decode = "0.7.0" # gsdk
cargo_toml = "0.15.3" # crates-io
crates-io = "0.37.0" # crates-io
curl = "0.4.44" # crates-io

[profile.release]
panic = "unwind"
Expand Down
3 changes: 1 addition & 2 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ use gear_core::{
};
use primitive_types::H256;
use sp_arithmetic::traits::{BaseArithmetic, Saturating, Unsigned};
use sp_core::crypto::UncheckedFrom;
use sp_std::{
collections::{btree_map::BTreeMap, btree_set::BTreeSet},
prelude::*,
Expand Down Expand Up @@ -99,7 +98,7 @@ impl Origin for sp_runtime::AccountId32 {
}

fn from_origin(v: H256) -> Self {
sp_runtime::AccountId32::unchecked_from(v)
Self::new(v.0)
}
}

Expand Down
2 changes: 1 addition & 1 deletion core-backend/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ repository.workspace = true
proc-macro = true

[dependencies]
syn = { workspace = true, features = ["full", "fold"] }
syn = { workspace = true, features = ["default", "full", "fold"] }
quote.workspace = true
proc-macro2.workspace = true
1 change: 0 additions & 1 deletion gclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ futures-timer.workspace = true
async-trait.workspace = true
url.workspace = true
wabt.workspace = true
gstd.workspace = true
static_assertions.workspace = true

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion gsdk/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ repository.workspace = true
proc-macro = true

[dependencies]
syn = { workspace = true, features = ["full"] }
syn = { workspace = true, features = ["default", "full"] }
clearloop marked this conversation as resolved.
Show resolved Hide resolved
quote.workspace = true
proc-macro2.workspace = true
16 changes: 16 additions & 0 deletions utils/crates-io/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "crates-io-manager"
version = "0.1.0"
edition = "2021"
clearloop marked this conversation as resolved.
Show resolved Hide resolved

[[bin]]
name = "publish"
path = "publish.rs"

[dependencies]
anyhow.workspace = true
cargo_metadata.workspace = true
cargo_toml.workspace = true
crates-io.workspace = true
curl.workspace = true
toml.workspace = true
Loading