Skip to content

Commit d3a5047

Browse files
committed
feat: initial monorepo with vika-sdk and vika-cli
- vika-sdk: HTTP client, types, records/fields/views/spaces/nodes API - vika-cli: clap CLI for AI agents, JSON output, --compact flag - 37 tests: 14 unit (sdk) + 10 unit (cli) + 13 mock integration (no API key needed) - GitHub Actions: CI on ubuntu/macos/windows, release with cross-platform binaries + crates.io publish
0 parents  commit d3a5047

21 files changed

Lines changed: 3417 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Test (${{ matrix.os }})
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@stable
18+
- uses: Swatinem/rust-cache@v2
19+
- run: cargo test --workspace

.github/workflows/release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
# ── Publish vika-sdk to crates.io ──────────────────────────────────────────
13+
publish-sdk:
14+
name: Publish vika-sdk
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: dtolnay/rust-toolchain@stable
19+
- uses: Swatinem/rust-cache@v2
20+
- run: cargo publish -p vika-sdk --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
21+
22+
# ── Build cross-platform binaries ──────────────────────────────────────────
23+
build:
24+
name: Build ${{ matrix.target }}
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
matrix:
28+
include:
29+
# Linux x86_64
30+
- os: ubuntu-latest
31+
target: x86_64-unknown-linux-gnu
32+
artifact: vika-linux-x86_64
33+
# Linux aarch64 (cross)
34+
- os: ubuntu-latest
35+
target: aarch64-unknown-linux-gnu
36+
artifact: vika-linux-aarch64
37+
cross: true
38+
# macOS x86_64
39+
- os: macos-latest
40+
target: x86_64-apple-darwin
41+
artifact: vika-macos-x86_64
42+
# macOS Apple Silicon
43+
- os: macos-latest
44+
target: aarch64-apple-darwin
45+
artifact: vika-macos-aarch64
46+
# Windows x86_64
47+
- os: windows-latest
48+
target: x86_64-pc-windows-msvc
49+
artifact: vika-windows-x86_64
50+
ext: .exe
51+
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: dtolnay/rust-toolchain@stable
55+
with:
56+
targets: ${{ matrix.target }}
57+
- uses: Swatinem/rust-cache@v2
58+
59+
- name: Install cross
60+
if: matrix.cross
61+
run: cargo install cross --git https://github.com/cross-rs/cross
62+
63+
- name: Build (native)
64+
if: "!matrix.cross"
65+
run: cargo build -p vika-cli --release --target ${{ matrix.target }}
66+
67+
- name: Build (cross)
68+
if: matrix.cross
69+
run: cross build -p vika-cli --release --target ${{ matrix.target }}
70+
71+
- name: Rename binary (unix)
72+
if: matrix.os != 'windows-latest'
73+
run: |
74+
cp target/${{ matrix.target }}/release/vika ${{ matrix.artifact }}
75+
76+
- name: Rename binary (windows)
77+
if: matrix.os == 'windows-latest'
78+
run: |
79+
cp target/${{ matrix.target }}/release/vika.exe ${{ matrix.artifact }}.exe
80+
81+
- name: Upload artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: ${{ matrix.artifact }}
85+
path: ${{ matrix.artifact }}${{ matrix.ext }}
86+
87+
# ── Create GitHub Release with all binaries ────────────────────────────────
88+
release:
89+
name: GitHub Release
90+
needs: build
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/download-artifact@v4
94+
with:
95+
path: artifacts
96+
merge-multiple: true
97+
98+
- name: Create release
99+
uses: softprops/action-gh-release@v2
100+
with:
101+
files: artifacts/*
102+
generate_release_notes: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)