Skip to main content
Graduate II
January 11, 2023
Question

Continuous Integration Using github Actions: to Static Test and Compile in every commit

  • January 11, 2023
  • 1 reply
  • 1808 views

Is anyone doing this (CI) ? any suggestions/ideas are welcomed.

What i found so far:

GitHub provides Linux, Windows, and macOS virtual machines to run your workflows, or you can host your own self-hosted runners in your own data center or cloud infrastructure.
Quoting wrhnks "The purpose of the continuous delivery is to update your production environment with the latest release. Regarding embedded systems this step is really hard because you need to at least have some way to deliver this new binary to your devices, and handle possible issues that may arise."
What I have done in the past is to have a shell script that grabs all the dependencies and a makefile to run tests/build steps. Another option is to build an docker image with all these steps, push it to a docker registry, and set up your CI to use this docker image to run the tests and build steps.
  •  here, @PADAM.1​ , wonders how to compile a cubeIde project from the ubuntu command line, this is interesting in order to do the same with the github dockered ubuntu machine.

@toroid​ ​ mentions he was using gitlab

Quote toroid "A related issue that I am having now is that I cannot use the abovementioned command anymore to compile in Docker (in gitlab CI). The docker image is an ubuntu 16.04 that has gcc-arm-none-eabi installed. This used to work.... Maybe changes between CubeIde versions broke it, not sure. I cannot install Stm32cubeIde in Docker to do what Pavel suggested. "
  •  As pointed by @toroid​ , here @Miles​ tries to use headless builds to setup his CI system
  • Great video about using makefiles with generated makefile from cubemx

    This topic has been closed for replies.

    1 reply

    Super User
    January 12, 2023

    Well... Just doing a build is not complicated. Run the eclipse headless build in a container (or a standard make/CMake if you use that). I don't know what was the problem to set up a container with CubeIDE. If this is because of Java, maybe use a full VM.

    What is more interesting, can you run some acceptance test without the real hardware: on qemu or ARM simulator etc.

    Javier1Author
    Graduate II
    January 12, 2023

    >>Well... Just doing a build is not complicated

    Thats going to be the first step, probably with more than one compiler/ more than one Optimization options.

    >>I don't know what was the problem to set up a container with CubeIDE

    I would be using make i think. Unless headless CubeIDE in Ubuntu works at the first try.

    >>can you run some acceptance test without the real hardware

    I was planning on running some simple MISRA static analyzers, and some scripts triggering custom HIL tests on the real hardware.

    >>on qemu or ARM simulator etc.

    I preffer to stay away from simulators, i am testing more than the Mcu itself, im testing the whole board.