forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
123 lines (95 loc) · 4.77 KB
/
justfile
File metadata and controls
123 lines (95 loc) · 4.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# QGroundControl Development Commands
# Install: cargo install just, brew install just, or apt install just
# Configuration from build-config.json
qt_version := `./tools/setup/read-config.sh qt_version 2>/dev/null || echo "6.10.1"`
qt_dir := env_var_or_default("QT_DIR", home_directory() / "Qt" / qt_version / "gcc_64")
build_type := env_var_or_default("BUILD_TYPE", "Debug")
build_dir := "build"
# Default: show available commands
default:
@just --list --unsorted
# ─────────────────────────────────────────────────────────────────────────────
# Setup
# ─────────────────────────────────────────────────────────────────────────────
# Install system dependencies (Debian/Ubuntu)
deps:
@echo "Installing dependencies (requires sudo)..."
python3 ./tools/setup/install_dependencies.py --platform debian
# Initialize git submodules
submodules:
git submodule update --init --recursive
# ─────────────────────────────────────────────────────────────────────────────
# Build
# ─────────────────────────────────────────────────────────────────────────────
# Configure CMake build
configure: submodules
{{qt_dir}}/bin/qt-cmake -B {{build_dir}} -G Ninja \
-DCMAKE_BUILD_TYPE={{build_type}} \
-DQGC_BUILD_TESTING=ON
# Build the project
build:
cmake --build {{build_dir}} --config {{build_type}} --parallel
# Configure and build Release
release:
{{qt_dir}}/bin/qt-cmake -B {{build_dir}} -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DQGC_BUILD_TESTING=OFF
cmake --build {{build_dir}} --config Release --parallel
# Clean build directory
clean:
rm -rf {{build_dir}}
# Clean, configure, and build
rebuild: clean configure build
# Full setup: deps, submodules, configure, build
setup: deps submodules configure build
# ─────────────────────────────────────────────────────────────────────────────
# Quality
# ─────────────────────────────────────────────────────────────────────────────
# Run unit tests
test:
cd {{build_dir}} && ctest --output-on-failure
# Run pre-commit checks
lint:
pre-commit run --all-files
# Check code formatting (no changes)
format:
python3 ./tools/analyze.py --tool clang-format
# Format code (apply fixes)
format-fix:
python3 ./tools/analyze.py --tool clang-format --fix
# Run static analysis
analyze:
python3 ./tools/analyze.py
# Generate coverage report
coverage:
./tools/coverage.sh
# Run lint + test
check: lint test
# ─────────────────────────────────────────────────────────────────────────────
# Run & Deploy
# ─────────────────────────────────────────────────────────────────────────────
# Launch QGroundControl
run:
./{{build_dir}}/staging/QGroundControl
# Build documentation
docs:
npm run docs:build
# Build using Docker (Ubuntu)
docker:
./deploy/docker/run-docker-ubuntu.sh
# ─────────────────────────────────────────────────────────────────────────────
# Utilities
# ─────────────────────────────────────────────────────────────────────────────
# Show build configuration
info:
@echo "Qt version: {{qt_version}}"
@echo "Qt dir: {{qt_dir}}"
@echo "Build type: {{build_type}}"
@echo "Build dir: {{build_dir}}"
# Check dependency versions
check-deps:
./tools/check-deps.sh
# Clean all caches and build artifacts
distclean: clean
rm -rf .cache
rm -rf node_modules