Ci/GitHub actions - #43
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use Github actions for building and testing.