Skip to content

Fix ci - #2

Open
ZheFeng7110 wants to merge 14 commits into
developfrom
fix-ci
Open

Fix ci#2
ZheFeng7110 wants to merge 14 commits into
developfrom
fix-ci

Conversation

@ZheFeng7110

Copy link
Copy Markdown
Owner

No description provided.

- Replace the from-source GCC 16 build job and its restore-cache step with prebuilt xlings packages (gcc@16.1.0, llvm@22.1.8) on Linux
- Install llvm@22.1.8 via xlings on macOS; drop Homebrew GCC 15, which fails against the MacOSX26 SDK (rsize_t errors), and test xlings LLVM Clang alongside Apple Clang
- Use non-interactive xlings mode with GLOBAL mirror and export the xlings bin dirs to the job PATH

Assisted-by: ZCode:GLM-5.3-Flash
- Add target_compile_features(ccc PUBLIC cxx_std_20) in the modules branch so installed targets declare their C++20 requirement; otherwise consumer generation fails with "no C++ standard found" when linking the module file set

Assisted-by: ZCode:GLM-5.3-Flash
- Keep the platform generator instead of forcing Ninja for module-mode install tests; on Windows the Ninja generator needs cl on PATH, which CI shells without an MSVC developer environment do not provide, while the Visual Studio generator works

Assisted-by: ZCode:GLM-5.3-Flash
- Have the install test consumer declare its C++ standard via target_compile_features; the synthetic module target takes COMPILE_FEATURES from the consumer, while the provider's CXX_STANDARD is not exported, so BMIs were compiled with a dialect mismatching the consumer TU
- Restore the Ninja generator for module mode and set up an MSVC developer environment in the workflow; the Visual Studio generator cannot consume installed modules (BMI-only synthetic targets are unsupported), and the Ninja generator needs cl on PATH

Assisted-by: ZCode:GLM-5.3-Flash
- Build hash_test/smart_ptr.cc only for C++17 and later; constructing std::shared_ptr<T[]> from a raw pointer is a C++17 feature and libc++ rejects it in earlier modes
- Suppress -Wc2y-extensions for clang 22 and newer, which reports Catch2 v2's use of __COUNTER__ in TEST_CASE as a C2y extension under -Wpedantic

Assisted-by: ZCode:GLM-5.3-Flash
- Move the -Wc2y-extensions suppression into test_pch.hh as a clang diagnostic pragma guarded by __clang_major__ >= 22, replacing the compiler flag in test CMakeLists
- Restore hash_test/smart_ptr.cc to the C++11 test glob; compile its shared_ptr<T[]> array section conditionally, using std::make_shared<int[]> from C++20, the raw-pointer constructor from C++17 and nothing earlier, since pre-C++17 libc++ rejects both and MSVC's std::make_shared is broken until its C++20 constraints
- Replace a non-ASCII em dash in test_pch.hh comments with ASCII so MSVC does not raise C4819 on CJK code pages

Assisted-by: ZCode:GLM-5.3-Flash
…test to new

- Add CCC_CPP14_CONSTEXPR to detail/config.hh, following the existing CCC_CPP17/20_CONSTEXPR pattern
- Make try_finally constexpr from C++14 only; C++11 constexpr functions cannot return void or declare local variables; with is constexpr from C++17, since lambdas inside constexpr function bodies are a C++17 extension
- Suppress -Winvalid-constexpr in resource_guard_test.cc for clang, which warns on each instantiation even though the calls can never be constant-evaluated
- Use the raw-pointer constructor for the shared_ptr<T[]> array test from C++17; std::make_shared<int[]> trips -Warray-bounds inside libstdc++ under GCC 16 -Werror and is unavailable before C++17 there

Assisted-by: ZCode:GLM-5.3-Flash
- Export /Zc:__cplusplus PUBLICly from the modules build of ccc so
  MSVC consumers compiling the installed module units pass the C++11
  check in include/ccc/detail/config.hh
- Install CMake >= 4.4 from the Kitware APT repository on Linux CI;
  CMake 3.x builds the synthetic BMI targets for consumed installed
  modules with the provider's standard instead of the consumer's,
  which breaks GCC C++23 module consumers
- Pass explicit -isysroot and libc++ -isystem flags on macOS in the
  CI test runners; clang-scan-deps does not reproduce the driver's
  SDK and libc++ include inference, failing C++20+ builds with
  'cstddef' file not found

Assisted-by: ZCode:GLM-5.3-Flash
…r toolchain

- Include <new> before catch.hpp in test_pch.hh and catch_main.cc;
  Catch2 v2.13.10 uses std::nothrow without including <new>, which
  libc++ 22 no longer provides transitively in C++23 mode
- Run the second Install Test step of the Linux and macOS jobs with
  -Clean so it does not reconfigure consumer build dirs cached by the
  previous toolchain's step; CMake >= 4.4 deletes the cache and loses
  CMAKE_PREFIX_PATH on such a compiler change

Assisted-by: ZCode:GLM-5.3-Flash
…nning

- Add -Clean to the Linux Clang 22 and macOS Apple Clang unit test
  steps; reconfiguring a cached build dir for a different compiler
  makes CMake 4.4 delete the cache and re-run while dropping the
  command-line -D variables (e.g. CCC_BUILD_TESTS), so these steps
  silently rebuilt nothing and ran binaries from the previous
  toolchain
- Locate the libc++ include dir on every platform, not just macOS,
  with a symlink-target fallback: clang-scan-deps on Linux also
  cannot resolve libc++ headers during C++20+ module scanning with
  the xlings llvm toolchain
- Add a -SkipModules switch to both test runners and use it on the
  macOS Apple Clang steps: CMake cannot perform module dependency
  scanning with AppleClang, so module mode cannot be built or
  consumed with that toolchain

Assisted-by: ZCode:GLM-5.3-Flash
- Query Clang for its libc++ include directory so relative xlings dispatcher symlinks resolve correctly

- Suppress the redundant stdlib selection warning emitted by the preconfigured xlings Clang driver

Assisted-by: Codex:gpt-5.6-sol
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