Skip to content

build(tests): make codecov coverage opt-in - #1131

Merged
AnotherFoxGuy merged 1 commit into
CytopiaTeam:masterfrom
Danux-Be:build-coverage-optin
Aug 30, 2026
Merged

build(tests): make codecov coverage opt-in#1131
AnotherFoxGuy merged 1 commit into
CytopiaTeam:masterfrom
Danux-Be:build-coverage-optin

Conversation

@Danux-Be

Copy link
Copy Markdown
Contributor

The codecov/FindGcov/FindLcov CMake modules are fetched at configure time from a third-party server via CMakeCM. That breaks offline builds and adds a supply-chain dependency that regular test runs don't need.

Change

Gate the coverage tooling behind a new ENABLE_COVERAGE option (default OFF):

option(ENABLE_COVERAGE "Enable code coverage instrumentation (downloads codecov cmake modules)" OFF)
if (ENABLE_COVERAGE)
    include(codecov)
endif ()

and likewise for add_coverage() / coverage_evaluate(). CI setups that need coverage can simply pass -DENABLE_COVERAGE=ON.

Testing

Default build (Coverage OFF) compiles and runs the Catch2 suite fully offline: 53/53 tests pass (Arch Linux, GCC 16.2, CMake 4.4, network-less configure verified).

The codecov/FindGcov/FindLcov modules are fetched at configure time from
a third-party server via CMakeCM. That breaks offline builds and adds an
unnecessary supply-chain dependency for regular test runs.

Coverage is now gated behind ENABLE_COVERAGE=ON. Default builds compile
and run the Catch2 suite fully offline (verified: 53/53 pass).
@AnotherFoxGuy
AnotherFoxGuy merged commit 4d6f116 into CytopiaTeam:master Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants