Skip to content

Add github actions #33

Description

@lefticus

We need automated testing of the ChaiScript_Extras repository

Activity

  1. lefticus commented on Apr 16, 2026

    @lefticus
    MemberAuthor

    @leftibot add automated testing following the pattern set in ChaiScript/ChaiScript.

    • clean, simple
    • MSVC/Windows, AppleClang/MacOS, GCC/Linux
    • Add a reasonable combination of ASAN/UBSan targets with Release/Debug.
  2. added a commit that references this issue on Apr 16, 2026
    083874f
  3. lefticus commented on Apr 17, 2026

    @lefticus
    MemberAuthor

    @leftibot the build is failing due to outdated cmake code. Investigate, fix, and open a new PR

  4. added a commit that references this issue on Apr 17, 2026
    dd116d7
  5. leftibot commented on Apr 17, 2026

    @leftibot
    Contributor

    Investigated the red CI on master from #34. The "outdated CMake code" has two distinct symptoms, both rooted in the ChaiScript 6.1.0 subproject that gets pulled in via FetchContent:

    1. macOS Configure fails — runners now ship CMake 4.x, which removes support for cmake_minimum_required(VERSION < 3.5). The fetched ChaiScript 6.1.0 CMakeLists.txt:1 still says VERSION 2.8, so configure aborts:

    CMake Error at build/_deps/chaiscript-src/CMakeLists.txt:1 (cmake_minimum_required):
      Compatibility with CMake < 3.5 has been removed from CMake.
    

    2. Windows MSVC Build fails — ChaiScript 6.1.0's src/main.cpp (the chai REPL) has a missing <chrono> include and no longer compiles on current MSVC ('high_resolution_clock': is not a class or namespace name). That target is declared unconditionally in the subproject, so we were building it even though chaiscript_extras only needs ChaiScript's headers.

    Fix (#35): in cmake/chaiscript.cmake, before add_subdirectory, set CMAKE_POLICY_VERSION_MINIMUM 3.5 to unblock the stale cmake_minimum_required, and pass EXCLUDE_FROM_ALL so the upstream chai REPL (and samples/modules) stay out of the default build. Also bumped our own cmake_minimum_required to 3.16 and opted into CMP0169 OLD to silence the FetchContent_Populate deprecation on CMake 3.30+.

    Verified locally (CMake 3.31) — Debug and Release both configure, build, and pass tests; the chai binary is no longer built.

    Not fixed here — the Linux ASAN/UBSAN job still fails on string_methods_test with a heap-use-after-free in chaiscript::extras::string_methods::split when accessed via a chained index expression ("...".split(",")[1]). That's a runtime bug in the extras+ChaiScript 6.1.0 interaction, not a CMake one. Worth tracking as a separate issue — do you want me to open it?

    PR: #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions