Skip to content

ci: adopt uv, clang-format, misch baselines and a C2000 build - #5

Merged
aajll merged 1 commit into
masterfrom
4-chore-tooling
Oct 14, 2026
Merged

aajll merged 1 commit into
masterfrom
4-chore-tooling

Conversation

@aajll

@aajll aajll commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Refs #4

Summary

  • CI installs Meson, Ninja and gcovr with astral-sh/setup-uv and uv tool install; no pip or setup-python remains.
  • scripts/format.sh pins clang-format 23.1.1 through uvx; a clang-format job runs it. The sources already match, so no code is reformatted.
  • misra.toml and analysis/ (from misch init --scaffold), with one analysis per atomic backend: the base configuration forces SEQLOCK_USE_GNU_ATOMICS, and the c11 and no_atomics profiles force the other two rungs of the ladder. Each has its own baseline. The misra job runs all three and prints the deviation record.
  • A TI C2000 job builds the library with CGT 22.6.2 and 25.11.1 under COFF and EABI with -Dwerror=true, as in rampg.
  • static_library replaces both_libraries. The dependency and seqlock.pc already linked the static archive, so the shared library was built and installed but unused.
  • SPDX headers on meson.build, meson_options.txt, tests/meson.build and every test source.

Scope decisions

  • The baselines accept the existing findings as they stand: 42 (__atomic), 36 (C11) and 35 (uniprocessor). The largest groups are 12.1 (13), 17.3 (12, the __atomic builtins that cppcheck does not declare), 15.5 (6), 2.5 (6) and 8.7 (4). No project-wide deviation is adopted and nothing is resolved here.
  • seqlock.c still describes its deviation record against MISRA C:2012; aligning that record with the misch findings belongs with resolving them.
  • No aarch64 profile: the only architecture-dependent code is the SEQLOCK_CPU_RELAX asm, and the backend split covers the differences that change findings.

Evidence

  • cl2000 22.6.2 and 25.11.1 both define __STDC_NO_ATOMICS__ and not __GNUC__, so the ladder selects the uniprocessor backend on the target. The exact CI cross build (meson setup --cross-file ... -Dwerror=true) passes locally for both releases and both ABIs.
  • ASan/UBSan: 10 of 10 tests pass. TSan: 10 of 10 pass.
  • Coverage with -fprofile-update=atomic: 100% lines (47/47), 100% branches (53/53).
  • misch run --baseline passes for all three backends with cppcheck 2.21.1. Falsified: an added function with a goto makes the base run fail (exit 1); reverted.
  • meson install installs libseqlock.a, the three headers and seqlock.pc, and no shared object. A consumer built with pkg-config --cflags --libs seqlock compiles, links and round-trips a value.
  • scripts/format.sh: 12 files match clang-format 23.1.1.

CI installs its Python tools with uv, checks formatting with a pinned clang-format, runs misch for each atomic backend against recorded baselines, and compiles the library with two TI C2000 CGT releases under COFF and EABI. The build uses static_library, since no consumer linked the shared library, and the Meson files and tests gain SPDX headers.

The baselines accept the 42, 36 and 35 existing findings of the __atomic, C11 and uniprocessor backends as they stand; resolving them is separate work.

Refs #4
@aajll aajll linked an issue Oct 14, 2026 that may be closed by this pull request
6 tasks
@aajll
aajll merged commit 9e8ab15 into master Oct 14, 2026
8 checks passed
@aajll
aajll deleted the 4-chore-tooling branch October 14, 2026 22:06
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.

Adopt uv, clang-format, a misch CI job and a C2000 build, and build a static library

1 participant