Skip to content

WIP: use native overflow checks and expand CI coverage - #11

Draft
uvlad7 wants to merge 4 commits into
masterfrom
ci/portable-overflow-and-os-matrix
Draft

uvlad7 wants to merge 4 commits into
masterfrom
ci/portable-overflow-and-os-matrix

Conversation

@uvlad7

@uvlad7 uvlad7 commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Native overflow checks

  • Uses C23 ckd_add and ckd_mul whenever <stdckdint.h> is available.
  • Otherwise uses __builtin_add_overflow and __builtin_mul_overflow when Clang advertises them or GCC 5+ is used.
  • Uses MSVC x64 _addcarry_u64 and _umul128; MSVC ARM64 uses __umulh for multiplication and the portable carry check for addition.
  • Retains portable arithmetic fallbacks for unsupported compilers.

CI coverage

  • Keeps the existing Ubuntu Ruby-version matrix.
  • Adds Ruby 3.4.10 jobs for macOS latest, macOS 15 Intel, Ubuntu 24.04 ARM, Windows 2022, Windows 2025, and Windows 11 ARM.
  • Adds an MSWIN Ruby job on Windows 2025.
  • Runs Valgrind on Ubuntu ARM as well as the existing supported Linux jobs.

Dependencies

  • Replaces the Ubuntu-only apt action with ruby/setup-ruby-pkgs.
  • Installs YAJL using apt, Homebrew (with _update_), MSYS2 MinGW, and vcpkg for MSWIN.
  • Passes vcpkg action OPT_DIR through to extconf so mkmf locates YAJL headers and libraries; the action adds only its DLL directory to PATH.

Verification

  • Ruby 4.1: 55 examples, 0 failures.
  • RuboCop and local workflow YAML parsing pass.

Draft pending GitHub Actions results across the new runners.

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