Skip to content

Commit

Permalink
[π˜€π—½π—Ώ] initial version
Browse files Browse the repository at this point in the history
Created using spr 1.3.6-beta.1
  • Loading branch information
sunshowers committed Jul 28, 2024
2 parents 9e58f1b + 492260b commit f40ef9a
Show file tree
Hide file tree
Showing 23 changed files with 1,068 additions and 704 deletions.
26 changes: 17 additions & 9 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ members = [
"cockroach-admin/types",
"common",
"dev-tools/crdb-seed",
"dev-tools/downloader",
"dev-tools/omdb",
"dev-tools/omicron-dev",
"dev-tools/openapi-manager",
Expand Down Expand Up @@ -122,6 +123,7 @@ default-members = [
"cockroach-admin/types",
"common",
"dev-tools/crdb-seed",
"dev-tools/downloader",
"dev-tools/omdb",
"dev-tools/omicron-dev",
"dev-tools/openapi-manager",
Expand Down
24 changes: 24 additions & 0 deletions dev-tools/downloader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "xtask-downloader"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"

[lints]
workspace = true

[dependencies]
anyhow.workspace = true
camino.workspace = true
clap.workspace = true
flate2.workspace = true
futures.workspace = true
omicron-workspace-hack.workspace = true
reqwest.workspace = true
sha2.workspace = true
slog.workspace = true
slog-async.workspace = true
slog-term.workspace = true
strum.workspace = true
tar.workspace = true
tokio.workspace = true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Subcommand: cargo xtask download
//!
//! This is a separate binary because it requires many dependencies that other
//! parts of `cargo xtask` do not.
use anyhow::{bail, Context, Result};
use camino::{Utf8Path, Utf8PathBuf};
Expand Down
12 changes: 12 additions & 0 deletions dev-tools/downloader/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use clap::Parser;
use xtask_downloader::{run_cmd, DownloadArgs};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
let args = DownloadArgs::parse();
run_cmd(args).await
}
53 changes: 39 additions & 14 deletions dev-tools/omicron-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,24 @@ omicron-rpaths.workspace = true
anyhow.workspace = true
camino.workspace = true
clap.workspace = true
dropshot.workspace = true
futures.workspace = true
gateway-messages.workspace = true
gateway-test-utils.workspace = true
dropshot = { workspace = true, optional = true }
futures = { workspace = true, optional = true }
gateway-messages = { workspace = true, optional = true }
gateway-test-utils = { workspace = true, optional = true }
libc.workspace = true
nexus-config.workspace = true
nexus-test-utils = { workspace = true, features = ["omicron-dev"] }
nexus-test-interface.workspace = true
nexus-config = { workspace = true, optional = true }
nexus-test-interface = { workspace = true, optional = true }
nexus-test-utils = { workspace = true, features = ["omicron-dev"], optional = true }
omicron-common.workspace = true
omicron-nexus.workspace = true
omicron-test-utils.workspace = true
omicron-nexus = { workspace = true, optional = true }
omicron-test-utils = { workspace = true, optional = true }
# See omicron-rpaths for more about the "pq-sys" dependency.
pq-sys = "*"
rcgen.workspace = true
signal-hook.workspace = true
signal-hook-tokio.workspace = true
rcgen = { workspace = true, optional = true }
signal-hook-tokio = { workspace = true, optional = true }
tokio = { workspace = true, features = [ "full" ] }
tokio-postgres.workspace = true
toml.workspace = true
tokio-postgres = { workspace = true, optional = true }
toml = { workspace = true, optional = true }
omicron-workspace-hack.workspace = true

[dev-dependencies]
Expand All @@ -49,3 +48,29 @@ subprocess.workspace = true
[[bin]]
name = "omicron-dev"
doc = false

[[test]]
name = "test_omicron_dev"
required-features = ["default"]

[features]
# default-features set to all of the below features for two reasons:
#
# 1. Backwards compatibility with existing users of this crate.
# 2. rust-analyzer will build the crate with all features enabled by default.
#
# The xtask uses --no-default-features to ensure that only the right set of
# features is built.
default = ["include-cert", "include-clickhouse", "include-db", "include-mgs", "include-nexus"]

# Each feature corresponds to one file in `src`, and is feature-flagged in
# lib.rs.
#
# NOTE: When adding a new feature, also add it to:
# - the `default` feature list above
# - CI_MUTUALLY_EXCLUSIVE_FEATURES in dev-tools/xtask/src/check_features.rs
include-cert = ["dep:rcgen"]
include-clickhouse = ["dep:dropshot", "dep:futures", "dep:omicron-test-utils", "dep:signal-hook-tokio"]
include-db = ["dep:futures", "dep:omicron-test-utils", "dep:signal-hook-tokio", "dep:tokio-postgres"]
include-mgs = ["dep:futures", "dep:gateway-messages", "dep:gateway-test-utils", "dep:signal-hook-tokio"]
include-nexus = ["dep:dropshot", "dep:futures", "dep:nexus-config", "dep:nexus-test-interface", "dep:nexus-test-utils", "dep:omicron-nexus", "dep:signal-hook-tokio", "dep:toml"]
Loading

0 comments on commit f40ef9a

Please sign in to comment.