Skip to content

Ci/GitHub actions - #43

Merged
mariusbancila merged 4 commits into
masterfrom
ci/github-actions
Aug 10, 2026
Merged

Ci/GitHub actions#43
mariusbancila merged 4 commits into
masterfrom
ci/github-actions

Conversation

@mariusbancila

Copy link
Copy Markdown
Owner

Use Github actions for building and testing.

mariusbancila and others added 4 commits August 10, 2026 13:35
travis-ci.org was shut down in 2021 and croncpp was never migrated, so
both the .org and .com badge endpoints return 404 and the README badge
has been blank ever since. The script could not run either way: it pins
dist: trusty and installs g++-8 from a PPA that no longer serves it.

Add a workflow that builds and runs the tests on Linux, macOS and
Windows against C++11, C++14 and C++17. It runs on every pull request,
so a PR that breaks the tests is visible before merging. A final CI job
gathers the matrix into one status check to require in branch
protection. cppcheck runs as a separate, non-gating job.

The standards matrix is new coverage: both services only ever built the
default C++17 configuration, leaving the pre-C++17 half of the
CRONCPP_IS_CPP17 split untested on every push.

Remove appveyor.yml as well and replace both badges with one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CMake 4.x warns that compatibility with < 3.10 will be removed, which
made every configure noisy and would eventually become an error. 3.16 is
the version shipped by Ubuntu 20.04 and is old enough not to exclude
anyone still building this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The cron_next_ceil test passed the result of utils::to_tm, a prvalue, to
utils::tm_to_time, which takes std::tm&. Binding a temporary to a
non-const lvalue reference is ill-formed; it compiled only because MSVC
defaults to /permissive for C++17 and below. At C++20 /permissive-
becomes the default and the extension goes away, and gcc and clang
reject it at every standard, so this would have failed the Linux and
macOS jobs of the new workflow before a single test ran. Nothing had
built it: the test arrived with cron_next_ceil, years after Travis
stopped running.

Hoist the value into a named variable and add C++20 and C++23 to the
matrix, which is what exposed this. The library itself only branches on
__cplusplus > 201402L, so the newer standards add no path coverage, but
they do test conformance as compilers tighten the language.

cxx_std_26 is left out with a note: a compiler that does not advertise
it makes target_compile_features fail to configure rather than skip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The macOS job failed to compile: Catch v2.2.2 is from 2018 and its
CATCH_TRAP for Apple platforms is unconditionally __asm__("int $3"),
which is x86 only. GitHub's macos-latest runners are Apple Silicon now,
so clang rejects the instruction outright.

2.13.10 is the last release of the v2 line and selects the trap by
architecture, including aarch64. Staying on v2 is deliberate: Catch2 v3
requires C++14, which would make the cxx_std_11 row of the matrix
impossible to build.

Same 559 assertions in 34 test cases before and after, and the benchmark
target still builds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mariusbancila
mariusbancila merged commit df033c9 into master Aug 10, 2026
17 of 19 checks passed
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