Skip to content

Commit 780300c

Browse files
committed
Initial commit: kq — Git-native knowledge platform
0 parents  commit 780300c

90 files changed

Lines changed: 13703 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
build-and-test:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- os: ubuntu-24.04
16+
target: x86_64-unknown-linux-gnu
17+
- os: macos-latest
18+
target: aarch64-apple-darwin
19+
- os: windows-latest
20+
target: x86_64-pc-windows-msvc
21+
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install Rust
28+
uses: dtolnay/rust-toolchain@stable
29+
with:
30+
targets: ${{ matrix.target }}
31+
components: clippy${{ matrix.os == 'ubuntu-24.04' && ', rustfmt' || '' }}
32+
- name: Cache cargo registry and target
33+
uses: Swatinem/rust-cache@v2
34+
35+
- name: Build
36+
run: cargo build --workspace --target ${{ matrix.target }}
37+
38+
- name: Clippy
39+
run: cargo clippy --workspace --target ${{ matrix.target }} -- -D warnings
40+
- name: Test
41+
run: cargo test --workspace --target ${{ matrix.target }}
42+
- name: Format check
43+
if: matrix.os == 'ubuntu-24.04'
44+
run: cargo fmt --check

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- os: ubuntu-24.04
15+
target: x86_64-unknown-linux-gnu
16+
ext: ""
17+
- os: macos-latest
18+
target: aarch64-apple-darwin
19+
ext: ""
20+
- os: windows-latest
21+
target: x86_64-pc-windows-msvc
22+
ext: ".exe"
23+
24+
runs-on: ${{ matrix.os }}
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Install Rust
30+
uses: dtolnay/rust-toolchain@stable
31+
with:
32+
targets: ${{ matrix.target }}
33+
34+
- name: Cache cargo
35+
uses: Swatinem/rust-cache@v2
36+
37+
- name: Build (release)
38+
run: cargo build --release --target ${{ matrix.target }}
39+
40+
- name: Test
41+
run: cargo test --release --target ${{ matrix.target }}
42+
43+
- name: Upload binary
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: kq-${{ matrix.target }}
47+
path: target/${{ matrix.target }}/release/kq${{ matrix.ext }}
48+
49+
release:
50+
needs: build
51+
runs-on: ubuntu-24.04
52+
permissions:
53+
contents: write
54+
55+
steps:
56+
- name: Download binaries
57+
uses: actions/download-artifact@v4
58+
59+
- name: Archive and release
60+
uses: softprops/action-gh-release@v2
61+
with:
62+
generate_release_notes: true
63+
files: |
64+
kq-x86_64-unknown-linux-gnu/kq
65+
kq-aarch64-apple-darwin/kq
66+
kq-x86_64-pc-windows-msvc/kq.exe

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Rust build artifacts
2+
/target
3+
**/*.rs.bk
4+
5+
# Cargo.lock is included for binaries (kq-cli is a binary)
6+
# For libraries, it's typically omitted, but we keep it for reproducibility
7+
Cargo.lock
8+
9+
# IDE
10+
.idea/
11+
.vscode/
12+
13+
# Editor swap files
14+
*.swp
15+
*.swo
16+
17+
# macOS
18+
.DS_Store
19+
20+
# Python
21+
*.pyc
22+
__pycache__/
23+
24+
# Downloaded embedding models
25+
/models/
26+
27+
# Local knowledge graph state
28+
.kq/
29+
30+
/.crew/
31+
/.crew
32+
!.crew/artifacts/
33+
!.crew/graphs/
34+
!.crew/artifacts/.gitkeep
35+
!.crew/graphs/.gitkeep

0 commit comments

Comments
 (0)