daveythacher / LED_Matrix_RP2040

GNU General Public License v3.0
1 stars 2 forks source link

Add Gherkin and/or Jenkins front end for config file generation #24

Closed daveythacher closed 1 year ago

daveythacher commented 1 year ago

The build system is designed to support configuration and build flavors for artifact production.

Currently a groovy script is used to create a bash script which calls CMake. However CMake can be used directly if desired, which should work on any platform.

daveythacher commented 1 year ago

Rough sample to give idea:

Given binary named POE
When using serial uart
When using multiplexer Decoder
When using matrix BCM
And multiplex scan 8
And serial clock 15 MHz
And frame rate of 30
And LED contrast of 500
And panel refresh of 500 Hz
And panel with 128 columns
And anti-ghosting blank time of 10 uS
Then build it
daveythacher commented 1 year ago

Thinking this will be done in ruby or maybe Python to create the configuration file. From there the ball can be handed off to groovy.

Cucumber still does not have support on Groovy for the run time it is still Java based with Groovy code support. The same it was 9 years ago...

I remember the Java version worked well, but not what I want for this. Ruby worked very well if you know Ruby. Python was okay, but not as good as Java/Groovy or Ruby. Python is called Lettuce, if I recall correctly. However now they are using Behave as semi-official.

More than likely this will be done in Ruby, which I will need to look into a little. More than likely I only need basic features so this should be straightforward.

daveythacher commented 1 year ago

Then build it may need some more thought put into it. Current groovy scripts are based on the idea of batch compilation which Gherkin struggled with somewhat as I recall. It was do able however it built more for discrete steps. Gherkin works as documentation very well for discrete steps and gives meaningful updates against each step that way. However if you ever find yourself in a batch compilation role it loses the ability report in a meaningful way.

Output of binaries and the corresponding build logs may be painful. However I think the ruby script could manage this, but this would create coupling of the back end of the build system to the front end. I think this should be avoided. Perhaps a save off command could be given to the groovy script to manage this.

daveythacher commented 1 year ago

Current logic builds one at a time. Currently logic does not support compiling multiple features, rules, examples, etc. This can likely be worked around using the groovy script directly or moving artifacts.

Note Jenkins has nice Cucumber integrations with artifact publishing. Jenkins however should also support flavors using the groovy logic directly.

daveythacher commented 1 year ago

I am mostly messing around with this. The point of this is make something a little more helpful compared to the configuration file.

daveythacher commented 1 year ago

Currently the outputs are in the same location and overwrite each other. For the time being this is likely fine. No issues have been seen with this.

Intermediate configuration files are kept in local directory. Only cfg.xml should be committed.

Documentation of cucumber logic is still required.