Skip to content

Commit d5b26a2

Browse files
committed
ci: add minimal github actions workflow
1 parent 351efbc commit d5b26a2

3 files changed

Lines changed: 172 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: dtolnay/rust-toolchain@stable
11+
- run: cargo clippy -- -D warnings
12+
- run: cargo test
13+
- run: cargo check
14+
- name: Header drift check
15+
run: |
16+
cargo install cbindgen --locked
17+
cbindgen --config cbindgen.toml --output /tmp/kore_check.h
18+
diff include/kore.h /tmp/kore_check.h
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Kore CI Design
2+
3+
## Goal
4+
5+
Add a minimal GitHub Actions workflow that protects the current `kore` milestone by verifying lint, tests, build health, and generated-header drift on every push and pull request.
6+
7+
## Scope
8+
9+
This phase is intentionally small. It adds one Ubuntu-based CI job, tags the current milestone commit as `v0.1.0-dev`, and pushes the branch/tag to GitHub. It does not add matrix builds, release automation, or deployment steps.
10+
11+
## Workflow Shape
12+
13+
The workflow lives at `.github/workflows/ci.yml` and runs on `push` and `pull_request`. It uses the stable Rust toolchain, then runs:
14+
15+
- `cargo clippy -- -D warnings`
16+
- `cargo test`
17+
- `cargo check`
18+
- a header drift check using `cbindgen`
19+
20+
The header drift check installs `cbindgen`, regenerates `/tmp/kore_check.h`, and diffs it against `include/kore.h`.
21+
22+
## Git Sequence
23+
24+
The current milestone commit `351efbc` should be tagged first as `v0.1.0-dev` using an annotated tag. Then `main` and the tag should be pushed. After that, the CI workflow is added, committed, pushed, and observed until the GitHub Actions run passes.
25+
26+
## Non-Goals
27+
28+
- Windows/macOS CI
29+
- release workflows
30+
- caches or performance optimization
31+
- badge/README polish
32+
33+
## Verification
34+
35+
The phase is complete when:
36+
37+
- the tag exists locally and on GitHub
38+
- `.github/workflows/ci.yml` is present and committed
39+
- the pushed GitHub Actions run is green
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Kore CI Implementation Plan
2+
3+
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4+
5+
**Goal:** Tag the current milestone and add a minimal GitHub Actions workflow that keeps `kore` green on pushes and pull requests.
6+
7+
**Architecture:** Keep CI intentionally small: one Ubuntu job, stable Rust, four verification commands. Tag the current milestone first, then commit and push the CI workflow so GitHub can validate the repository automatically.
8+
9+
**Tech Stack:** Git, GitHub CLI, GitHub Actions, Rust, cbindgen
10+
11+
---
12+
13+
### Task 1: Tag the milestone commit
14+
15+
**Files:**
16+
- No file changes
17+
18+
**Step 1: Verify the current HEAD**
19+
20+
Run: `git rev-parse --short HEAD`
21+
Expected: `351efbc`
22+
23+
**Step 2: Create the annotated tag**
24+
25+
Run:
26+
27+
```bash
28+
git tag -a v0.1.0-dev -m "Stable CPU kernel + C ABI milestone"
29+
```
30+
31+
**Step 3: Push branch and tag**
32+
33+
Run:
34+
35+
```bash
36+
git push origin main && git push origin v0.1.0-dev
37+
```
38+
39+
**Step 4: Verify tag exists remotely**
40+
41+
Run: `git ls-remote --tags origin v0.1.0-dev`
42+
Expected: one matching remote tag line
43+
44+
### Task 2: Add minimal GitHub Actions workflow
45+
46+
**Files:**
47+
- Create: `.github/workflows/ci.yml`
48+
49+
**Step 1: Write the workflow**
50+
51+
```yaml
52+
name: CI
53+
54+
on: [push, pull_request]
55+
56+
jobs:
57+
check:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: dtolnay/rust-toolchain@stable
62+
- run: cargo clippy -- -D warnings
63+
- run: cargo test
64+
- run: cargo check
65+
- name: Header drift check
66+
run: |
67+
cargo install cbindgen --locked
68+
cbindgen --config cbindgen.toml --output /tmp/kore_check.h
69+
diff include/kore.h /tmp/kore_check.h
70+
```
71+
72+
**Step 2: Run local equivalence checks**
73+
74+
Run:
75+
76+
```bash
77+
cargo clippy -- -D warnings && cargo test && cargo check && cbindgen --config cbindgen.toml --output /tmp/kore_check.h && diff include/kore.h /tmp/kore_check.h
78+
```
79+
80+
Expected: PASS
81+
82+
**Step 3: Commit the workflow**
83+
84+
Run:
85+
86+
```bash
87+
git add .github/workflows/ci.yml docs/plans/2026-03-20-kore-ci-design.md docs/plans/2026-03-20-kore-ci-implementation.md
88+
git commit -m "ci: add minimal github actions workflow"
89+
```
90+
91+
### Task 3: Push CI and confirm GitHub Actions is green
92+
93+
**Files:**
94+
- No intended file changes
95+
96+
**Step 1: Push the new workflow commit**
97+
98+
Run: `git push origin main`
99+
Expected: push succeeds
100+
101+
**Step 2: Watch the latest GitHub Actions run**
102+
103+
Run: `gh run watch --exit-status`
104+
Expected: workflow completes successfully
105+
106+
**Step 3: Verify final run status**
107+
108+
Run: `gh run list --limit 1`
109+
Expected: latest `CI` run shows `completed success`
110+
111+
## Notes For Execution
112+
113+
- Keep the workflow intentionally minimal.
114+
- Do not add matrix jobs, caches, release jobs, or badges in this phase.
115+
- If GitHub Actions fails due to an environment-specific issue, fix only the blocking CI issue and re-run.

0 commit comments

Comments
 (0)