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

Add CI workflow with artifact creation for binary flashing #540

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nor2101
Copy link

@nor2101 nor2101 commented Feb 25, 2024

Hi,

based on previous work I did on esp32 github projects I though it would be useful to have a CI workflow added to your gbs-control project.

Currently the sketch is compiled with all the right fqbn settings (flash layout, cpu speed, etc.), NodeMCU v1.0 as the board and esp8266 v2.7.3 as the core, but both can be easily changed.

I also added the creation of a build artifact, with the compiled sketch in bin format, two batch script files and the esptool.exe windows flashing tool to allow for (hopefully) easy binary flashing.

I have yet to test the batch scripts, they're based on the scripts I made for my most recent esp32 project (in theory they should work fine, one uploads just the sketch and the other erases wifi settings in addition to that).

Let me know what you think

@nyanpasu64
Copy link
Collaborator

sorry for the late response. i downloaded the artifact from your repo but it doesn't seem useful right now.

  • you're creating a zip file of a zip file. you have to pass a folder into actions/upload-artifact@v4 so the user downloads a zip file directly.
  • is it better to cmd /k esptool.exe, or run esptool directly then pause?
  • upload_sketch_only.bat executes cmd /k esptool.exe --chip esp8266 --baud "921600" "" --before default_reset --after hard_reset write_flash 0x0 gbs-control.ino.bin, which fails with error:
usage: esptool [-h]
               [--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32h2,esp32p4}]
               [--port PORT] [--baud BAUD] [--before {default_reset,usb_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset,no_reset_stub}] [--no-stub] [--trace]
               [--override-vddsdio [{1.8V,1.9V,OFF}]] [--connect-attempts CONNECT_ATTEMPTS]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,merge_bin,get_security_info,version}
               ...
esptool: error: argument operation: invalid choice: '' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash_status', 'write_flash_status', 'read_flash', 'verify_flash', 'erase_flash', 'erase_region', 'merge_bin', 'get_security_info', 'version')

C:\Users\user\Downloads\gbs-control-bin-win64_1>

do you need to move write_flash where "" is located? i don't know what "" does. (i did not try running upload_sketch_erase_wifi.bat because I don't want to risk wiping my presets.)

@ramapcsx2
Copy link
Owner

Sorry, I also didn't see this one ><
First thing's first: CI for GBSC? Why? :p

@nyanpasu64
Copy link
Collaborator

to check that the code builds on prs i suppose? and to supply prebuilt blobs for users who assembled their own unit but haven't set up a build environment locally. (it would be cool building a compilation toolchain in wasm to run in the browser in a platform-independent way.)

my concern is github artifacts my age out, maybe it's worth having pushes to master push artifacts to a rolling github release (this can come later).

@ramapcsx2
Copy link
Owner

Oki, still seems like a lot of maintenence work to basically upload a release every so often, dunno.

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.

None yet

3 participants