cancel
Showing results for 
Search instead for 
Did you mean: 

Build using Cube for VSCode under GitHub actions

CShaw1
Associate

Hi,

I have existing projects under the tried-and-trusted STM32CubeIde which I have previously built using the headless build option from GitHub actions, with CubeIDE pre-installed. This works well.

I'm investigating use of the Stm32Cube for VS Code extension, that will enable us to use the Cursor AI fork of VS Code and have got the projects building correctly on my dev machine, using cmake files. All works well on my machine, but am trying to work out what steps are needed to get this working on GitHub actions. 

I understand (I think) that I need to have the extension installed to provide the 'cube' executable wrapper for cmake, setting up the correct path for the toolchain. So, do I need to install VS Code and the ST extension under my GitHub action yaml file to allow this all to build? 

I'm expecting to use the command line: `cube cmake --preset Release`  followed by `cube cmake --build --preset Release` or similar. But I'm not sure what I need to install/configure prior to this. My current build process uses a docker image on Ubuntu with the CubeIDE installed.

Any help appreciated, or examples from anyone who already has this working.

 

1 ACCEPTED SOLUTION

Accepted Solutions
CShaw1
Associate

Found a solution for anyone else facing the same question.

  • To build under GitHub actions, only cmake and ninja (if used for the makefile system, as appears to be the default) need be installed (if not already) as well as the GCC ARM tools (or STM32CubeIDE).
  • The STMCube for VS extension only seems to setup the path correctly such that the arm-none-eabi-gcc etc executables can be found. If you ensure the path is setup correctly in the GitHub actions then this is sufficient.
  • You can then build using the commands below, or for whichever build flavour is required.

cmake --preset Debug
cmake --build --preset Debug

View solution in original post

1 REPLY 1
CShaw1
Associate

Found a solution for anyone else facing the same question.

  • To build under GitHub actions, only cmake and ninja (if used for the makefile system, as appears to be the default) need be installed (if not already) as well as the GCC ARM tools (or STM32CubeIDE).
  • The STMCube for VS extension only seems to setup the path correctly such that the arm-none-eabi-gcc etc executables can be found. If you ensure the path is setup correctly in the GitHub actions then this is sufficient.
  • You can then build using the commands below, or for whichever build flavour is required.

cmake --preset Debug
cmake --build --preset Debug