|
6 | 6 | # Tab completion: bash-completion is installed in Docker container |
7 | 7 | # If tab completion doesn't work, ensure bash-completion is installed and enabled |
8 | 8 |
|
9 | | -.PHONY: help build build-cli build-core build-sdk debug release install install-cli install-core source-sdk env clean test test-all test-rust test-python test-cpp test-ros2 benchmark check setup-dev fmt test-framework |
| 9 | +.PHONY: help build build-cli build-core build-sdk debug release install install-cli install-core source-sdk env clean test test-all test-rust test-python test-cpp test-ros2 benchmark check setup-dev fmt fmt-check ci-rust ci-full test-framework |
10 | 10 | .DEFAULT_GOAL := help |
11 | 11 |
|
12 | 12 | # Default ROS2 distribution (can be overridden) |
|
49 | 49 | @echo "Development commands:" |
50 | 50 | @echo " make setup-dev - Setup development environment (link provider directory)" |
51 | 51 | @echo " make fmt - Format code using cargo fmt" |
| 52 | + @echo " make fmt-check - Check format only (CI; fails if not formatted)" |
52 | 53 | @echo " make check - Run cargo check on all Rust projects" |
53 | 54 | @echo " make clean - Clean build artifacts" |
54 | 55 | @echo "" |
| 56 | + @echo "CI (single entry points):" |
| 57 | + @echo " make ci-rust - Format check + cargo check + build (no ROS2)" |
| 58 | + @echo " make ci-full - Build SDK + Rust (requires ROS2 sourced, colcon on PATH)" |
| 59 | + @echo "" |
55 | 60 | @echo "Test commands:" |
56 | 61 | @echo " make test - Run all tests (Rust, Python)" |
57 | 62 | @echo " make test-rust - Run Rust CLI stress tests" |
@@ -111,6 +116,13 @@ build-sdk: |
111 | 116 | # Alias for backward compatibility |
112 | 117 | buildsdk: build-sdk |
113 | 118 |
|
| 119 | +# CI targets (single entry points; extend these when adding packages) |
| 120 | +ci-rust: fmt-check check build |
| 121 | + @echo "✓ ci-rust done" |
| 122 | + |
| 123 | +ci-full: build-sdk build |
| 124 | + @echo "✓ ci-full done (requires: ROS2 sourced, colcon on PATH)" |
| 125 | + |
114 | 126 | # Install commands |
115 | 127 | install: install-cli install-core |
116 | 128 | @echo "✓ All binaries installed successfully" |
@@ -216,6 +228,13 @@ fmt: |
216 | 228 | cd $(CORE_DIR) && cargo fmt |
217 | 229 | @echo "✓ Code formatted" |
218 | 230 |
|
| 231 | +# Check formatting only (for CI; fails if not formatted) |
| 232 | +fmt-check: |
| 233 | + @echo "Checking code format with cargo fmt -- --check..." |
| 234 | + cd $(CLI_DIR) && cargo fmt -- --check |
| 235 | + cd $(CORE_DIR) && cargo fmt -- --check |
| 236 | + @echo "✓ Format check passed" |
| 237 | + |
219 | 238 | # Check and test |
220 | 239 | check: |
221 | 240 | @echo "Running cargo check on all Rust projects..." |
|
0 commit comments