calyxir / calyx

Intermediate Language (IL) for Hardware Accelerator Generators
https://calyxir.org
MIT License
453 stars 45 forks source link

Add playground config validation script and CI #1976

Closed YJDoc2 closed 2 months ago

YJDoc2 commented 2 months ago

closes #1737 ref : https://github.com/calyxir/calyx/issues/1737#issuecomment-1986905609

Sorry it took a bit of time to get this up, got busy in other things...

This adds a node script which will validate that

  1. All passes listed in the passes.json are valid (cross checking with calyx pass-help o/p)
  2. all example files that are in config.json are actually present

Currently parked the CI in rust.yaml, as I figured it would be better to run on each push, can move to other yaml as per suggestions.

Also instead of checking with master, the files are checked at local level, so that addition of new file or removal of existing file is correctly detected. I can also add a step to post a comment on PR if the validation fails, but might be overkill.

Once suggested changes are added, will remove the non existent passes and example files so the CI passes. Example of failing CI https://github.com/YJDoc2/calyx/actions/runs/8331868876/job/22799692081

@sampsyo please take a look, thanks :)

YJDoc2 commented 2 months ago

Hey also, if similar to last time, you are not getting the approve and run button for PR , and checks are pending, it might be because the CI are on push only, and thus run in my fork, but not on PR here. Most other PRs I checked are from this repo to this repo, so their CI might be working properly. When I filter in actions for event pull_request only fud2 CI is there, others do not have any runs, so this might be the cause for pending checks.

YJDoc2 commented 2 months ago

Btw, opened https://github.com/calyxir/calyx/pull/1978 to fix the above CI issue.

rachitnigam commented 2 months ago

Awesome, thanks @YJDoc2!

YJDoc2 commented 2 months ago

Hey, So I'll remove the missing stuff / passes so the CI will pass ; I'm disabling auto merge so that you can suggest if you want a specific pass / example added, and it won't just get merge automatically.

YJDoc2 commented 2 months ago

Not entirely sure why the previous commits failed, but the latest main merge is succeeding CI. Given that the demo data validation CI is passing (which is added in this PR) , and I haven't actually changed any core code, only the example config data in web demo ; can the previous failures be ignored and this merged? @rachitnigam

rachitnigam commented 2 months ago

Yeah, it was a dockerfile failure.