n0xa / m5stick-nemo

M5 Stick C firmware for high-tech pranks
Other
673 stars 134 forks source link

ci: dockerize build #105

Closed ahmedalhulaibi closed 5 months ago

ahmedalhulaibi commented 5 months ago

This PR codifies the build instructions in the README as a Docker image and series of scripts to emulate the GH actions workflow setup in this repo.

My main motivation was to make it easier to switch host machines and repeat a build, I did not want to have to reinstall tools each time and wanted a consistent repeatable environment.

Notes

  1. I did rename a directory because it had spaces in it and it's a nitpick of mine to use directory names with spaces in scripts - no functional reason though so lmk if you feel strongly.
  2. The .env files are derived from the YAML in the build matrix - I feel that it would be better to centralize the configs in the repo as .env and generate the build matrix inputs dynamically based on the config files. That way edits can be done in just one place. I can follow up with another PR or get that done before this is merged
vs4vijay commented 5 months ago

Great work @ahmedalhulaibi , Is it possible to re-use these scripts / docker container / files in our Github Actions workflows? so that we only need to make changes at one place when we try to add more libraries or other changes. #JustASuggestion

ahmedalhulaibi commented 5 months ago

@vs4vijay yeah 100% it is possible, I left a note about that in the PR description. I totally agree it would simplify things.

The .env files are derived from the YAML in the build matrix - I feel that it would be better to centralize the configs in the repo as .env and generate the build matrix inputs dynamically based on the config files. That way edits can be done in just one place. I can follow up with another PR or get that done before this is merged