Menu

Show DEV: I Built a Bayesian GitHub Action to Find the Commit That Broke Your C++ Project
πŸ“°

Show DEV: I Built a Bayesian GitHub Action to Find the Commit That Broke Your C++ Project

DEV Community: cppΒ·Andrew JokovichΒ·3 days ago
#EWRRjfdq
#devtocpp#devto#dev#build#bayesci
Reading 0:00
15s threshold

Show DEV: I Built a Bayesian GitHub Action to Find the Commit That Broke Your C++ Build

Hey DEV community! πŸ‘‹

I've been experimenting with probability theory and wanted to see whether Bayes' theorem could help identify which commit caused a failed CI build .

So I built BayesCI , an open-source GitHub Action powered by a small Bayesian engine written in C, with Python handling Git analysis and compiler diagnostics.

The problem

Imagine you've made several commits, pushed your changes, and suddenly your C++ build fails:

undefined reference to `calculate_total' collect2: error: ld returned 1 exit status

Enter fullscreen mode

Exit fullscreen mode

The compiler tells you what failed, but not necessarily which commit introduced the problem.

That's what BayesCI tries to help with.

How it works

BayesCI:

Reads GCC, Clang, linker, and CMake diagnostics.

Examines commits since the last successful build.

Analyzes changed files, symbols, lines, and build configuration.

Uses Bayesian ranking to identify…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.