0

I'd like to create a CI flow on GitHub Actions for a compilation process of my ESP-IDF-based project, over my self-hosted runner.

The ESP-IDF require exporting numerous shell variables and other shell-related tasks before the compilation. They provide a an export.sh script for that and expect the user (me) to source export.sh before the compilation steps.

How can I guarantee that all steps under a certain job are done under a custom shell with the ESP-IDF requirements?

I'm aware that I can have multi-line run commands in GitHub Actions, but that will require me to source export.sh on each step, won't it? This will slow down the job.

Thanks

galah92
  • 3,621
  • 2
  • 29
  • 55

1 Answers1

2

You can use the docker image given by Espressif itself.

Here the GitHub guide

https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action

Here the Espressif guide to their docker image

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html

R. Mereu
  • 46
  • 3