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

fix: make netsim run from examples #2959

Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ jobs:
# TODO: We have a bunch of platform-dependent code so should
# probably run this job on the full platform matrix
- name: clippy check (all features)
run: cargo clippy --workspace --all-features --all-targets --bins --tests --benches
run: cargo clippy --workspace --all-features --all-targets --lib --bins --tests --benches --examples

- name: clippy check (no features)
run: cargo clippy --workspace --no-default-features --lib --bins --tests
run: cargo clippy --workspace --no-default-features --all-targets --lib --bins --tests --benches --examples

- name: clippy check (default features)
run: cargo clippy --workspace --all-targets
run: cargo clippy --workspace --all-targets --lib --bins --tests --benches --examples

msrv:
if: "github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
branch: ${{ github.ref }}
max_workers: 4
netsim_branch: "main"
sim_paths: "sims/iroh/iroh.json,sims/integration"
sim_paths: "sims/iroh_v2/iroh.json,sims/integration_v2"
pr_number: ${{ github.event.pull_request.number || '' }}

codespell:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/netsim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
branch: "main"
max_workers: 1
netsim_branch: "main"
sim_paths: "sims/iroh,sims/integration"
sim_paths: "sims/iroh_v2,sims/integration_v2"
pr_number: ""
publish_metrics: true
build_profile: "optimized-release"
Expand All @@ -53,7 +53,7 @@ jobs:
branch: ${{inputs.branch}}
max_workers: 1
netsim_branch: ${{inputs.netsim_branch}}
sim_paths: "sims/iroh"
sim_paths: "sims/iroh_v2"
pr_number: ${{inputs.pr_number}}
publish_metrics: false
build_profile: "optimized-release"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/netsim_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Copy binaries to right location
run: |
cp target/${{inputs.build_profile}}/examples/* ../chuck/netsim/bins/
cp target/${{inputs.build_profile}}/iroh ../chuck/netsim/bins/iroh
cp target/${{inputs.build_profile}}/examples/transfer ../chuck/netsim/bins/iroh-transfer
cp target/${{inputs.build_profile}}/iroh-relay ../chuck/netsim/bins/iroh-relay
cp ../chuck/target/release/chuck ../chuck/netsim/bins/chuck
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion iroh-net/bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub mod s2n;
pub mod stats;

#[derive(Parser, Debug, Clone, Copy)]
#[clap(name = "bulk")]
#[clap(name = "iroh-net-bench")]
pub enum Commands {
Iroh(Opt),
#[cfg(not(any(target_os = "freebsd", target_os = "openbsd", target_os = "netbsd")))]
Expand Down
7 changes: 6 additions & 1 deletion iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ref-cast = "1.0.23"
# Examples
clap = { version = "4", features = ["derive"], optional = true }
indicatif = { version = "0.17", features = ["tokio"], optional = true }
parse-size = { version = "=1.0.0", optional = true } # pinned version to avoid bumping msrv to 1.81

# Documentation tests
url = { version = "2.5.0", features = ["serde"] }
Expand All @@ -74,7 +75,7 @@ test = []
discovery-pkarr-dht = ["iroh-net/discovery-pkarr-dht"]
test-utils = ["iroh-net/test-utils"]

examples = ["dep:clap", "dep:indicatif"]
examples = ["dep:clap", "dep:indicatif", "dep:parse-size"]

[dev-dependencies]
anyhow = { version = "1" }
Expand All @@ -101,3 +102,7 @@ rustdoc-args = ["--cfg", "iroh_docsrs"]
[[example]]
name = "rpc"
required-features = ["examples"]

[[example]]
name = "transfer"
required-features = ["examples"]
Loading
Loading