Skip to main content

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.

설치로 이동

소스 정보

저장소
stillwater-sc/universal
최근 소스 활동
2026년 3월 7일 18:51
감지된 SKILL.md 언어
영어
스타
501
포크
72

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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 and Test with Dual-Compiler Validation Build one or more CMake targets with both gcc and clang, run the executables, and report results. ## Arguments `$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. ## Build Directories | 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. ## CRITICAL Safety Rules These rules are non-negotiable. They exist because violating them previously caused a load=400 incident that required a hard server reset. 1. **ONE build at a time** — NEVER run multiple `make` or `cmake --build` commands concurrently 2. **Max `-j4`** — NEVER use `-j$(nproc)` or `-j` values above 8. Use `-j4` as default. 3. **Check first** — Before building, run `pgrep -a make` to verify no build is already running 4. **Sequential compilers** — Build with gcc FIRST, wait for completion, THEN build with clang ## Workflow For each target in `$ARGUMENTS`: ### Step 1: Safety Check ```bash pgrep -a make ``` If a build is running, STOP and tell the user. Do NOT proceed. ### Step 2: Build with gcc ```bash 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. ### Step 3: Run gcc executable Find the executable in `build_ci/` and run it: ```bash find build_ci/ -name "<target>" -type f -executable ``` Then run it and capture output. Report PASS or FAIL. ### Step 4: Build with clang ```bash cd build_ci_clang && cmake --build . --target <target> -j4 ``` ### Step 5: Run clang executable Find and run the clang-built executable. Report PASS or FAIL. ### Step 6: Summary Report a table like: | Target | gcc build | gcc test | clang build | clang test | |--------|-----------|----------|-------------|------------| | target_name | OK | PASS | OK | PASS | ## Finding Target Names If the user gives a partial name, search for matching targets: ```bash cd build_ci && cmake --build . --target help 2>&1 | grep -i "<partial>" ``` ## Common Target Patterns Test targets follow these naming conventions: - `posit_api`, `posit_traits`, `posit_manipulators` — posit API tests - `posit_ostream_formatting` — posit output formatting - `bt_ostream_formatting` — blocktriple output formatting - `er_api_ostream_formatting` — ereal output formatting - `<type>_<category>` — general pattern (e.g., `cfloat_arithmetic`, `lns_conversion`) ## Error Handling - **Build failure**: Report the last 20 lines of error output. Do NOT retry automatically. - **Test failure**: Report full test output. Look for `FAIL` lines in output. - **Missing target**: Search for similar targets and suggest alternatives. - **Missing build directory**: Tell the user to run cmake configuration first.
GitHub에서 보기