Sqlitecpp ci workflows

From SRombauts/SQLiteCpp · View interactive version

Sqlitecpp ci workflows is an AI agent skill from the GitHub repository SRombauts/SQLiteCpp. SQLiteCpp CI workflow patterns. Use for GitHub Actions, matrices, or test steps.

How to use this skill

Skill file

SQLiteCpp CI Workflows

Common steps

GitHub Actions (CMake)

recreate broader Visual Studio matrices.

toolset, select it with -T v141, and assert MSVC 1916 in the consumer. Run unit tests, the example,

and the consumer with standard filesystem and string_view checks. Do not assume a current runner

includes this optional toolset or let the baseline job silently use the default compiler.

SQLITE_ENABLE_ASSERT_HANDLER CMake option defaults to OFF, so default builds of tests and examples

do not compile or link the application-provided handlers. The dedicated static-library job enables

this option and builds the unit tests and both examples to check their handler definitions.

GitHub Actions (Meson)

-DSQLITECPP_BUILD_TESTS=true -DSQLITECPP_BUILD_EXAMPLES=true --force-fallback-for=sqlite3.

SQLite fallback builds, plus a system SQLite build with --wrap-mode=nofallback and the SQLite/GTest

development packages installed. The fallback wrap enables metadata in SQLite itself.

that the public feature definition matches the option and call both origin-name APIs when enabled;

do not add SQLITE_ENABLE_COLUMN_METADATA directly to consumer compiler flags. Default Meson jobs

cover the metadata-disabled consumer.

Coverage (Coveralls)

The Coverage workflow (.github/workflows/coverage.yml) builds with -DSQLITECPP_USE_GCOV=ON

(GCC only), runs ctest (both UnitTests and Example1Run), captures with lcov while

excluding /usr, googletest, sqlite3, examples and tests, and uploads to Coveralls.

To find which lines are still uncovered without rebuilding locally, query the Coveralls JSON API

for the master repo (the build id comes from the repo summary):

# Overall percentage and the latest build id
curl -s https://coveralls.io/github/SRombauts/SQLiteCpp.json   # covered_percent, badge, build id

# Per-file missed counts for a build (source_files is a JSON-encoded string inside the payload)
curl -s "https://coveralls.io/builds/<BUILD_ID>/source_files.json?per_page=100"

# Exact missed line numbers for one file (array of hit counts; null/0 entries are uncovered)
curl -s "https://coveralls.io/builds/<BUILD_ID>/source.json?filename=src/Statement.cpp"

Before giving up on a miss, work out the root cause; some look like artifacts but are fixable:

variadic bind/execute_many). When the per-element call can throw, gcov puts the post-call

edge on the standalone initializer_list line and reports it uncovered even though the calls run.

Collapse the expansion onto a single line so gcov attributes it to the tested call expression.

Column "Statement was destroyed" check is shadowed by checkRow() on the normal path, but

Column's constructor and Statement::TStatementPtr are public, so a test can construct a

Column from a null pointer directly. Check the public surface before assuming dead code.

Genuinely not worth chasing:

compiler-version specific (a local gcc may not even reproduce what CI's gcc reports), and removing

them means contorting the function. Leave them.

portable test cannot reach without a real loadable extension binary.

Cover the genuinely reachable lines and leave the rest.

Sanitizers

compile flags must reach the library, unit tests, and examples, including inline API calls.

The UBSan CI job verifies every project compile command before building.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.