Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement crate publishing on CI #12768

Merged
merged 21 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1d8990f
implement crate publishing from CI
joao-paulo-parity Dec 1, 2022
98c54cd
fix indentation
joao-paulo-parity Dec 2, 2022
4484eba
use resource_group for job exclusivity
joao-paulo-parity Dec 2, 2022
12ba856
correct publish = false
joao-paulo-parity Dec 2, 2022
b8d9f53
Remove YAML anchors as GitLab's `extends:` doesn't need it
rcny Dec 5, 2022
ac7af9c
Temporarily force cache upload for the new jobs
rcny Dec 5, 2022
d8004d2
Revert `RUSTY_CACHIER_FORCE_UPLOAD`
rcny Dec 5, 2022
186e502
Merge branch 'master' of github.com:paritytech/substrate into crates
joao-paulo-parity Dec 6, 2022
657ed63
Merge branch 'crates' of github.com:joao-paulo-parity/substrate into …
joao-paulo-parity Dec 6, 2022
29146bf
pin libp2p-tcp=0.37.0 for sc-telemetry
joao-paulo-parity Dec 6, 2022
f0d7dfd
Merge branch 'master' of github.com:paritytech/substrate into crates
joao-paulo-parity Dec 6, 2022
ace4896
Revert "pin libp2p-tcp=0.37.0 for sc-telemetry"
joao-paulo-parity Dec 6, 2022
a5878d0
always collect generated crates
joao-paulo-parity Dec 7, 2022
786a305
increase timeout for publish-crates-template
joao-paulo-parity Dec 7, 2022
01a7eda
Merge branch 'master' of github.com:paritytech/substrate into crates
joao-paulo-parity Dec 7, 2022
5a5feee
Force upload the new job cache again
rcny Dec 7, 2022
1e7a178
Revert "Force upload the new job cache again"
rcny Dec 7, 2022
a0df576
reformat
joao-paulo-parity Dec 7, 2022
b11228c
Merge branch 'crates' of github.com:joao-paulo-parity/substrate into …
joao-paulo-parity Dec 7, 2022
a92a89c
improve timeout explanation
joao-paulo-parity Dec 7, 2022
8975489
s/usual/average
joao-paulo-parity Dec 7, 2022
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
21 changes: 21 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,27 @@ default:
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"

.crates-publishing-template:
stage: test
extends:
- .docker-env
# collect artifacts even on failure so that we know how the crates were generated (they'll be
# generated to the artifacts folder according to SPUB_TMP further down)
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
expire_in: 7 days
paths:
- artifacts/
variables:
CRATESIO_CRATES_OWNER: parity-crate-owner
REPO_OWNER: paritytech
REPO: substrate
GH_API: https://api.github.com
CRATESIO_API: https://crates.io/api
SPUB_TMP: artifacts
RUSTY_CACHIER_FORCE_UPLOAD: "true"

#### stage: .pre

skip-if-draft:
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"bin/node/bench",
"bin/node/cli",
"bin/node/executor",
"bin/node/inspect",
"bin/node/primitives",
"bin/node/rpc",
"bin/node/runtime",
Expand Down Expand Up @@ -39,11 +40,13 @@ members = [
"client/executor/wasmi",
"client/executor/wasmtime",
"client/finality-grandpa",
"client/finality-grandpa/rpc",
"client/informant",
"client/keystore",
"client/merkle-mountain-range",
"client/merkle-mountain-range/rpc",
"client/network",
"client/network/transactions",
"client/network-gossip",
"client/network/bitswap",
"client/network/common",
Expand Down Expand Up @@ -88,11 +91,13 @@ members = [
"frame/child-bounties",
"frame/collective",
"frame/contracts",
"frame/contracts/proc-macro",
"frame/contracts/primitives",
"frame/conviction-voting",
"frame/democracy",
"frame/fast-unstake",
"frame/try-runtime",
"frame/elections-phragmen",
"frame/election-provider-multi-phase",
"frame/election-provider-support",
"frame/election-provider-support/benchmarking",
Expand All @@ -113,6 +118,7 @@ members = [
"frame/nicks",
"frame/node-authorization",
"frame/offences",
"frame/offences/benchmarking",
"frame/preimage",
"frame/proxy",
"frame/nomination-pools",
Expand Down Expand Up @@ -143,6 +149,7 @@ members = [
"frame/support/procedural/tools/derive",
"frame/support/test",
"frame/support/test/compile_pass",
"frame/support/test/pallet",
"frame/system",
"frame/system/benchmarking",
"frame/system/rpc/runtime-api",
Expand Down Expand Up @@ -174,6 +181,7 @@ members = [
"primitives/consensus/babe",
"primitives/consensus/common",
"primitives/consensus/pow",
"primitives/consensus/slots",
"primitives/consensus/vrf",
"primitives/core",
"primitives/core/hashing",
Expand Down Expand Up @@ -216,6 +224,7 @@ members = [
"primitives/version/proc-macro",
"primitives/wasm-interface",
"primitives/weights",
"test-utils",
"test-utils/client",
"test-utils/derive",
"test-utils/runtime",
Expand Down
1 change: 1 addition & 0 deletions bin/node/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

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

Expand Down
1 change: 1 addition & 0 deletions bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
default-run = "substrate"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on linux, see
Expand Down
1 change: 1 addition & 0 deletions bin/node/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 1 addition & 0 deletions bin/node/inspect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 1 addition & 0 deletions bin/node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 1 addition & 0 deletions bin/node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 1 addition & 0 deletions bin/node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build = "build.rs"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion bin/node/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
publish = true
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/merkle-mountain-range/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "Node-specific RPC methods for interaction with Merkle Mountain Range pallet."
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/network/bitswap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
documentation = "https://docs.rs/sc-network-bitswap"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/network/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
documentation = "https://docs.rs/sc-network-sync"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/network/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
documentation = "https://docs.rs/sc-network-light"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/network/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
documentation = "https://docs.rs/sc-network-sync"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/network/transactions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
documentation = "https://docs.rs/sc-network-transactions"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion client/sync-state-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion frame/bags-list/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet bags list"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion frame/bags-list/fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "Fuzzer for FRAME pallet bags list"
readme = "README.md"
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion frame/bags-list/remote-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet bags list remote test"
readme = "README.md"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion frame/election-provider-multi-phase/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "PALLET two phase election providers"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion frame/election-provider-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "election provider supporting traits"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
5 changes: 4 additions & 1 deletion frame/fast-unstake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Unlicense"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME fast unstake pallet"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -26,7 +25,10 @@ sp-std = { version = "5.0.0", default-features = false, path = "../../primitives
sp-staking = { default-features = false, path = "../../primitives/staking" }
frame-election-provider-support = { default-features = false, path = "../election-provider-support" }

# optional dependencies for cargo features
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" }
pallet-staking = { default-features = false, optional = true, path = "../staking" }
pallet-assets = { default-features = false, optional = true, path = "../assets" }

[dev-dependencies]
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" }
Expand All @@ -36,6 +38,7 @@ sp-tracing = { version = "6.0.0", path = "../../primitives/tracing" }
pallet-staking = { path = "../staking" }
pallet-balances = { path = "../balances" }
pallet-timestamp = { path = "../timestamp" }
pallet-assets = { path = "../assets" }


[features]
Expand Down
1 change: 0 additions & 1 deletion frame/lottery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME Participation Lottery Pallet"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
3 changes: 2 additions & 1 deletion frame/nomination-pools/benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sp-runtime = { version = "7.0.0", default-features = false, path = "../../../pri
sp-runtime-interface = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime-interface" }
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/staking" }
sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }
sp-io = { optional = true, default-features = false, path = "../../../primitives/io" }

[dev-dependencies]
pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../../balances" }
Expand All @@ -54,7 +55,7 @@ std = [
"sp-runtime-interface/std",
"sp-io/std",
"sp-staking/std",
"sp-std/std",
"sp-std/std",
]

runtime-benchmarks = [
Expand Down
1 change: 1 addition & 0 deletions frame/nomination-pools/test-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME nomination pools pallet tests with the staking pallet"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion frame/preimage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet for storing preimages of hashes"
readme = "README.md"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions frame/root-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME root testing pallet"
readme = "README.md"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
3 changes: 2 additions & 1 deletion frame/staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ sp-application-crypto = { version = "7.0.0", default-features = false, path = ".
frame-election-provider-support = { version = "4.0.0-dev", default-features = false, path = "../election-provider-support" }
log = { version = "0.4.17", default-features = false }

# Optional imports for benchmarking
# optional dependencies for cargo features
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
rand_chacha = { version = "0.2", default-features = false, optional = true }
pallet-bags-list = { default-features = false, optional = true, path = "../bags-list" }

[dev-dependencies]
sp-tracing = { version = "6.0.0", path = "../../primitives/tracing" }
Expand Down
1 change: 0 additions & 1 deletion frame/state-trie-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet migration of trie"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 2 additions & 0 deletions frame/transaction-payment/asset-tx-payment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ sp-io = { version = "7.0.0", default-features = false, path = "../../../primitiv
sp-runtime = { version = "7.0.0", default-features = false, path = "../../../primitives/runtime" }
sp-std = { version = "5.0.0", default-features = false, path = "../../../primitives/std" }

# optional dependencies for cargo features
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../support" }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../system" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = ".." }
frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../../benchmarking", optional = true }
pallet-assets = { default-features = false, optional = true, path = "../../assets" }

# Other dependencies
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
Expand Down
1 change: 0 additions & 1 deletion frame/try-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet for democracy"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion frame/whitelist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "FRAME pallet for whitelisting call, and dispatch from specific origin"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion primitives/beefy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate"
description = "Primitives for BEEFY protocol."
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
Loading