calyx icon indicating copy to clipboard operation
calyx copied to clipboard

Re-enable playground github workflow

Open rachitnigam opened this issue 2 years ago • 3 comments

The playground workflow suddenly started failing. A likely cause is the underlying ubuntu container for GH actions being updated and causing one of the dependencies to fail.

rachitnigam avatar Oct 11 '23 15:10 rachitnigam

The Hip New Way to do this kind of thing is to use the WebAssembly component model and jco! If anyone's interested, overhauling the build pipeline to use that could be a good way to go. (Another option is to just fix the current build pipeline in its current form.)

sampsyo avatar Feb 27 '24 20:02 sampsyo

Hey, after merge of https://github.com/calyxir/calyx/pull/1949 , the playground deployment is again running, but has some issues like :

  1. Some examples are not found : eg Minimize regs simple , resource sharing etc .
  2. some passes are not valid : eg component-interface-inserter , resource-sharing

The simple fix would be to check which files for examples are missing / moved and update the config.json file accordingly ; and remove the invalid passes. For a more long-term fix, I'm thinking of a simple node script which will basically do the above automatically, and can be run in CI on each push to validate that the PR does not break anything.

I also thought to maybe generate the config.json file automatically, i.e. a script which will scan the tests dir to find the examples present and generate the file from that, and can be run in the website build command to always have up-to-date examples and passes. But,

  1. There are a lot of tests, and I think adding all of those as example on site would overwhelm the users (especially first time users - like me :p )
  2. I don't have much idea how the default passes can be determined from the file

So, I feel only the validation CI would be good.

Apart from that is there anything this issue needs to address ?

Thanks :)

YJDoc2 avatar Mar 04 '24 11:03 YJDoc2

That validation thing seems like a pretty good idea! It would hopefully be pretty straightforward to check that the list of passes actually exists. And you're right that including all the tests as examples in the playground probably wouldn't make sense—it seems more reasonable to keep these "handpicked," and checking that they actually exist would be lovely.

For the set of passes, it would be possible to parse a list of passes from the output of calyx pass-help. This output is pretty long, however, so I'm not 100% sure how convenient it is to parse? For a default set of passes to surface in the UI, it might make sense to include the compile alias that this output mentions:

- compile: static-inline, merge-assigns, dead-group-removal, simplify-static-guards, add-guard, compile-static-interface, dead-group-removal, compile-static, tdcc

sampsyo avatar Mar 09 '24 16:03 sampsyo