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

Use just tool to run examples #454

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,15 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}

# general examples
- run: cargo install just --locked
- name: "Rust Dataflow example"
timeout-minutes: 30
working-directory: examples/rust-dataflow
run: just run

- name: "Build examples"
timeout-minutes: 30
run: cargo build --examples
- name: "Rust Dataflow example"
timeout-minutes: 30
run: cargo run --example rust-dataflow
- name: "Multiple Daemons example"
timeout-minutes: 30
run: cargo run --example multiple-daemons
Expand Down
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ tokio-stream = "0.1.11"
name = "c-dataflow"
path = "examples/c-dataflow/run.rs"

[[example]]
name = "rust-dataflow"
path = "examples/rust-dataflow/run.rs"

[[example]]
name = "rust-ros2-dataflow"
path = "examples/rust-ros2-dataflow/run.rs"
Expand Down
1 change: 1 addition & 0 deletions examples/rust-dataflow/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
out
6 changes: 6 additions & 0 deletions examples/rust-dataflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Rust Dataflow Example

This example uses the [`just`](https://github.com/casey/just) tool for building and running the dataflow:

- Build: `just build`
- Run: `just run`
12 changes: 12 additions & 0 deletions examples/rust-dataflow/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# you can use the installed `dora` command instead of this `cargo run` command
dora := "cargo run -p dora-cli --"

# build dora and the example nodes/operators
build:
{{ dora }} build dataflow.yml

# build and run the dataflow example
run: build
# The `--run-dataflow` argument is mostly meant for testing. It's recommended
# to instead run `dora daemon` in one terminal and `dora start dataflow.yml` in another
RUST_LOG=debug {{ dora }} daemon --run-dataflow dataflow.yml
46 changes: 0 additions & 46 deletions examples/rust-dataflow/run.rs

This file was deleted.

Loading