Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Introduce GitHub Actions for Firmware Build and Release #131

Merged
merged 2 commits into from
Feb 23, 2025

Conversation

lucaam
Copy link
Contributor

@lucaam lucaam commented Feb 19, 2025

This PR introduces GitHub Actions workflows to automate the build and release process for ESP32 and ESP8266 firmware.

What it does:

  • Builds for both ESP32 and ESP8266 boards (optional).
  • Dynamic creation of secrets.h during the build.
  • Conditional artifact uploads for valid tags.
  • Automatic release creation with firmware binaries attached when a new tag is pushed.

@lucaam lucaam changed the title Introduce GitHub Actions for Firmware Build and Release ci: Introduce GitHub Actions for Firmware Build and Release Feb 19, 2025
@BrookeDot
Copy link

Would it make sense to also export out the config file, there are a bunch of basic things in there I have changed such as timezone an weather location. These could likely be moved to secrets.h at some point and have it renamed config.h.

@lucaam
Copy link
Contributor Author

lucaam commented Feb 19, 2025

@BrookeDot I would keep the idea for a separate PR allowing a config_override.h or something like that to set the basic config.h and if needed and specified, what's inside the override file.

@BrookeDot
Copy link

I totally see where you're coming from @lucaam, I guess my question was more trying to answer if the project was particularly useful without any customization in the config.

At the moment, there are a lot of little things that must be configured to make the the hack useful out of the box. I still see value in having the binary files configured, but think for 90+ percent of users they will still need to build from source to have the project meet the average use case.

The other option would be to build an access point into the project allowing configuration to occur there.

With all that said, it's cool to see how to add CI builds to C++ projects, and appreciate the work you put into this. I agree that there is no real harm in pushing the builds "as is" to the repo and then each end user can at least have an easy way to do a test on if it works or not with their hardware.

@lucaam
Copy link
Contributor Author

lucaam commented Feb 20, 2025

Hi @BrookeDot, the main idea was add a check that just builds the project to verify that at least it builds with the changes from the pull requests, and the idea was mainly because (I don't know the history of the project) I tried to build for esp8266 and it was not working out of the box.

About the compiled binary with no configuration, as you already said, it was meant to have some kind of ready binary to let the user test it on its board, and not have the final version of the software to use. I agree with you and that's why the binary release process will be up to the maintainer since it will be triggered with tags only.

I will try to work on some kind of page to show after the first startup so the pre-built binary could also be used at that point.

@BrookeDot
Copy link

Ah that makes more sense! I have seen folks have build issues so love to have a build test that runs on commit to main for quick testing and build confirmation. Thanks for helping me understand the goals here :D

@ph1p
Copy link
Owner

ph1p commented Feb 23, 2025

I also think this is a nice addition :) thank you! Even if the builds are very different for many users, it's nice to at least get some feedback for code changes.

@ph1p ph1p self-assigned this Feb 23, 2025
@ph1p ph1p merged commit d9f92cf into ph1p:main Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants