C/C++ (CMake + CTest) support: tracking issue

Đang mở
#138 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, cmake, cpp, typescript

Hướng nghiên cứu

Read the adapter guide and the Rust model at src/repo/adapters/rust.ts, then inspect adapter registration in src/repo/adapters/index.ts and the release boundary. The tracking issue lists independent steps; choose an unblocked one and keep unsupported CMake forms in blockers so the full suite runs. Done for a step means its behavior is implemented and covered, with the final replay step requiring a public CMake repository and a published report.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

adapter enhancement help wanted

DiffCI works out what a change needs from CI, starting with the tests it affects, so AI coding agents (and people) can run them before pushing. It supports JS/TS, Vue, Go, Maven, pytest and Cargo today. C and C++ are open for contributors and design partners.

First supported setup: a CMake project whose tests are registered with CTest (add_test, or gtest_discover_tests / catch_discover_tests), run with ctest. Selection happens at the CMake target level first.

Steps (each is one PR; take any that are unblocked):

  • Map source files to targets from literal file lists in add_library / add_executable / target_sources
  • Build the target graph from target_link_libraries and add_subdirectory
  • Follow #include "..." to map changed headers to the targets that include them (quoted includes resolved against target_include_directories)
  • Map test targets to CTest tests and generate ctest -R '<regex>' (or ctest -L) commands for the selected tests
  • Fall back with a reason on what the graph can't see: file(GLOB ...), generator expressions, variables built in loops or conditions, include() of custom .cmake modules, configure_file outputs, macro-driven or generated sources, CMakeLists.txt / toolchain / preset changes
  • Register the adapter in REPOSITORY_ADAPTERS (src/repo/adapters/index.ts) and add it to the release boundary
  • Replay on one public CMake repository and publish the report

Ground rules

  • CMake files are code, not data. Read them statically and only trust simple, recognisable forms; anything else records a blockers entry and DiffCI runs the full suite. An empty graph must never look like "nothing affected".
  • Plain Makefiles, Meson and autotools are out of scope for the first version; they should be detected and fall back to the full suite with a clear reason. Bazel C/C++ is covered by the Bazel tracking issue.
  • Don't run CMake to fill gaps; the engine doesn't install or run project tooling.
  • Read the adapter guide first; the Rust adapter (src/repo/adapters/rust.ts) is a close model for target-level selection.
  • Discuss design questions here, so every step stays consistent.

Using C or C++ and want to help, or have a repository we could test against? Say so below. 👍 this issue if you'd use it; reactions on the language tracking issues decide what comes after.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DiffCI/core

Tất cả issue của DiffCI/core

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.