DEV Community

Cover image for GitHub CMake cross-compile action workflow example
Artak Avetyan
Artak Avetyan

Posted on

1

GitHub CMake cross-compile action workflow example

For my C++ project at GitHub i wanted to create an action workflow to compile sources. At first, i used the CMake workflow template offered by GitHub (those who are not familiar much with GitHub, in Actions tab select New Workflow), and compiled only with GCC under Linux.
AREG SDK GitHub Action workflow

But the agenda was to compile sources using multiple compilers and platforms. Since I was not familiar with YAML, I started to search and looked many examples of complex workflows to combine in one file. The alternative would be creating one workflow per compilation, which I considered not much efficient. Finally, I've created an action workflow, which compiles with gcc/g++, clang/clang++ and msvc under Linux (Ubuntu), Windows and even Cygwin. Here I share the link to the CMake Workflow. I find it very useful, helps to save time to check cross-compilation after every push. Can be useful and good example for other projects.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay