Add advisory pre-push gates
Some checks failed
akbasic CI Build / cmake_build (push) Successful in 3m32s
akbasic CI Build / sanitizers (push) Successful in 4m56s
akbasic CI Build / coverage (push) Successful in 4m23s
akbasic CI Build / akgl_build (push) Successful in 8m10s
akbasic CI Build / mutation_test (push) Has been cancelled

Logikoma authored this change.\n\nCo-authored-by: Andrew Kesterson <andrew@starfort.tech>
This commit is contained in:
2026-08-05 18:41:51 -04:00
parent 350deb3a45
commit 6498bb138d
2 changed files with 111 additions and 0 deletions

View File

@@ -22,6 +22,18 @@ cmake --build build --parallel
ctest --test-dir build --output-on-failure
```
To run the same fast build, sanitizer and test gates before every push, install the advisory
pre-push hook once in this clone:
```sh norun
git config core.hooksPath .githooks
```
The hook keeps its build trees under `.git/akbasic-prepush`, skips the optional cppcheck gate
when its script or tool is unavailable, and leaves the AKGL build and mutation harness behind
`AKBASIC_HOOK_AKGL=1` and `AKBASIC_HOOK_MUTATION=1`. `git push --no-verify` remains the escape
hatch. `core.hooksPath` is local clone configuration, so CI remains the hard gate.
```sh norun
./build/basic # the REPL
./build/basic tests/language/functions.bas # run a program