https://github.com/buildkite/cmake-cpp-example
An example pipeline that builds and tests a C++ project using CMake.
https://github.com/buildkite/cmake-cpp-example
buildkite cmake cmake-examples cpp example pipeline
Last synced: 7 months ago
JSON representation
An example pipeline that builds and tests a C++ project using CMake.
- Host: GitHub
- URL: https://github.com/buildkite/cmake-cpp-example
- Owner: buildkite
- License: mit
- Created: 2025-07-11T03:36:50.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-07-11T04:52:39.000Z (7 months ago)
- Last Synced: 2025-07-11T07:50:31.744Z (7 months ago)
- Topics: buildkite, cmake, cmake-examples, cpp, example, pipeline
- Homepage: https://buildkite.com/buildkite/cmake-cpp-example/builds/latest?branch=main
- Size: 303 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Buildkite C++ CMake Example
[](https://buildkite.com/buildkite/cmake-cpp-example/builds/latest?branch=main)
[](https://buildkite.com/new)
This repository demonstrates a [Buildkite](https://buildkite.com/) pipeline that builds and tests a simple C++ project using [CMake](https://cmake.org/).
👉 **See this example in action:** [buildkite/cmake-cpp-example](https://buildkite.com/buildkite/cmake-cpp-example/builds/latest?branch=main)
See the full [Getting Started Guide](https://buildkite.com/docs/guides/getting-started) for step-by-step instructions on how to get this running, or try it yourself:
[](https://buildkite.com/new)
## How it works
This example:
- Builds a simple C++ app using `CMakeLists.txt` and a basic `main.cpp` file
- Defines a test in `test/test_hello.cpp`, run using [CTest](https://cmake.org/cmake/help/latest/manual/ctest.1.html)
- Uses a `.buildkite/pipeline.yml` to run:
- `cmake -S . -B build`
- `cmake --build build`
- `ctest --test-dir build --verbose`
- Runs on a [Buildkite-hosted agent](https://buildkite.com/docs/pipelines/hosted-agents) with CMake and a C++ compiler preinstalled - no Docker setup needed 🎉
## Requirements
- A Buildkite agent with:
- `cmake`
- `make`
- A C++ compiler like `g++` or `clang++`
_(This example uses a **[Buildkite-hosted agent image (Linux)](https://buildkite.com/docs/pipelines/hosted-agents/linux#agent-images)** with all required tools preinstalled - no extra setup needed!)_
> 💡 The default agent queue is set in the Buildkite **Pipeline Settings → Steps** UI,
> so there's no need to specify it inside the `.buildkite/pipeline.yml` file.
## License
See [LICENSE](LICENSE) (MIT)