Skip to main content
Associate III
Sep 4, 2026 12:50 PM UTC
Question

How to implement a pipeline on github using autogenerated Cmake files

Hi all,

I’m configuring a GitHub Actions CI pipeline for an STM32 project with auto-generated CMake files (STM32CubeIDE/CubeMX).
I already created a custom Debian container including the dedicated ARM toolchain (arm-none-eabi) version 14.3.rel1 for reproducible builds.
What is the best practice: how do I have to configure the CmakeList? Is there a template?
How can I keep custom flags/include paths/post-build steps without editing generated files directly?
Do you have a minimal working example for STM32 + CMake on GitHub Actions (including .elf/.bin/.hex artifacts)?
Thanks in advance for any recommendations.

3 replies

Pavel A.
Sep 4, 2026 10:27 PM UTC

CI actions on github run automatically when certain events occur: usually a push (code change), when a release is created, etc. See the Github docum. Actions on code change usually cause rebuild, so your Cmake will be automatically called, nothing special is needed in the cmakeList.

Also it’s possible to call a CI action “manually” - if you want to do this from your Cmake script, read on GitHub CLI (the gh workflow run command) and on external triggers.

 

Fin95Author
Associate III
Sep 7, 2026 8:15 AM UTC

First of all thank you for your reply!

For the build container, is it okay to use the official ARM GNU Toolchain (https://gitlab.arm.com/tooling/gnu-toolchains-for-arm) instead of the local toolchain installed by STM32CubeIDE?

The goal is to have a more reproducible CI build, independent from the local CubeIDE installation.

I have already experience in the pipeline development for software project written in Python, but for compilation is a bit more complex.

Thanks again!

 

 

Pavel A.
Sep 7, 2026 5:14 PM UTC

>  is it okay to use the official ARM GNU Toolchain

Yes, the toolchains provided by ST are compatible with those provided by ARM. But you’ll likely need additional libraries, includes and other files provided by ST.