Skip to content

buildkite/cmake-cpp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buildkite C++ CMake Example

Build status Add to Buildkite

This repository demonstrates a Buildkite pipeline that builds and tests a simple C++ project using CMake.

👉 See this example in action: buildkite/cmake-cpp-example

See the full Getting Started Guide for step-by-step instructions on how to get this running, or try it yourself:

Add to Buildkite

Screenshot of example pipeline build page

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
  • 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 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) 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 (MIT)

Releases

No releases published

Packages

No packages published