Skip to content

Conversation

@ashtum
Copy link
Collaborator

@ashtum ashtum commented Feb 12, 2026

Summary by CodeRabbit

  • Chores
    • Raised minimum compiler requirements: GCC ≥12.0 and Clang ≥17.0
    • Updated C++ standard requirement to C++20 or later
    • Added/expanded CI orchestration for Windows and Unix environments to standardize builds and tooling
    • Removed legacy platform-specific build matrix entries to simplify and streamline CI pipelines

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 12, 2026

An automated preview of the documentation is available at https://155.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-02-12 14:50:43 UTC

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Updates CI configuration to raise compiler and C++ standard constraints and remove a linux build matrix entry; adds two CI orchestration scripts (.drone/drone.sh and .drone/drone.bat) to implement multi-mode workflows (boost, codecov, valgrind, coverity, cmake variants) and Windows-specific handling.

Changes

Cohort / File(s) Summary
Drone configuration
\.drone.star
Raised compiler constraints (gcc >=12.0, clang >=17.0) and C++ standard to >=20. Removed appended linux_cxx(...) platform build entry and simplified return to exclude that platform-specific block.
Bash CI orchestration
.drone/drone.sh
Added comprehensive Bash CI script that sets env vars, provides common_install (boost-ci tooling), and dispatches multiple CI modes: boost, codecov, valgrind, coverity, cmake1, and cmake-superproject. Handles OS quirks, ASAN, and conditional flows.
Windows CI orchestration
.drone/drone.bat
Added Windows batch CI script that resolves branch/ref values, sets environment variables, conditionally runs a Boost CI workflow (cloning boost-ci, running install and build batch scripts), and clones zlib for Boost builds.

Sequence Diagram(s)

sequenceDiagram
    participant Drone
    participant Repo as Repository
    participant BoostCI as boost-ci
    participant Zlib as zlib
    participant Builder as Build scripts

    Drone->>Repo: invoke .drone/drone.sh or .drone/drone.bat
    Repo->>Repo: determine DRONE_JOB_BUILDTYPE and branch
    alt boost / boost-job
        Repo->>BoostCI: git clone boost-ci (common_install)
        BoostCI->>Repo: provide install scripts/config
        Repo->>Zlib: git clone zlib (if needed)
        Repo->>Builder: run build scripts (build.bat / build.sh / b2)
        Builder->>Repo: produce artifacts / test results
    else codecov/valgrind/coverity
        Repo->>BoostCI: common_install
        Repo->>Builder: run corresponding mode script (codecov/valgrind/coverity)
        Builder->>Repo: upload/report results
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped in code, a twitch of cheer,

New scripts to run both far and near,
Compilers sharpened, branches found,
CI gardens tended, tests abound,
A carrot for builds — pipelines clear! 🥕

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Enable Drone CI' directly and specifically describes the main change: adding Drone CI configuration files (.drone.star, .drone/drone.bat, .drone/drone.sh).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.drone/drone.bat:
- Around line 1-3: The batch file containing the lines "@ECHO ON" and "setlocal
enabledelayedexpansion" must use CRLF endings and be exempted from the
repository-wide LF rule: add a .gitattributes entry that forces CRLF for this
batch script (e.g. "drone.bat text eol=crlf"), commit that change, and convert
the existing file to Windows line endings (CRLF) in the repository so the
committed file no longer uses LF-only endings; ensure this new attribute
overrides the current "* text=auto eol=lf" rule.
🧹 Nitpick comments (6)
.drone/drone.bat (3)

5-11: Use quoted SET syntax consistently for safety.

Several SET assignments (Lines 5, 10, 28, 29) use the unquoted form, which is susceptible to trailing whitespace being captured in the variable value. Use SET "VAR=value" consistently, as already done on Lines 30–32.

♻️ Proposed fix
-set TRAVIS_OS_NAME=windows
+set "TRAVIS_OS_NAME=windows"
 
 IF "!DRONE_BRANCH!" == "" (
   for /F %%i in ("!GITHUB_REF!") do `@set` TRAVIS_BRANCH=%%~nxi
 ) else (
-  SET TRAVIS_BRANCH=!DRONE_BRANCH!
+  SET "TRAVIS_BRANCH=!DRONE_BRANCH!"
 )

Similarly for Lines 28–29:

-SET BOOST_CI_TARGET_BRANCH=!TRAVIS_BRANCH!
-SET BOOST_CI_SRC_FOLDER=%cd%
+SET "BOOST_CI_TARGET_BRANCH=!TRAVIS_BRANCH!"
+SET "BOOST_CI_SRC_FOLDER=%cd%"

22-23: Unix commands (cp, rm) in a batch file rely on Git-for-Windows / MSYS2 being on PATH.

These commands are not native to cmd.exe. This typically works in Drone CI Windows images that bundle Git for Windows, but it's an implicit dependency. If portability is a concern, native equivalents (xcopy/robocopy, rmdir /s /q) are safer.


38-39: Consider updating pinned zlib version to current stable release.

zlib v1.2.13 (October 2022) is pinned in the dependency clone. The current stable release is v1.3.1 (January 2024). Evaluate whether this pin is intentional or if the build should track a newer version.

.drone/drone.sh (3)

20-37: common_install function is well-structured.

The function handles the boost-ci clone, OSX cd quirk, and sourcing of the shared install script cleanly. One minor style nit: Line 22 uses backticks instead of $().

♻️ Minor: prefer $() over backticks
-    export SELF=`basename $REPO_NAME`
+    export SELF=$(basename "$REPO_NAME")

83-86: Use [[ ]] or chained [ ] && [ ] instead of -a / -o inside [ ].

The -a and -o operators inside [ ] are POSIX-deprecated and have known parsing edge cases. Shellcheck flags this as SC2166.

♻️ Proposed fix
-if  [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then
+if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" ] && { [ "$TRAVIS_BRANCH" = "develop" ] || [ "$TRAVIS_BRANCH" = "master" ]; } && { [ "$DRONE_BUILD_EVENT" = "push" ] || [ "$DRONE_BUILD_EVENT" = "cron" ]; }; then

99-109: cmake1 path: recursive submodule init may be very slow for the Boost superproject.

Line 109 runs git submodule update --init --recursive on the entire Boost tree, which clones all ~140 Boost libraries. The commented-out Line 108 (boostdep) suggests a more targeted approach was considered. If only this library's dependencies are needed, a selective submodule init would significantly speed up CI.

Also, Line 99 uses backticks — same style nit as Line 22.

Comment on lines +1 to +3

@ECHO ON
setlocal enabledelayedexpansion
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if .gitattributes exists and has any eol rules for .bat files
if [ -f .gitattributes ]; then
  echo "=== .gitattributes exists ==="
  cat .gitattributes
else
  echo "=== .gitattributes does not exist ==="
fi

echo ""
echo "=== Checking line endings of .drone/drone.bat ==="
# Check the actual line endings of drone.bat
file .drone/drone.bat

# Also use od to inspect the actual bytes
echo ""
echo "=== First few lines with od to check line ending bytes ==="
head -5 .drone/drone.bat | od -c | head -20

Repository: cppalliance/capy

Length of output: 322


🏁 Script executed:

#!/bin/bash
# Use cat -A to show line ending characters
echo "=== Checking line endings with cat -A (first 10 lines) ==="
head -10 .drone/drone.bat | cat -A

echo ""
echo "=== Checking if .drone/drone.bat uses LF or CRLF ==="
# Use od -An -tx1 to show hex bytes
head -2 .drone/drone.bat | od -An -tx1 | head -5

echo ""
echo "=== Using hexdump to inspect first line ==="
head -1 .drone/drone.bat | hexdump -C

echo ""
echo "=== Verify .gitattributes content ==="
cat .gitattributes

Repository: cppalliance/capy

Length of output: 595


Critical: Batch file must use Windows (CRLF) line endings.

The file .drone/drone.bat uses Unix (LF-only) line endings. The Windows cmd.exe batch parser has known bugs with LF-only files — particularly around GOTO/CALL label resolution near 512-byte boundaries — which can cause silent script malfunction. Additionally, the current .gitattributes rule (* text=auto eol=lf) enforces LF line endings for all text files, including batch files.

Add a specific .gitattributes entry to override this for batch files:

.drone/drone.bat text eol=crlf
🧰 Tools
🪛 Blinter (1.0.112)

[error] 1-1: Unix line endings detected. Explanation: Batch file uses Unix line endings (LF-only) which can cause GOTO/CALL label parsing failures and script malfunction due to Windows batch parser 512-byte boundary bugs. Recommendation: Convert file to Windows line endings (CRLF). Use tools like dos2unix, notepad++, or configure git with 'git config core.autocrlf true'. Context: File uses Unix line endings (LF-only) - 47 LF sequences found

(E018)

🤖 Prompt for AI Agents
In @.drone/drone.bat around lines 1 - 3, The batch file containing the lines
"@ECHO ON" and "setlocal enabledelayedexpansion" must use CRLF endings and be
exempted from the repository-wide LF rule: add a .gitattributes entry that
forces CRLF for this batch script (e.g. "drone.bat text eol=crlf"), commit that
change, and convert the existing file to Windows line endings (CRLF) in the
repository so the committed file no longer uses LF-only endings; ensure this new
attribute overrides the current "* text=auto eol=lf" rule.

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 12, 2026

GCOVR code coverage report https://155.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://155.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://155.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-02-12 14:56:51 UTC

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.drone/drone.bat:
- Line 16: Replace the echoed strings that use single quotes (e.g., echo
'==================================> INSTALL' and the similar echoes at the
other locations) because cmd.exe prints single quotes literally; change them to
use either no quotes or double quotes (e.g., echo
"==================================> INSTALL" or echo
==================================> INSTALL) and make sure to escape the >
character as ^> to avoid redirection in batch scripts; update the echo
invocations accordingly.
- Around line 21-23: The batch file uses Unix utilities; replace the cp and rm
commands with native Windows equivalents: after the git clone of
"boost-ci-cloned" copy the directory using a Windows command (e.g., xcopy
boost-ci-cloned\ci . /E /I /Y or robocopy boost-ci-cloned\ci . /E) to preserve
contents, then remove the cloned folder with rmdir /S /Q boost-ci-cloned (or use
robocopy's cleanup). Update the lines that run "cp -prf boost-ci-cloned/ci ."
and "rm -rf boost-ci-cloned" to these native commands so the script runs under
cmd.exe without Unix tools.
🧹 Nitpick comments (4)
.drone/drone.sh (3)

83-86: Replace -a / -o with && / || inside [ ].

The POSIX -a and -o operators inside [ ] are poorly defined and can misparse when operands resemble test operators. ShellCheck SC2166 flags this.

♻️ Proposed fix
-if  [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then
+if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" ] && { [ "$TRAVIS_BRANCH" = "develop" ] || [ "$TRAVIS_BRANCH" = "master" ]; } && { [ "$DRONE_BUILD_EVENT" = "push" ] || [ "$DRONE_BUILD_EVENT" = "cron" ]; }; then

9-16: export VAR=$(cmd) masks command failures under set -e.

Lines 9, 13, 16 (and similarly 22, 34, 99) use export VAR=$(cmd) which prevents set -e from catching a non-zero exit from the subshell. Splitting declaration and assignment would preserve the exit code. Low risk in practice here since pwd, whoami, and basename rarely fail, but worth noting for correctness.

Example fix for line 9
-export DRONE_BUILD_DIR=$(pwd)
+DRONE_BUILD_DIR=$(pwd)
+export DRONE_BUILD_DIR

88-114: cmake1: full recursive submodule init may be very slow.

Line 109 runs git submodule update --init --recursive on the entire Boost superproject. For a single library build, using boostdep (commented out on line 108) to initialize only required dependencies would be significantly faster. If build time is a concern, consider re-enabling the boostdep approach.

.drone/drone.bat (1)

30-33: Quoting inconsistency in SET / if comparisons.

Line 30 uses %BOOST_BRANCH% (immediate expansion) while the rest of the block uses !VAR! (delayed expansion). Inside a parenthesized if block, %VAR% is expanded at parse time, not at execution time. If BOOST_BRANCH is set earlier within the same block, using % won't reflect the updated value. Here it's checking an externally-set variable so it works, but mixing expansion styles is error-prone. Consider using !BOOST_BRANCH! consistently for clarity.

if "%DRONE_JOB_BUILDTYPE%" == "boost" (

echo "Running boost job"
echo '==================================> INSTALL'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Single quotes are printed literally in cmd.exe.

echo '==================================> INSTALL' will output the surrounding ' characters. Use double quotes or no quotes for cleaner output. Same applies to lines 37 and 41.

Proposed fix
-echo '==================================> INSTALL'
+echo ==================================^> INSTALL

Note: > must be escaped with ^ in batch to prevent redirection.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo '==================================> INSTALL'
echo ==================================^> INSTALL
🤖 Prompt for AI Agents
In @.drone/drone.bat at line 16, Replace the echoed strings that use single
quotes (e.g., echo '==================================> INSTALL' and the similar
echoes at the other locations) because cmd.exe prints single quotes literally;
change them to use either no quotes or double quotes (e.g., echo
"==================================> INSTALL" or echo
==================================> INSTALL) and make sure to escape the >
character as ^> to avoid redirection in batch scripts; update the echo
invocations accordingly.

Comment on lines +21 to +23
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1
cp -prf boost-ci-cloned/ci .
rm -rf boost-ci-cloned
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n .drone/drone.bat

Repository: cppalliance/capy

Length of output: 1670


🏁 Script executed:

#!/bin/bash
# Check if other .bat files in the repo also use Unix commands like cp/rm
rg -n '\b(cp |rm |ls |mv |cat |grep )\b' --type-add 'bat:*.bat' --type bat

Repository: cppalliance/capy

Length of output: 42


🏁 Script executed:

find . -name "*.yml" -o -name "*.yaml" | head -20

Repository: cppalliance/capy

Length of output: 246


🏁 Script executed:

rg -l "drone" --type yml

Repository: cppalliance/capy

Length of output: 87


🏁 Script executed:

find . -name ".drone*" -type f | head -20

Repository: cppalliance/capy

Length of output: 73


🏁 Script executed:

cat -n .drone.star

Repository: cppalliance/capy

Length of output: 1428


🏁 Script executed:

ls -la .drone/

Repository: cppalliance/capy

Length of output: 291


Use native Windows commands instead of Unix utilities in batch file.

Lines 22–23 use cp -prf and rm -rf, which are Unix utilities that won't run natively in cmd.exe. While these may work if Git Bash is available on PATH, this creates a fragile dependency. The file should use native Windows commands:

Suggested fix
-cp -prf boost-ci-cloned/ci .
-rm -rf boost-ci-cloned
+xcopy /s /e /q /y boost-ci-cloned\ci ci\
+rmdir /s /q boost-ci-cloned
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1
cp -prf boost-ci-cloned/ci .
rm -rf boost-ci-cloned
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1
xcopy /s /e /q /y boost-ci-cloned\ci ci\
rmdir /s /q boost-ci-cloned
🤖 Prompt for AI Agents
In @.drone/drone.bat around lines 21 - 23, The batch file uses Unix utilities;
replace the cp and rm commands with native Windows equivalents: after the git
clone of "boost-ci-cloned" copy the directory using a Windows command (e.g.,
xcopy boost-ci-cloned\ci . /E /I /Y or robocopy boost-ci-cloned\ci . /E) to
preserve contents, then remove the cloned folder with rmdir /S /Q
boost-ci-cloned (or use robocopy's cleanup). Update the lines that run "cp -prf
boost-ci-cloned/ci ." and "rm -rf boost-ci-cloned" to these native commands so
the script runs under cmd.exe without Unix tools.

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.

2 participants