Skip to content

ci: flashmini pipeline, linux support - #2

Merged
codethinki merged 20 commits into
masterfrom
ci/port-flashmini-pipeline
Oct 3, 2026
Merged

codethinki merged 20 commits into
masterfrom
ci/port-flashmini-pipeline

Conversation

@codethinki

Copy link
Copy Markdown
Owner

Replaces the never-passing CI with the flashmini pipeline and makes cth build on Linux (GCC + Clang/libstdc++).

CI

  • Build & Test runs one pipeline per compiler: Linux (gcc, clang) in a CachyOS container built from ci/docker/linux/Dockerfile and cached in GHCR, Windows (msvc, clang) on the hosted runner.
  • vcpkg binaries are cached in GitHub Packages (NuGet), BuildCache objects in the actions cache with a GHCR fallback from master.
  • CI presets live in ci/CMakeUserPresets.json (configure, build and test preset per job).
  • Removed the old test.yml / release.yml and their actions (they referenced presets and targets that no longer exist).

Linux / GCC / Clang

  • include the standard headers that are used (MSVC's STL provides them transitively), std::nullptr_t
  • log macros: __VA_OPT__ for calls without format arguments (/Zc:preprocessor on MSVC, as an interface option of cth::cth)
  • coro: qualify co::scheduler (gcc -Wchanges-meaning), pass the wait type for posix descriptors in asio's async_wait
  • link stdc++exp for std::stacktrace with libstdc++
  • net: link libhv through cth_target_alias_any (hv / hv_static depending on linkage)
  • cth_win is only added on Windows; integration_tests no longer links cth::win (it never used it)
  • gcc_release preset, clang preset C compiler fixed

Fixes for all platforms

  • log macros evaluated their condition twice
  • enable_testing() ran after the subprojects were added, so ctest only registered integration_tests (10 of ~290 tests)
  • buildcache is optional again (the targets already enable it via cth_target_enable_build_cache(OPTIONAL))
  • removed the unused loadTxt (cth::io::file::chop covers it)

Verified locally in the CI container: GCC 16.2 and Clang 23.1 build everything with 0 warnings, 263/263 tests pass. Windows is verified by this PR's CI.

Lukas Thomann added 20 commits October 3, 2026 11:59
MSVC's STL provides size_t, std::invoke, std::forward, std::memcpy, ...
transitively; libstdc++ and libc++ do not. Also qualify std::nullptr_t,
the global nullptr_t is a GCC extension that Clang rejects.
std::format(fmt, __VA_ARGS__) left a trailing comma when no arguments were
passed. Use __VA_OPT__, which requires /Zc:preprocessor on MSVC.
The condition was evaluated in the if-initializer and again as the if
condition, so side effects (e.g. timerfd_settime, SetEvent) ran twice.
A name used in a class must keep its meaning in the completed class
([basic.scope.class]); gcc diagnoses this as an error (-Wchanges-meaning).
enable_testing() ran after the subprojects were added, so ctest only saw
integration_tests. The targets already enable buildcache through
cth_target_enable_build_cache(OPTIONAL); the global launcher made it mandatory.
Build & Test runs one pipeline per compiler: linux (gcc, clang) inside a
CachyOS container built and cached in GHCR, windows (msvc, clang) on the
hosted runner. vcpkg binaries are cached in GitHub Packages (NuGet),
BuildCache objects in the actions cache with a GHCR fallback from master.
CI presets live in ci/CMakeUserPresets.json.

Linux builds cth_tests and cth_os_tests only until cth_coro (asio),
cth_net (libhv) and cth_win/integration_tests are ported.
Superseded by cth::io::file::chop. Nothing included read.inl, and its
wchar_t path relied on std::codecvt_utf8, which C++26 removes.
asio's posix descriptors need a wait type (eventfd/timerfd signal by
becoming readable), windows object handles take none. async_wait_signaled
dispatches on what the handle type supports instead of the platform.
Adds cth_target_alias_any.
vcpkg's libhv exports hv for shared and hv_static for static builds; the
alias links whichever exists, so cth_net builds with both linkages.
cth_win wraps the Windows API. integration_tests linked cth::win without
using it, it only needs cth::cth.
The runner ships LLVM 20, which rejects the constrained lambda template
parameters in cth::alg::assign (fixed in clang 22).
CI runners overshot the previous 1ms bound by ~0.1ms. 3ms still catches
falling back to the ~15.6ms default timer resolution on windows.
@codethinki
codethinki merged commit 2f3c88d into master Oct 3, 2026
6 checks passed
@codethinki
codethinki deleted the ci/port-flashmini-pipeline branch October 3, 2026 18:15
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.

1 participant