본문으로 건너뛰기
cccskills
무료GitHub에 공개

build-and-test

Configure, build and test dynamic-neural-field-composer. Use whenever you need to compile the library, run the GoogleTest suite, verify a change builds, or reproduce a test failure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Build and test

Where things are

All commands run from the nested project root, dynamic-neural-field-composer/ inside the repository - not the repository root.

VCPKG_ROOT must be set in the environment; the CMake presets read it. If it is unset, run scripts/setup.sh (Linux/macOS) or scripts/setup.bat (Windows) once to install the dependencies. Neither script leaves VCPKG_ROOT set in the shell you ran it from - setup.sh only exports inside its own process, and setup.bat writes it via setx, which only reaches shells opened afterward. Open a new shell before configuring, or set the variable directly for the current session.

On Windows the presets use Ninja with MSVC, so cl.exe must be on PATH. Run from a shell that has the MSVC environment loaded (a Developer Command Prompt, or after sourcing vcvars64.bat). See Troubleshooting for which MSVC to load.

On Windows, re-assert VCPKG_ROOT after loading the MSVC environment. vcvars64.bat overwrites VCPKG_ROOT to point at Visual Studio's bundled vcpkg, which does not have this project's packages installed. The presets expand $env{VCPKG_ROOT} after that, so they pick up the wrong toolchain. Snapshot the value before loading MSVC and set it back afterwards - scripts/build.bat does exactly this, for exactly this reason.

On an already-configured tree the cached toolchain wins and the problem stays invisible; a fresh configure is where it bites.

Configure

The project ships CMakePresets.json. Use it - it resolves the generator, build directory and vcpkg toolchain for you, so nothing needs a hardcoded path:

cmake --preset release      # or: debug

Presets are release and debug, both Ninja, writing to build/release and build/debug. Confirm what is available with cmake --list-presets.

Configure once per checkout. Re-run if CMakeLists.txt, CMakePresets.json, or the vcpkg toolchain/dependency set changed - CMake does not watch any of these on its own.

Build

Cap parallelism at 4. Several agents may be building on the same machine at once; unbounded --parallel oversubscribes every core and slows all of them down.

cmake --build --preset release --target dnf_composer_tests --parallel 4

Targets: dnf_composer_tests, dnf_composer_lib, dynamic-neural-field-composer (the GUI app), dnf_composer_benchmark, dnf_composer_deckbench, dnf_composer_profiler, dnf_composer_kernelbench.

A cold build takes several minutes - run it in the background rather than blocking on a foreground timeout.

Test

Run the GoogleTest binary directly. CMakePresets.json defines no test presets, so this is the reliable path:

./build/release/tests/dnf_composer_tests          # .exe on Windows
./build/release/tests/dnf_composer_tests --gtest_filter="SuiteName.*"    # TDD inner loop

ctest --test-dir build/release --output-on-failure also works when the available ctest is new enough - see Troubleshooting.

Golden-data tests regenerate with DNF_UPDATE_GOLDEN=1. Only do this when the change to the reference values is intentional and you can explain why each one moved.

Adding a test file

tests/CMakeLists.txt lists the core sources explicitly (elements/, simulation/, tools/, exceptions/, application/). A new file there that isn't added to the list is silently never compiled, and the suite will go green without ever having run it. Add it, then reconfigure before building.

golden/, user_interface/ and visualization/ are auto-discovered via file(GLOB ... CONFIGURE_DEPENDS ...) - a new file there just needs a reconfigure, no list edit.

Working in an existing build tree

scripts/build.bat, build.sh and build_macos.sh create different trees from the presets - build/x64-release, build/linux-release, build/macos-release. Prefer the presets. If you must use an existing tree, pick whichever directory under build/ actually has a CMakeCache.txt, and read that cache for its generator and compiler.

Troubleshooting

Every translation unit fails with STL1001: Unexpected compiler version. The MSVC environment you loaded does not match the compiler the build tree was configured with, so one toolchain's STL headers are being fed to another's compiler. The rule: the vcvars you source must match CMAKE_CXX_COMPILER in that tree's CMakeCache.txt. Check it:

grep "^CMAKE_CXX_COMPILER:" build/release/CMakeCache.txt

Beware vswhere -latest when more than one Visual Studio is installed - it can select a newer one than the tree was configured with. scripts/build.bat uses vswhere -latest and carries this latent bug; it survives only because it configures from scratch, so CMake and vcvars end up agreeing.

ctest fails demanding a newer CMake (CMake 3.30 or higher is required). The ctest on PATH is older than the CMake that generated the build tree - common when an IDE with a bundled CMake configured it. ctest must be at least the generator's CMake version. Either invoke the matching ctest, or just run the gtest binary directly.

Reporting results

Report what actually happened, with real output:

  • Green: say so plainly, with the test count.
  • Red: paste the failing assertion and the test name. Do not summarise a failure as "some tests failed" - the actual message is the useful part.
  • Check the build's own exit code, not a pipeline's. Piping cmake into tail or Select-Object returns the pipe's status, so a failed build reports success. Capture the exit code directly, or scan the output for FAILED:.
  • Do not claim verification you did not perform. If you only built and did not run the suite, say that.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

autopilot

무료

Orchestrate unattended resolution of open GitHub issues - triage by complexity, dispatch parallel worker agents into isolated worktrees, review their diffs, open PRs, and monitor CI and CodeRabbit until green. Use when asked to work through open issues autonomously or put Claude on auto-pilot.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jgocunha/dynamic-neural-field-composer192026년 10월 9일 업데이트

commit

무료

Read the uncommitted diff in dynamic-neural-field-composer and print conventional commit message(s) for it, grouped by logical change. Use when asked to write, suggest or draft a commit message, or "what should I commit this as".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jgocunha/dynamic-neural-field-composer192026년 10월 9일 업데이트

Verify documentation keeps up with a code change in dynamic-neural-field-composer - Doxygen on public API, the matching wiki page, and stale references elsewhere. Use before opening a PR, or when asked whether docs need updating.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jgocunha/dynamic-neural-field-composer192026년 10월 9일 업데이트

Check a change for performance regression against this machine's recorded baseline - decide whether the diff needs checking, run the deck benchmark under the hygiene wrapper, and attribute any regression to an element. Use before opening a PR that touches the simulation hot path.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jgocunha/dynamic-neural-field-composer192026년 10월 9일 업데이트

pr

무료

Read the branch diff in dynamic-neural-field-composer and print a PR title and description in chat, filling the repo's pull request template. Use when asked to write, draft or suggest a PR title/description, or "what should the PR say".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jgocunha/dynamic-neural-field-composer192026년 10월 9일 업데이트

Review a diff against dynamic-neural-field-composer's own standards - backwards compatibility, Clean Code, tools/ helper reuse, C++20 idiom, hot-path performance, and test coverage. Use before opening a PR or when asked to review a branch or change.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jgocunha/dynamic-neural-field-composer192026년 10월 9일 업데이트

Jgocunha의 스킬 모두 보기

이 스킬의 문제 신고