calyx
calyx copied to clipboard
Re-enable playground github workflow
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.
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.)
Hey, after merge of https://github.com/calyxir/calyx/pull/1949 , the playground deployment is again running, but has some issues like :
- Some examples are not found : eg Minimize regs simple , resource sharing etc .
- 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,
- 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 )
- 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 :)
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