extend = "./examples/Makefile.toml" [env] CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true [config] skip_core_tasks = true [tasks.default] dependencies = ["build"] [tasks.check] workspace = false command = "docker-compose" args = ["run", "build", "check", "${@}"] [tasks.build] workspace = false command = "docker-compose" args = ["run", "build", "build", "${@}"] [tasks.sparse-05] workspace = false script = [ "docker-compose run build build --bin sparse-05-server ${@}", "docker-compose run build build --bin sparse-05-server --target x86_64-pc-windows-gnu ${@}", "docker-compose run build build --bin sparse-05-client ${@}", ] [tasks.tcp-test] workspace = false script = [ "docker-compose run build build --bin tcp-test ${@}", "docker-compose run --entrypoint=setcap build cap_net_raw=eip /workspaces/sparse/target/debug/tcp-test" ] [tasks.run-tcp-test] workspace = false dependencies = ["tcp-test"] script = [ "docker-compose run tcptest_client /workspaces/sparse/target/debug/tcp-test $(/sbin/ip a show docker0 | awk -F'[ \t/]*' '/inet / { print $3 }')" ] [tasks.fmt] command = "cargo" args = ["fmt"] [tasks.test] workspace = false command = "docker-compose" args = ["run", "build", "test", "${@}"] [tasks.clean] workspace = false command = "cargo" args = ["clean"] [tasks.check-watch] workspace = false command = "docker-compose" args = ["run", "build", "check", "${@}"] watch = { watch = ["nl-sys/src", "pcap-sys/src", "sparse-05/sparse-05-client/src", "sparse-05/sparse-05-common/src", "sparse-05/sparse-05-server/src"] } #----------------------- # # Git tasks # #----------------------- [tasks.git-pre-commit] workspace = false dependencies = ["build", "test", "fmt"] [tasks.git-add] workspace = false command = "git" args = ["add", "."] [tasks.git-commit] workspace = false command = "convco" args = ["commit", "-i"] dependencies = ["git-pre-commit", "git-add"] [tasks.git-share-root] workspace = false script = [ "git config --global --add safe.directory /workspaces/sparse/nl-sys/libnl", "git config --global --add safe.directory /workspaces/sparse/pcap-sys/libpcap", ] #--------------------------------- # # Project setup tasks # #--------------------------------- [tasks.setup] workspace = false dependencies = ["git-share-root", "setup-pull-rust-image", "setup-update-submodules"] [tasks.setup-pull-rust-image] workspace = false script = "docker pull rust:1-alpine" [tasks.setup-update-submodules] workspace = false script = "git submodule update --init" #---------------------- # # CI tasks # #---------------------- [tasks.ci] workspace = false dependencies = ["setup", "build", "ci-convco-check"] [tasks.ci-convco-check] command = "convco" args = ["check"]