commit a232e9ffa88dd984eef36c139ca06267b162167a
parent f46d832f51c6f3b0fda9a7e1afa62bd47ff46488
Author: andrewlaack-collab <andrew.laack@imbue.com>
Date: Mon, 16 Feb 2026 22:27:30 +0000
Support PKGBUILD + CI (#88)
* Added pkg build
* Refactoring
* Updated deployment messaging
* Updated pkgbuild tests
* Fixing pkgbuild test
* Moving packaging stuff around
* Add package building process
* Updated test logging, github action naming stuff, and documentation
* Added comments to test
---------
Co-authored-by: Andrew Laack <andrew@laack.co>
Diffstat:
11 files changed, 205 insertions(+), 62 deletions(-)
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
@@ -0,0 +1,22 @@
+name: Publish / PyPI
+on:
+ push:
+ tags:
+ - "v*"
+
+jobs:
+ pypi:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+ - name: Install build tools
+ run: python -m pip install --upgrade pip build
+ - name: Build package
+ run: python -m build
+ - name: Publish to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml
@@ -1,22 +0,0 @@
-name: Publish to PyPI
-on:
- push:
- tags:
- - "v*"
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
- with:
- python-version: "3.12"
- - name: Install build tools
- run: python -m pip install --upgrade pip build
- - name: Build package
- run: python -m build
- - name: Publish to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
- with:
- password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/.github/workflows/test-pkgbuild.yml b/.github/workflows/test-pkgbuild.yml
@@ -0,0 +1,16 @@
+name: Test / PKGBUILD
+
+on:
+ workflow_dispatch:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ pkgbuild:
+ if: github.event.pull_request.draft == false
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - run: ./pkg/arch/test.sh
diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml
@@ -0,0 +1,29 @@
+name: Test / Unit
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ unit:
+ if: github.event.pull_request.draft == false
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+
+ - name: Set up Python
+ run: uv python install 3.12
+
+ - name: Install dependencies
+ run: uv sync
+
+ - name: Run tests
+ run: uv run pytest
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
@@ -1,29 +0,0 @@
-name: Tests
-
-on:
- push:
- branches: [main]
- pull_request:
- branches: [main]
-
-jobs:
- test:
- if: github.event.pull_request.draft == false
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Install uv
- uses: astral-sh/setup-uv@v4
-
- - name: Set up Python
- run: uv python install 3.12
-
- - name: Install dependencies
- run: uv sync
-
- - name: Run tests
- run: uv run pytest
diff --git a/.gitignore b/.gitignore
@@ -77,6 +77,13 @@ secrets.toml
.aider*
wandb/
+# makepkg (Arch Linux PKGBUILD)
+pkg/arch/src/
+pkg/arch/pkg/
+*.pkg.tar*
+*.src.tar*
+v*.tar.gz
+
# Project-specific
.imbue/
vet-output.txt
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
@@ -10,13 +10,15 @@ uv sync
## Running Tests
-All tests are run with:
+### Unit tests
+
+All unit tests are run with:
```bash
uv run pytest
```
-This must remain the sole way to run the test suite. Any new tests or test infrastructure changes should preserve `uv run pytest` as the single entry point for running tests.
+This command should be preserved the sole way to run unit tests.
## Concepts
@@ -45,27 +47,47 @@ Based on your needs, instead of the above, you can also extend one of the existi
In that case you would simply expand the rubric in the prompt. That is actually the preferred way to catch issues at the moment due to efficiency.
Refer to the source code for more details.
-## Continuous Deployment (CD)
+## CI / CD
+
+### GitHub Actions naming conventions
+
+Workflows follow a consistent naming scheme across three layers:
+
+- **File name**: `<verb>-<target>.yml` (e.g. `test-unit.yml`)
+- **Display name** (`name:`): `<Verb> / <Target>` (e.g. `Test / Unit`)
+- **Job name**: short target identifier (e.g. `unit`)
+
+The `/` in display names creates visual grouping in the GitHub Actions UI. Group related workflows under a shared prefix (e.g. `Test /`, `Publish /`). Standalone workflows (e.g. `Vet`) don't need a prefix.
+
+Current workflows:
+
+- `test-unit.yml` (`Test / Unit`, job: `unit`) — pytest suite (lint + unit tests)
+- `test-pkgbuild.yml` (`Test / PKGBUILD`, job: `pkgbuild`) — Arch Linux package build + smoke test
+- `vet.yml` (`Vet`, job: `vet`) — Self-review via vet on PRs
+- `publish-pypi.yml` (`Publish / PyPI`, job: `pypi`) — Build and publish to PyPI on tag push
+
+### Continuous Deployment
-Vet is published to PyPI via the `publish-to-pypi.yml` GitHub Actions workflow. Deployment is triggered by pushing a git tag that starts with `v` (e.g. `v0.2.0`).
+Vet is published to PyPI via the `publish-pypi.yml` GitHub Actions workflow. Deployment is triggered by pushing a git tag that starts with `v` (e.g. `v0.2.0`).
### Releasing a new version
1. Create and checkout a branch to bump the version
2. Update the version in `pyproject.toml`
-3. Update the recommended GitHub action pinned version in the `README.md`
+3. Update `pkgver` in `pkg/arch/PKGBUILD`
+4. Update the recommended GitHub action pinned version in the `README.md`
```yaml
- run: pip install verify-everything==0.2.0
```
-4. Commit and push the changes
-5. Tag the commit and push the tag:
+5. Commit and push the changes
+6. Tag the commit and push the tag:
```bash
git tag v0.2.0 -m "v0.2.0: Updated XYZ"
git push origin v0.2.0
```
-5. Create a PR for the new branch
-6. The `Publish to PyPI` workflow will automatically build and publish the package
-7. Merge PR into main.
+7. Create a PR for the new branch
+8. The `Publish / PyPI` workflow will automatically build and publish the package
+9. Merge PR into main.
### Why pin the version in the README?
diff --git a/README.md b/README.md
@@ -2,7 +2,7 @@
[](https://pypi.python.org/pypi/verify-everything/)
[](https://www.gnu.org/licenses/agpl-3.0)
-
+
Vet is a standalone verification tool for **code changes** and **coding agent behavior**.
diff --git a/pkg/arch/PKGBUILD b/pkg/arch/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer:
+pkgname=verify-everything
+pkgver=0.1.6
+pkgrel=1
+pkgdesc='LLM-based code review tool that finds issues tests and linters miss'
+arch=('any')
+url='https://github.com/imbue-ai/vet'
+license=('AGPL-3.0-only')
+depends=('python>=3.11' 'git')
+install=verify-everything.install
+source=("$url/archive/refs/tags/v$pkgver.tar.gz")
+sha512sums=('SKIP')
+
+package() {
+ local _installdir="/opt/$pkgname"
+ local _venv="$pkgdir/$_installdir"
+
+ python -m venv "$_venv"
+
+ "$_venv/bin/pip" install --no-warn-script-location "$srcdir/vet-$pkgver"
+
+ "$_venv/bin/pip" uninstall -y pip setuptools 2>/dev/null || true
+
+ find "$_venv" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
+
+ find "$_venv" -name direct_url.json -delete 2>/dev/null || true
+
+ find "$_venv" -name '*.dist-info' -path '*/pip-*' -exec rm -rf {} + 2>/dev/null || true
+ find "$_venv" -name '*.dist-info' -path '*/setuptools-*' -exec rm -rf {} + 2>/dev/null || true
+
+ sed -i "s|$pkgdir||g" "$_venv/pyvenv.cfg"
+ find "$_venv/bin" -maxdepth 1 -type f -exec sed -i "s|$pkgdir||g" {} +
+
+ install -d "$pkgdir/usr/bin"
+ ln -s "$_installdir/bin/vet" "$pkgdir/usr/bin/vet"
+}
diff --git a/pkg/arch/test.sh b/pkg/arch/test.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# builds Arch package from working tree, installs it, runs a few non-llm vet commands, tests uninstall
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
+CONTAINER_NAME="vet-pkgbuild-test-$$"
+
+cleanup() {
+ docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true
+}
+trap cleanup EXIT
+
+# arch container w/ read-only mounted code
+docker run --name "$CONTAINER_NAME" -d -v "$REPO_ROOT":/repo:ro archlinux:base-devel sleep 600
+
+run() {
+ docker exec "$CONTAINER_NAME" bash -c "$1"
+}
+
+run "pacman -Syu --noconfirm python git"
+
+# prep build env
+run "
+ useradd -m builder &&
+ mkdir /build && cp /repo/pkg/arch/PKGBUILD /repo/pkg/arch/verify-everything.install /build/ &&
+
+ tar -czf /build/vet-current.tar.gz -C /repo --transform='s,^\.,vet-current,' \
+ --exclude='.git' --exclude='pkg/arch/test.sh' . &&
+
+ sed -i 's|^source=.*|source=(\"vet-current.tar.gz\")|' /build/PKGBUILD &&
+ sed -i 's|\$srcdir/vet-\$pkgver|\$srcdir/vet-current|' /build/PKGBUILD &&
+
+ chown -R builder:builder /build
+"
+
+# build + install
+run "su - builder -c 'cd /build && makepkg -sf --noconfirm'"
+run "pacman -U --noconfirm /build/verify-everything-*-any.pkg.tar.zst"
+
+# basic non-llm commands
+run "command -v vet"
+run "vet --help"
+run "vet --version"
+run "vet --list-issue-codes"
+
+# uninstall
+run "pacman -R --noconfirm verify-everything"
+
+if run "command -v vet" 2>/dev/null; then
+ echo "FAIL: vet still found after uninstall"
+ exit 1
+fi
+
+if run "test -d /opt/verify-everything"; then
+ echo "FAIL: /opt/verify-everything still exists after uninstall"
+ exit 1
+fi
diff --git a/pkg/arch/verify-everything.install b/pkg/arch/verify-everything.install
@@ -0,0 +1,3 @@
+post_remove() {
+ rm -rf /opt/verify-everything
+}