Repository navigation
Building Testing and CI CD
Andrew Paolucci edited this page Nov 19, 2026
·
4 revisions
-
Rust Toolchain:
1.88+supporting Rust 2024 Edition (rustfmt+clippycomponents installed). -
Windows: Builds cleanly on both
x86_64-pc-windows-msvcandx86_64-pc-windows-gnu(ensurewindresorx86_64-w64-mingw32-windresis onPATHfor GNU resource compilation inrobocopy2rust-win32). -
Linux (
ubuntu-latestCI baseline): Install system font/GUI development headers required byiced(wgpu/winit/fontconfig) andrfd(gtk3):sudo apt-get update && sudo apt-get install -y \ libssl-dev libfontconfig1-dev libgtk-3-dev \ libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev \ libgl1-mesa-dev libglu1-mesa-dev libwayland-dev \ libxkbcommon-dev libxkbcommon-x11-dev \ libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev -
macOS (
aarch64-apple-darwin&x86_64-apple-darwin): Xcode Command Line Tools (cargo build --workspace --releaselinks AppKit/Metal automatically).
git clone https://github.com/adpaolucci/robocopy2rust.git
cd robocopy2rust
# 1. Check all crates and targets
cargo check --workspace --all-targets
# 2. Enforce formatting
cargo fmt --all -- --check
# 3. Strict linting (warnings fail build)
cargo clippy --workspace --all-targets -- -D warnings
# 4. Run full unit + Windows real-robocopy integration test suite
cargo test --workspace
# 5. Build optimized release binaries
cargo build --workspace --release-
Release Profile (Cargo.toml):
opt-level = 3,lto = "thin",codegen-units = 1,panic = "abort",strip = true. -
Dev Profile Optimization:
clap,clap_builder, andclap_derivecompile atopt-level = 2even in debug builds for snappy CLI responsiveness. -
Windows Stack Size (.cargo/config.toml): Sets a 16 MiB stack (
16777216bytes) for bothmsvcandgnuWindows targets.
All 24 tests pass cleanly (cargo test --workspace) across the 7 crates:
| Crate | Count | Verified Behaviors |
|---|---|---|
robocopy2rust-core |
11 | Path normalization (preserving C:\ & UNC roots), CommandLineToArgvW backslash-doubling quoting, ordered /MIR + /XF + /XD formatting, complex CLI round-trip parsing, UTF-8 & UTF-16LE .rcj round-trip, [KMGTP] size token parsing, lowercase hex encoding (encode_hex_lower), all 0..=16 exit codes, all 8 presets passing validation cleanly, /MT incompatibility & nested-path validation detection, atomic ProfileStore CRUD |
robocopy2rust-mcp |
3 | JSON-RPC initialize (2024-11-05) & tools/list returning 9 tools, robocopy2rust_run blocking destructive /MIR without confirm_destructive=true, mcp_dry_run_executes_real_robocopy_safely (Windows live robocopy.exe /L check confirming files are not copied) |
robocopy2rust-cli |
3 |
Cli::try_parse_from parsing across gui --iced & build, assemble_job preset loading + CLI override precedence, destructive run --mirror refusal when --yes is omitted |
robocopy2rust-runner |
2 | Real Robocopy log-line & suffixed byte summary parsing, executes_real_robocopy_copy_sync_dryrun_and_mirror (real Windows robocopy.exe executing /L dry-run → copy exit 1 → synced exit 0 → extra exit 2 → /MIR purge) |
robocopy2rust-report |
1 | Legacy log parsing (/L dry-run detection, summary counts) & full offline html/json/md bundle emission verified free of remote CDNs or external <script src=>
|
robocopy2rust-win32 |
2 | CLI launch argument + positional .rcj parsing, Win32State preset application preserving Source/Destination paths (plus embedded app.ico icon & PerMonitorV2 manifest) |
robocopy2rust-iced |
2 | Preset path preservation & destructive modal guard activation, raw command import + batch queue add/duplicate/remove actions (plus embedded icon_32x32.rgba window icon) |
(Windows-only real robocopy.exe tests in runner and mcp are gated with #[cfg(windows)] so Linux and macOS CI runs cleanly.)
Continuous Integration (.github/workflows/ci.yml)
Triggered on every push and pull_request to main across ubuntu-latest, windows-latest, and macos-latest (alongside automated GitHub CodeQL security scanning on main):
cargo check --workspace --all-targetscargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --verbosecargo build --workspace --release-
denyjob (EmbarkStudios/cargo-deny-action@v2): Enforcesdeny.toml(check advisories licenses sources) on every push and PR.
-
Workflow (.github/workflows/release.yml): Triggered on
v*tags or manualworkflow_dispatch; packagesx86_64-pc-windows-msvc(.zip),x86_64-unknown-linux-gnu(.tar.gz),aarch64-apple-darwin(.tar.gz), andx86_64-apple-darwin(.tar.gz), each bundling binaries,README.md,LICENSE,NOTICE, andCHANGELOG.mdalongside per-archive.sha256and consolidatedSHA256SUMS.txtviasoftprops/action-gh-release@v3. -
Published Release:
v0.1.0is live with verified checksums and ready-to-submit WinGet & Homebrew manifests underpackaging/.
Contributing Invariants (CONTRIBUTING.md)
-
Safety First: Preserve Dry-Run (
/L) workflows and explicit confirmation gates around/MIR,/PURGE,/MOVE, and/MOVacross Win32 GUI, Iced GUI, CLI, and MCP. -
100% Pure Rust UI/Engine: Keep all GUI rendering, parsing, validation, and report generation pure Rust (only wrapping
robocopy.exefor transfer execution). -
Quoting Integrity: Never allow trailing backslashes to escape closing double quotes (
C:\→"C:\\", non-rootC:\foo\→"C:\foo"). -
Clean
stdout/stdio: Routetracingdiagnostics solely tostderr.
robocopy2rust (v0.1.0) • GUAP Ecosystem (guap.ca) • Rust 2024 Edition • Apache-2.0 License • Repository • Security Policy