-
Notifications
You must be signed in to change notification settings - Fork 0
feat: source build system, CI pipeline, Containerfile #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
71fe19d
feat: add claw-code-style build system (source build, CI, Containerfile)
BcKmini 879792d
fix: resolve CI failures — rustfmt alignment, validate-agents strict …
BcKmini b7a5508
fix: apply cargo fmt and fix clippy warnings
BcKmini c4e5e0e
fix: cargo fmt remaining files (handoff, watch, main)
BcKmini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - 'feat/**' | ||
| - 'fix/**' | ||
| - 'chore/**' | ||
| paths: | ||
| - '.github/workflows/ci.yml' | ||
| - 'rust/**' | ||
| - 'agents/**' | ||
| - 'tools/**' | ||
| - 'scripts/**' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '.github/workflows/ci.yml' | ||
| - 'rust/**' | ||
| - 'agents/**' | ||
| - 'tools/**' | ||
| - 'scripts/**' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: rust | ||
|
|
||
| # ── Job: validate agents ───────────────────────────────────────────────────── | ||
| jobs: | ||
| validate-agents: | ||
| name: Validate agent files | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: . | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Check agent MD files | ||
| run: bash scripts/validate-agents.sh | ||
|
|
||
| # ── Job: rustfmt ───────────────────────────────────────────────────────────── | ||
| fmt: | ||
| name: cargo fmt | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust -> target | ||
|
|
||
| - name: Check formatting | ||
| run: cargo fmt --all --check | ||
|
|
||
| # ── Job: clippy ────────────────────────────────────────────────────────────── | ||
| clippy: | ||
| name: cargo clippy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: clippy | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust -> target | ||
|
|
||
| - name: Run clippy | ||
| run: cargo clippy --workspace -- -D warnings | ||
|
|
||
| # ── Job: test ──────────────────────────────────────────────────────────────── | ||
| test: | ||
| name: cargo test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust -> target | ||
|
|
||
| - name: Run workspace tests | ||
| run: cargo test --workspace | ||
|
|
||
| # ── Job: Windows smoke build ───────────────────────────────────────────────── | ||
| windows-smoke: | ||
| name: Windows build smoke | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| working-directory: rust | ||
| shell: pwsh | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust -> target | ||
|
|
||
| - name: Build (debug) | ||
| run: cargo build --workspace | ||
|
|
||
| - name: Smoke test binary | ||
| run: | | ||
| $bin = "target\debug\claude-tools.exe" | ||
| if (Test-Path $bin) { | ||
| & $bin --version | ||
| Write-Host "claude-tools binary OK" | ||
| } else { | ||
| Write-Host "No claude-tools binary found (workspace may not include binary crate yet)" | ||
| } | ||
|
|
||
| # ── Job: dogfood build ─────────────────────────────────────────────────────── | ||
| dogfood: | ||
| name: Dogfood build (Linux) | ||
| runs-on: ubuntu-latest | ||
| needs: [fmt, clippy, test] | ||
| defaults: | ||
| run: | ||
| working-directory: . | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust -> target | ||
|
|
||
| - name: Build via dogfood script | ||
| run: | | ||
| bash scripts/dogfood-build.sh | ||
|
|
||
| - name: Validate agents with built binary | ||
| run: bash scripts/validate-agents.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| FROM rust:bookworm | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| ca-certificates \ | ||
| git \ | ||
| libssl-dev \ | ||
| pkg-config \ | ||
| python3 \ | ||
| python3-pip \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| ENV CARGO_TERM_COLOR=always | ||
| WORKDIR /workspace | ||
|
|
||
| # Pre-fetch dependencies so layer is cached | ||
| COPY rust/Cargo.toml rust/Cargo.lock ./rust/ | ||
| RUN cd rust && cargo fetch --locked 2>/dev/null || true | ||
|
|
||
| # Copy full source | ||
| COPY . . | ||
|
|
||
| RUN cd rust && cargo build --workspace --release \ | ||
| && cp target/release/claude-tools /usr/local/bin/claude-tools | ||
|
|
||
| CMD ["bash"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows 스모크 테스트가 바이너리 누락 시 실패하지 않습니다.
PowerShell 스크립트는
claude-tools.exe가 없을 때 메시지만 출력하고 정상 종료됩니다. 이는 빌드가 바이너리를 생성하지 못해도 테스트가 통과하는 것을 의미하며, 빌드 실패를 감지하지 못할 수 있습니다.주석에 "workspace may not include binary crate yet"라고 명시되어 있지만, PR 목표에 따르면 바이너리 크레이트가 존재해야 합니다. 바이너리가 누락되면 테스트가 실패해야 합니다.
제안하는 수정
- name: Smoke test binary run: | $bin = "target\debug\claude-tools.exe" if (Test-Path $bin) { & $bin --version Write-Host "claude-tools binary OK" } else { - Write-Host "No claude-tools binary found (workspace may not include binary crate yet)" + Write-Error "claude-tools binary not found at $bin" + exit 1 }📝 Committable suggestion
🤖 Prompt for AI Agents