Skip to content

ci: build and test the Release configuration, not only Debug - #109

Merged
Andste82 merged 1 commit into
mainfrom
ci/90-release-build-in-ci
Aug 9, 2026
Merged

Andste82 merged 1 commit into
mainfrom
ci/90-release-build-in-ci

Conversation

@Andste82

@Andste82 Andste82 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Closes #90.

The gap

CORELIB_PLAN §12.1, required step 4, asks for a debug and a release build with the full suite run against each. Every workflow configured -DCMAKE_BUILD_TYPE=Debug; nothing under .github/workflows/ ever set Release. An -O3/NDEBUG-only defect — strict aliasing or UB the optimiser acts on in the varint window fast paths, an uninitialised field it can see through — would have shipped green. The bench targets are the only thing CI compiles at -O3, and they are never run there.

The fix

Both x86_64 legs become the matrix shape §12.1 prescribes:

strategy:
  fail-fast: false
  matrix:
    build_type: [ Debug, Release ]

covering the GCC workflow's strict-UTF-8-OFF leg as well. The ppc64 cross leg and the coverage job stay Debug on purpose: coverage needs -O0 instrumentation, and the big-endian leg's value is the byte-swap branch, not the optimiser.

Regression test

Which configurations CI builds is a property of the workflow files, so no C++ test can notice a leg going missing. test/test_ci_workflows.sh (a fourth CTest suite, in the style of test_bench_tools) reads .github/workflows/ and requires that

  1. the workflows that run CTest cover both Debug and Release,
  2. a testing workflow never configures CMake without a build type (the empty default is neither: no optimisation, no NDEBUG, and silently so),
  3. a workflow using a strategy matrix sets fail-fast: false (§12.1).

${{ matrix.build_type }} is resolved against the workflow's own build_type: axis. It fails on the previous tree (no workflow builds and tests CMAKE_BUILD_TYPE=Release) and passes on this one; it exits 77 (CTest skip) in a source tree without .github/workflows/.

Verification

Locally across g++ 15.2 and clang 21.1, Debug and Release, plus the Release strict-UTF-8-OFF leg: 4/4 tests pass in each, no new warnings under -Werror at -O3.

README updated: the compiler table notes the two configurations, "Build & test" says to run both, and the suite list gains the fourth entry.

CORELIB_PLAN §12.1's required steps ask for a debug *and* a release build with
the full suite run against each. Every workflow configured Debug only, so an
-O3/NDEBUG-only defect — strict aliasing or UB the optimiser acts on in the
varint window fast paths, an uninitialised field it can see through — would have
shipped green. The bench targets are the only thing CI compiles at -O3, and they
are never run there.

Turn both x86_64 legs into the matrix shape §12.1 prescribes
(`build_type: [Debug, Release]`, `fail-fast: false`), including the GCC
workflow's strict-UTF-8-OFF leg. The ppc64 cross leg and the coverage job stay
Debug: coverage needs -O0 instrumentation, and the big-endian leg's value is the
byte-swap branch, not the optimiser.

Which configurations CI builds is a property of the workflow files, so no C++
test can notice a leg going missing. test_ci_workflows.sh reads
.github/workflows/ and requires that the workflows running CTest cover both
Debug and Release, that a testing workflow never configures CMake without a
build type (the empty default is neither), and that any strategy matrix sets
fail-fast: false; `${{ matrix.build_type }}` is resolved against the workflow's
own build_type axis. It fails on the previous tree and passes on this one, and
runs as a fourth CTest suite (skipped, 77, where the workflow directory is
absent).

Verified locally across g++ 15.2 and clang 21.1, Debug and Release, plus the
Release strict-UTF-8-OFF leg: 4/4 tests pass in each, no new warnings under
-Werror at -O3.

Closes #90
@Andste82
Andste82 merged commit f1974d4 into main Aug 9, 2026
9 checks passed
@Andste82
Andste82 deleted the ci/90-release-build-in-ci branch August 9, 2026 09:13
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.

12.1: CI never builds or tests the Release configuration (§12.1 required step 4)

1 participant