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

chore: Get the repo ready to publish crates #2305

Merged
merged 3 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ tags
*.pyc
/test/integration.log
/test/integration.failure
cargo-publish.log
*.bak

# generated files
cobertura.xml
Expand Down
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ matrix:
- make check-whitespaces
- make check-dirty-rpc-doc
- make check-dirty-hashes-toml
- devtools/ci/check-cyclic-dependencies.py
- name: Cyclic dev-dependencies
if: 'tag IS NOT present AND (type = pull_request OR branch in (master, staging, staging2, trying) OR repo != nervosnetwork/ckb)'
os: linux
cache: false
addons: { apt: { packages: [] } }
# This is a trick to use stable Rust here to allow failure. There are cyclic dev-dependencies in the current code base and we hope to fix later.
rust: stable
script:
- devtools/ci/check-cyclic-dependencies.py --dev
- name: Security Audit
if: 'tag IS NOT present AND (type = pull_request OR branch in (master, staging, staging2, trying) OR repo != nervosnetwork/ckb)'
os: linux
Expand Down
65 changes: 37 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,70 +5,79 @@ license = "MIT"
authors = ["Nervos Core Dev <[email protected]>"]
edition = "2018"
build = "build.rs"
description = "TODO(doc): crate description"
homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

[build-dependencies]
ckb-build-info = { path = "util/build-info" }
ckb-build-info = { path = "util/build-info", version = "= 0.37.0-pre" }

[dependencies]
ckb-build-info = { path = "util/build-info" }
ckb-bin = { path = "ckb-bin" }
ckb-build-info = { path = "util/build-info", version = "= 0.37.0-pre" }
ckb-bin = { path = "ckb-bin", version = "= 0.37.0-pre" }

[dev-dependencies]

[workspace]
# To get a list sorted by dependencies, run devtools/ci/check-cyclic-dependencies.py
members = [
# Members are ordered by dependencies. Crates at top has fewer dependencies.
"util",
"util/occupied-capacity/core",
"util/channel",
"util/fixed-hash/core",
"util/build-info",
"util/logger",
"util/logger-config",
"util/logger-service",
"util/metrics",
"util/metrics-config",
"util/metrics-service",
"util/memory-tracker",
"util",
"util/hash",
"util/fixed-hash",
"util/chain-iter",
"util/crypto",
"util/rational",
"util/multisig",
"util/runtime",
"util/rust-unstable-port",
"benches",
"util/occupied-capacity/macros",
"util/fixed-hash/macros",
"util/logger-service",
"util/stop-handler",
"util/metrics-service",
"util/fixed-hash",
"util/occupied-capacity",
"util/crypto",
"error",
"util/multisig",
"util/types",
"util/runtime",
"util/jsonrpc-types",
"util/fee-estimator",
"util/rust-unstable-port",
"db",
"db-migration",
"resource",
"pow",
"network",
"util/network-alert",
"util/dao/utils",
"traits",
"spec",
"util/proposal-table",
"store",
"script",
"traits",
"util/app-config",
"db",
"network",
"miner",
"notify",
"util/memory-tracker",
"db-migration",
"util/network-alert",
"store",
"util/chain-iter",
"util/test-chain-utils",
"util/dao",
"util/reward-calculator",
"util/snapshot",
"verification",
"shared",
"tx-pool",
"shared",
"chain",
"indexer",
"sync",
"miner",
"rpc",
"util/instrument",
"util/app-config",
"ckb-bin",
"benches",
"error",
"notify",
"rpc",
"ckb-bin"
]

[profile.release]
Expand Down
31 changes: 17 additions & 14 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,33 @@ version = "0.37.0-pre"
license = "MIT"
authors = ["Nervos Core Dev <[email protected]>"]
edition = "2018"
description = "TODO(doc): crate description"
homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

[dependencies]


[dev-dependencies]
criterion = "0.3"
ckb-chain = { path = "../chain" }
ckb-types = { path = "../util/types" }
ckb-shared = { path = "../shared" }
ckb-store = { path = "../store" }
ckb-chain-spec = { path = "../spec" }
ckb-chain = { path = "../chain", version = "= 0.37.0-pre" }
ckb-types = { path = "../util/types", version = "= 0.37.0-pre" }
ckb-shared = { path = "../shared", version = "= 0.37.0-pre" }
ckb-store = { path = "../store", version = "= 0.37.0-pre" }
ckb-chain-spec = { path = "../spec", version = "= 0.37.0-pre" }
rand = "0.6"
ckb-hash = {path = "../util/hash"}
ckb-test-chain-utils = { path = "../util/test-chain-utils" }
ckb-dao-utils = { path = "../util/dao/utils" }
ckb-dao = { path = "../util/dao" }
ckb-hash = {path = "../util/hash", version = "= 0.37.0-pre"}
ckb-test-chain-utils = { path = "../util/test-chain-utils", version = "= 0.37.0-pre" }
ckb-dao-utils = { path = "../util/dao/utils", version = "= 0.37.0-pre" }
ckb-dao = { path = "../util/dao", version = "= 0.37.0-pre" }
ckb-system-scripts = { version = "= 0.5.1" }
lazy_static = "1.3.0"
ckb-crypto = { path = "../util/crypto" }
ckb-crypto = { path = "../util/crypto", version = "= 0.37.0-pre" }
faketime = "0.2.0"
ckb-jsonrpc-types = { path = "../util/jsonrpc-types" }
ckb-verification = { path = "../verification" }
ckb-app-config = { path = "../util/app-config" }
ckb-fee-estimator = { path = "../util/fee-estimator" }
ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.37.0-pre" }
ckb-verification = { path = "../verification", version = "= 0.37.0-pre" }
ckb-app-config = { path = "../util/app-config", version = "= 0.37.0-pre" }
ckb-fee-estimator = { path = "../util/fee-estimator", version = "= 0.37.0-pre" }

[[bench]]
name = "bench_main"
Expand Down
39 changes: 21 additions & 18 deletions chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@ version = "0.37.0-pre"
license = "MIT"
authors = ["Nervos Core Dev <[email protected]>"]
edition = "2018"
description = "TODO(doc): crate description"
homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

[dependencies]
ckb-logger = { path = "../util/logger" }
ckb-metrics = { path = "../util/metrics" }
ckb-types = { path = "../util/types" }
ckb-shared = { path = "../shared" }
ckb-chain-spec = { path = "../spec" }
ckb-store = { path = "../store" }
ckb-verification = { path = "../verification" }
ckb-logger = { path = "../util/logger", version = "= 0.37.0-pre" }
ckb-metrics = { path = "../util/metrics", version = "= 0.37.0-pre" }
ckb-types = { path = "../util/types", version = "= 0.37.0-pre" }
ckb-shared = { path = "../shared", version = "= 0.37.0-pre" }
ckb-chain-spec = { path = "../spec", version = "= 0.37.0-pre" }
ckb-store = { path = "../store", version = "= 0.37.0-pre" }
ckb-verification = { path = "../verification", version = "= 0.37.0-pre" }
faketime = "0.2.0"
ckb-stop-handler = { path = "../util/stop-handler" }
ckb-dao = { path = "../util/dao" }
ckb-proposal-table = { path = "../util/proposal-table" }
ckb-error = { path = "../error" }
ckb-app-config = { path = "../util/app-config" }
ckb-stop-handler = { path = "../util/stop-handler", version = "= 0.37.0-pre" }
ckb-dao = { path = "../util/dao", version = "= 0.37.0-pre" }
ckb-proposal-table = { path = "../util/proposal-table", version = "= 0.37.0-pre" }
ckb-error = { path = "../error", version = "= 0.37.0-pre" }
ckb-app-config = { path = "../util/app-config", version = "= 0.37.0-pre" }
bitflags = "1.0"
ckb-rust-unstable-port = { path = "../util/rust-unstable-port" }
ckb-channel = { path = "../util/channel" }
ckb-rust-unstable-port = { path = "../util/rust-unstable-port", version = "= 0.37.0-pre" }
ckb-channel = { path = "../util/channel", version = "= 0.37.0-pre" }

[dev-dependencies]
ckb-test-chain-utils = { path = "../util/test-chain-utils" }
ckb-dao-utils = { path = "../util/dao/utils" }
ckb-tx-pool = { path = "../tx-pool" }
ckb-jsonrpc-types = { path = "../util/jsonrpc-types" }
ckb-test-chain-utils = { path = "../util/test-chain-utils", version = "= 0.37.0-pre" }
ckb-dao-utils = { path = "../util/dao/utils", version = "= 0.37.0-pre" }
ckb-tx-pool = { path = "../tx-pool", version = "= 0.37.0-pre" }
ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.37.0-pre" }
lazy_static = "1.4"
49 changes: 26 additions & 23 deletions ckb-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,39 @@ version = "0.37.0-pre"
license = "MIT"
authors = ["Nervos Core Dev <[email protected]>"]
edition = "2018"
description = "TODO(doc): crate description"
homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

[dependencies]
clap = { version = "2" }
serde = { version = "1.0", features = ["derive"] }
serde_plain = "0.3.0"
toml = "0.5"
ckb-app-config = { path = "../util/app-config" }
ckb-logger = { path = "../util/logger" }
ckb-logger-service = { path = "../util/logger-service" }
ckb-metrics-service = { path = "../util/metrics-service" }
ckb-util = { path = "../util" }
ckb-types = { path = "../util/types" }
ckb-channel = { path = "../util/channel" }
ckb-jsonrpc-types = { path = "../util/jsonrpc-types" }
ckb-chain = { path = "../chain" }
ckb-shared = { path = "../shared" }
ckb-store = { path = "../store" }
ckb-chain-spec = {path = "../spec"}
ckb-miner = { path = "../miner" }
ckb-network = { path = "../network"}
ckb-rpc = { path = "../rpc"}
ckb-resource = { path = "../resource"}
ckb-network-alert = { path = "../util/network-alert" }
ckb-app-config = { path = "../util/app-config", version = "= 0.37.0-pre" }
ckb-logger = { path = "../util/logger", version = "= 0.37.0-pre" }
ckb-logger-service = { path = "../util/logger-service", version = "= 0.37.0-pre" }
ckb-metrics-service = { path = "../util/metrics-service", version = "= 0.37.0-pre" }
ckb-util = { path = "../util", version = "= 0.37.0-pre" }
ckb-types = { path = "../util/types", version = "= 0.37.0-pre" }
ckb-channel = { path = "../util/channel", version = "= 0.37.0-pre" }
ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.37.0-pre" }
ckb-chain = { path = "../chain", version = "= 0.37.0-pre" }
ckb-shared = { path = "../shared", version = "= 0.37.0-pre" }
ckb-store = { path = "../store", version = "= 0.37.0-pre" }
ckb-chain-spec = {path = "../spec", version = "= 0.37.0-pre"}
ckb-miner = { path = "../miner", version = "= 0.37.0-pre" }
ckb-network = { path = "../network", version = "= 0.37.0-pre"}
ckb-rpc = { path = "../rpc", version = "= 0.37.0-pre"}
ckb-resource = { path = "../resource", version = "= 0.37.0-pre"}
ckb-network-alert = { path = "../util/network-alert", version = "= 0.37.0-pre" }
ctrlc = { version = "3.1", features = ["termination"] }
ckb-sync = { path = "../sync"}
ckb-instrument = { path = "../util/instrument", features = ["progress_bar"] }
ckb-build-info = { path = "../util/build-info" }
ckb-memory-tracker = { path = "../util/memory-tracker" }
ckb-chain-iter = { path = "../util/chain-iter" }
ckb-verification = { path = "../verification" }
ckb-sync = { path = "../sync", version = "= 0.37.0-pre"}
ckb-instrument = { path = "../util/instrument", version = "= 0.37.0-pre", features = ["progress_bar"] }
ckb-build-info = { path = "../util/build-info", version = "= 0.37.0-pre" }
ckb-memory-tracker = { path = "../util/memory-tracker", version = "= 0.37.0-pre" }
ckb-chain-iter = { path = "../util/chain-iter", version = "= 0.37.0-pre" }
ckb-verification = { path = "../verification", version = "= 0.37.0-pre" }
base64 = "0.10.1"
tempfile = "3.0"
rayon = "1.0"
Expand Down
11 changes: 7 additions & 4 deletions db-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ version = "0.37.0-pre"
license = "MIT"
authors = ["Nervos Core Dev <[email protected]>"]
edition = "2018"
description = "TODO(doc): crate description"
homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ckb-db = { path = "../db" }
ckb-logger = { path = "../util/logger" }
ckb-error = { path = "../error" }
ckb-db = { path = "../db", version = "= 0.37.0-pre" }
ckb-logger = { path = "../util/logger", version = "= 0.37.0-pre" }
ckb-error = { path = "../error", version = "= 0.37.0-pre" }
indicatif = "0.15"
console = "0.12"

[dev-dependencies]
tempfile = "3.0"
ckb-app-config = { path = "../util/app-config" }
ckb-app-config = { path = "../util/app-config", version = "= 0.37.0-pre" }
9 changes: 6 additions & 3 deletions db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ version = "0.37.0-pre"
license = "MIT"
authors = ["Nervos Core Dev <[email protected]>"]
edition = "2018"
description = "TODO(doc): crate description"
homepage = "https://github.com/nervosnetwork/ckb"
repository = "https://github.com/nervosnetwork/ckb"

[dependencies]
ckb-app-config = { path = "../util/app-config" }
ckb-logger = { path = "../util/logger" }
ckb-error = { path = "../error" }
ckb-app-config = { path = "../util/app-config", version = "= 0.37.0-pre" }
ckb-logger = { path = "../util/logger", version = "= 0.37.0-pre" }
ckb-error = { path = "../error", version = "= 0.37.0-pre" }
tempfile = "3.0"
libc = "0.2"
rocksdb = { package = "ckb-rocksdb", version = "=0.14.1", features = ["snappy"] }
6 changes: 6 additions & 0 deletions devtools/ci/check-cargotoml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ function check_version() {
"${cargo_toml}" "${expected}" "${tmp}"
ERRCNT=$((ERRCNT + 1))
fi

if grep -n -H '{.*path\s*=\s*' $cargo_toml | grep -F -v 'version = "= '"$expected"'"'; then
printf "Error: Local depedencies in <%s> must specify version \"= %s\"\n" \
"${cargo_toml}" "${expected}"
ERRCNT=$((ERRCNT + 1))
fi
done
}

Expand Down
Loading