From ec9edc294fd5e7e29977fc7b0e6fb953422bc0e2 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 19 Aug 2026 05:54:00 +0800 Subject: chore: reorganize dev tools into dev/ directory and consolidate configs Move CI, dev tools, and configs from root-level scattered locations into a unified `dev/` directory structure. Update all references across build scripts, documentation, and editor configurations. Also consolidate editor config generation into build.rs for automated synchronization of rust-analyzer settings across VS Code and Zed. --- mingling_ci/src/task/cmd_example_check.rs | 69 ------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 mingling_ci/src/task/cmd_example_check.rs (limited to 'mingling_ci/src/task/cmd_example_check.rs') diff --git a/mingling_ci/src/task/cmd_example_check.rs b/mingling_ci/src/task/cmd_example_check.rs deleted file mode 100644 index 1b9f440..0000000 --- a/mingling_ci/src/task/cmd_example_check.rs +++ /dev/null @@ -1,69 +0,0 @@ -use colored::Colorize; -use mingling::{ - Grouped, Routable, - macros::{buffer, command, renderer}, - res::ResExitCode, -}; - -use crate::Next; -use crate::examples::{check_example, load_test_configs}; -use crate::progress::task_progress_bar; -use crate::reporter::{self, ReportResult}; - -#[command(node = "example-check")] -pub async fn example_check() -> Next { - reporter::set_task("Example-Check"); - - let configs = load_test_configs(); - let total = configs.len(); - let pb = task_progress_bar(total, "Testing"); - pb.set_message("examples"); - - // One blocking task per example: build + run its test cases. - let mut handles = Vec::new(); - for example in configs { - handles.push(tokio::task::spawn_blocking(move || check_example(example))); - } - - let mut fail_count = 0; - for handle in handles { - let Ok(outcome) = handle.await else { - continue; - }; - pb.set_message(outcome.name.clone()); - pb.inc(1); - - if outcome.ok { - reporter::export(&outcome.name, &outcome.location, ReportResult::Ok); - } else { - fail_count += 1; - // Plain stderr: `pb.println` is swallowed on non-TTY (CI). - eprintln!(" {} {}", "failed".bright_red(), outcome.name); - eprintln!(" {}", outcome.output); - reporter::export( - &outcome.name, - &outcome.location, - ReportResult::Error(outcome.output), - ); - } - } - - pb.finish_and_clear(); - reporter::flush(); - - ResultExampleCheck { fail_count }.to_chain() -} - -/// Number of examples that failed to build or pass their tests. -#[derive(Grouped)] -pub struct ResultExampleCheck { - pub fail_count: usize, -} - -/// Silently sets a non-zero exit code when any example failed. -#[renderer(buffer)] -pub fn render_example_check(r: ResultExampleCheck, exit_code: &mut ResExitCode) { - if r.fail_count > 0 { - exit_code.exit_code = 1; - } -} -- cgit