summaryrefslogtreecommitdiff
path: root/.woodpecker
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-12 17:20:15 +0300
committerPaul Buetow <paul@buetow.org>2026-07-12 17:20:15 +0300
commit1770b12d5d95476310c27ccf39a91b5ba4a3f119 (patch)
treec81bf1d97b5f71140acc73e970abf406f9f64fe7 /.woodpecker
parentf2b8ed6d2ea0744cfd1a36a6fbd1763926b873bb (diff)
bootstrap: meson build, test harness, CI, conventions, README/AGENTS (et0)
Phase 0 (task et0): lays the build/test/CI/convention groundwork before any feature code. - meson.build: project ggaze C11 -Wall -Wextra; deps gtk4/glib/gio/libadwaita; feature options gegl/jxl/avif/heif (auto); generated ggaze-config.h with app id, version, GGAZE_HAVE_* feature flags. - tests: GLib g_test harness with separate unit/integration suites (--suite unit / --suite integration); test_bootstrap sanity test proves the harness compiles and the config header is reachable; -Db_coverage=true coverage target wired. - CI: .woodpecker/ci.yml three lanes (minimal, gegl, asan) with xvfb for the integration track and a coverage lane that warns until M10. - conventions: .clang-format (3-space, 80-col, K&R, *-on-var, return type on its own line) + .editorconfig matching docs/coding-conventions.md; CI clang-format --dry-run -Werror gate. - top-level README.md (humans) and AGENTS.md (agents) pointing into docs/. - LICENSE (GPL-3.0-or-later), .gitignore, dir placeholders. Acceptance: meson setup build && ninja -C build && meson test -C build green; clang-format --dry-run --Werror clean.
Diffstat (limited to '.woodpecker')
-rw-r--r--.woodpecker/ci.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml
new file mode 100644
index 0000000..6ec4680
--- /dev/null
+++ b/.woodpecker/ci.yml
@@ -0,0 +1,58 @@
+# ggaze CI — Woodpecker (codeberg-native).
+#
+# Three lanes (see docs/IMPLEMENTATION.md Phase 0):
+# minimal all optional backends disabled; plain GdkPixbuf viewer.
+# gegl gegl=enabled (+ jxl/avif/heif auto) — keeps the optional path
+# from bit-rotting.
+# asan minimal build under AddressSanitizer + UBSan (also drives the
+# per-feature leak-check tasks).
+#
+# The coverage gate runs in the minimal lane and is "warn" until M10, after
+# which it is flipped to fail (see docs/IMPLEMENTATION.md Cross-cutting).
+
+matrix:
+ include:
+ - LANE: minimal
+ MESON_OPTS: "-Dgegl=disabled -Djxl=disabled -Davif=disabled -Dheif=disabled"
+ RUN_COVERAGE: "yes"
+ ENV: ""
+ - LANE: gegl
+ MESON_OPTS: "-Dgegl=enabled"
+ RUN_COVERAGE: "no"
+ ENV: ""
+ - LANE: asan
+ MESON_OPTS: "-Dgegl=disabled -Djxl=disabled -Davif=disabled -Dheif=disabled -Db_sanitize=address,undefined"
+ RUN_COVERAGE: "no"
+ ENV: "G_DEBUG=gc-friendly ASAN_OPTIONS=detect_leaks=1:abort_on_error=1"
+
+when:
+ - event: [push, pull_request, manual]
+
+steps:
+ build-and-test:
+ image: fedora:40
+ environment: ${ENV}
+ commands:
+ - dnf install -y --setopt=install_weak_deps=False
+ meson ninja-build gcc clang clang-format git
+ pkgconf-pkg-config xorg-x11-server-Xvfb
+ gtk4-devel glib2-devel libadwaita-devel
+ - |
+ if [ "$LANE" = "gegl" ]; then
+ dnf install -y --setopt=install_weak_deps=False gegl-devel babl-devel
+ fi
+ - meson setup build $MESON_OPTS
+ - ninja -C build
+ - clang-format --dry-run --Werror $(git ls-files '*.c' '*.h')
+ - |
+ if [ "$RUN_COVERAGE" = "yes" ]; then
+ # lcov/genhtml not installed in Phase 0 (gate warns until M10);
+ # add lcov + (perl-Dot-Graph or genhtml) here when M10 flips the
+ # coverage gate to fail.
+ meson setup -Db_coverage=true build-cov $MESON_OPTS
+ ninja -C build-cov
+ meson test -C build-cov
+ ninja -C build-cov coverage || echo "coverage: lcov/genhtml not installed (warn)"
+ fi
+ - meson test -C build --suite unit
+ - xvfb-run -a meson test -C build --suite integration \ No newline at end of file