Skip to main content

2 posts tagged with "github actions"

View All Tags

Automated Testing for Seamless CMake Config File Integration

· 13 min read
Christopher McArthur
C++ DevOps Expert

As a C++ developer, ensuring your library integrates flawlessly with other projects is crucial for driving adoption. CMake being the defacto standard plays a vital role in this process by providing installed configuration files; guiding consumers on how to find and utilize your library using find_package. But how do you guarantee these config files are installed correctly and provide all the necessary information? Enter automated testing!

This blog post explores an approach for testing CMake config files inspired by Behavioral Driven Development practices and showcases a powerful implementation on GitHub Actions featuring 14+ test cases.

Why Test CMake Config Files?

Imagine creating a fantastic C++ library, only to have users encounter missing headers or library paths when they attempt to integrate it within their builds. This very real headache is why many open-source developers have opted for header-only libraries. "Just copying the headers" eventually became the norm. However, this trend has culminated in ballooned build times, as the preprocessing stage can become a bottleneck.

Unlock Efficiency & Innovation in C++ Development: Building More Configuration than You Ship

· 4 min read
Christopher McArthur
C++ DevOps Expert

In the steadily evolving landscape of C++, where incremental improvements shape the tools we use, it can quickly become a challenge to stay up to date with the latest technologies while still supporting the code already in production. If you're apart of the 61% of C++ developers, the concept of building more configurations might initially seem counterintuitive. However, it's precisely under such circumstances that this approach serves as a solution to the challenge of limited access to new features and tools within the C++ ecosystem.

By prioritizing testing a comprehensive list of configuration during CI, your team can unleash access to new features and tools, boosting productivity and ensuring project longevity and compatibility in a competitive landscape by establishing guardrails for the project.

Let's delve deeper into the compelling reasons why this DevOps approach, centered around building more configurations, deserves widespread adoption in C++ environments.