CTSRD-CHERI / QuickCheckVEngine

A RISC-V TestRIG Verification Engine based on QuickCheck
BSD 2-Clause "Simplified" License
7 stars 9 forks source link

Add a basic GitHub Actions CI script #20

Closed arichardson closed 5 months ago

arichardson commented 1 year ago

Using https://github.com/freckle/stack-action

arichardson commented 1 year ago

Sounds like the compiler in this job is more strict. @PeterRugg @gameboo are those warnings worth fixing?

PeterRugg commented 1 year ago

Hmm, unless we can configure the compiler we normally use to throw the same errors, this would just be frustrating. That said, it might be worth fixing them. I don't know if we're actually confusing variables anywhere.

arichardson commented 1 year ago

Hmm, unless we can configure the compiler we normally use to throw the same errors, this would just be frustrating. That said, it might be worth fixing them. I don't know if we're actually confusing variables anywhere.

I think you tell it to use a given version. Alternatively there also seems to be https://github.com/haskell/actions/tree/main/setup which allows more configuration but requires adding manual build steps instead of just relying on stack.

gameboo commented 1 year ago

I've only used github actions doing cabalisms and ghcisms before, but there may be useful things to fix here anyways. I'll see if I can reproduce locally.

arichardson commented 1 year ago

I've only used github actions doing cabalisms and ghcisms before, but there may be useful things to fix here anyways. I'll see if I can reproduce locally.

The following works for me stack clean && stack build --pedantic --ghc-options -fno-warn-unused-matches --ghc-options -fno-warn-name-shadowing I guess there is a similar flag to --pedantic for cabal.

gameboo commented 1 year ago

hehe... trying to install stack... it defaults to my nfs... I am out of quota... yay!

gameboo commented 1 year ago

so looking at some of the annotations:

XXX is not used by any defined root

sure, but, I mean... So what? I am still exporting this out of my library module... Not sure why this gives a red cross there...

EDIT: is there a way to tell stack that I want this?

arichardson commented 1 year ago

so looking at some of the annotations:

XXX is not used by any defined root

sure, but, I mean... So what? I am still exporting this out of my library module... Not sure why this gives a red cross there...

EDIT: is there a way to tell stack that I want this?

We can drop the weeder bits from this CI run, I just thought it might be helpful to find unused functions. I think we can also add additional roots to tell it that those functions should be ignored. See https://github.com/ocharles/weeder#readme

gameboo commented 1 year ago

oo fancy.

Let's drop this for now but I am having a pass fixing a bunch of warnings and I'll push on the branch if that's ok?

gameboo commented 1 year ago

I think we can also add additional roots to tell it that those functions should be ignored.

It'd be nice to do this at some point

arichardson commented 1 year ago

oo fancy.

Let's drop this for now but I am having a pass fixing a bunch of warnings and I'll push on the branch if that's ok?

That sounds good! I can drop the "weeder" part of this PR?

gameboo commented 1 year ago

yeah let's drop it for now I just finished building with full pedantic except for the orphan class thing but there is no real story to tackle that one in general... We had discussion already on where this code ought to live but from what I remember we don't think it should go near the type. so, -fno-warn

gameboo commented 5 months ago

@arichardson I reverted my commits which seemed to conflict with a recent master and updated the ci script to remove the weeder, and add a build step as well. I will merge this PR and we can add a weeder at some point if we want.

I'll probably also have a pass at re implementing these commits I reverted at some point...

gameboo commented 5 months ago

Sure thing. I'll create a branch somewhere though, because I am keen to hold on to the changesets somewhere (I'll eventually want to implement these).

gameboo commented 5 months ago

@marnovandermaas done!