com um clique
build-test
// Build and test targets with both gcc and clang. Use when you need to build, compile, test, or verify code changes with dual-compiler validation.
// Build and test targets with both gcc and clang. Use when you need to build, compile, test, or verify code changes with dual-compiler validation.
Analyze a GitHub issue, explore related code, and propose or implement a fix. Use when the user asks to investigate, fix, or resolve a GitHub issue.
Scaffold a new number system type with all required files, CMake wiring, exception hierarchy, traits, tests, and numeric_limits. Use when adding a new arithmetic type to the Universal library.
| name | build-test |
| description | Build and test targets with both gcc and clang. Use when you need to build, compile, test, or verify code changes with dual-compiler validation. |
| user-invocable | true |
| argument-hint | <target-name> [target-name...] |
| allowed-tools | Bash, Read, Glob, Grep |
Build one or more CMake targets with both gcc and clang, run the executables, and report results.
$ARGUMENTS — one or more CMake target names (e.g., posit_ostream_formatting, bt_ostream_formatting posit_api)
If no arguments are provided, ask the user which target(s) to build.
| Directory | Compiler | Purpose |
|---|---|---|
build_ci/ | gcc (/usr/bin/g++) | Primary build |
build_ci_clang/ | clang (clang++) | Portability validation |
Both directories are pre-configured with cmake -DUNIVERSAL_BUILD_ALL=ON .. and ready for incremental builds.
These rules are non-negotiable. They exist because violating them previously caused a load=400 incident that required a hard server reset.
make or cmake --build commands concurrently-j4 — NEVER use -j$(nproc) or -j values above 8. Use -j4 as default.pgrep -a make to verify no build is already runningFor each target in $ARGUMENTS:
pgrep -a make
If a build is running, STOP and tell the user. Do NOT proceed.
cd build_ci && cmake --build . --target <target> -j4
If the build fails, report the error and skip to the next target. Do NOT proceed to clang for this target.
Find the executable in build_ci/ and run it:
find build_ci/ -name "<target>" -type f -executable
Then run it and capture output. Report PASS or FAIL.
cd build_ci_clang && cmake --build . --target <target> -j4
Find and run the clang-built executable. Report PASS or FAIL.
Report a table like:
| Target | gcc build | gcc test | clang build | clang test |
|---|---|---|---|---|
| target_name | OK | PASS | OK | PASS |
If the user gives a partial name, search for matching targets:
cd build_ci && cmake --build . --target help 2>&1 | grep -i "<partial>"
Test targets follow these naming conventions:
posit_api, posit_traits, posit_manipulators — posit API testsposit_ostream_formatting — posit output formattingbt_ostream_formatting — blocktriple output formattinger_api_ostream_formatting — ereal output formatting<type>_<category> — general pattern (e.g., cfloat_arithmetic, lns_conversion)FAIL lines in output.