-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add github action #44
Conversation
84ef627
to
9ffcd05
Compare
a0f1756
to
eaee65d
Compare
.github/workflows/ci.yaml
Outdated
- name: Get CVC4 | ||
run: | | ||
git clone -b eqrange-quant --single-branch https://github.com/GaloisInc/vadd-CVC4.git . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this could be replaced with actions/checkout@v2 which would be the cannonical way to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? This is a different repo than the main one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like I can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll consider changing this, but what does it buy me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply, I didn't get a notification somehow.
Using the actions is preferred whenever possible because keeping with the conventional way to do something reduces cognitive overhead should someone else want to look at the code and contribute. Actions also strive to be cross platform while arbitrary shell commands don't.
I'm not particularly worried about it. But decreasing technical complexity by using established conventions has a tangible benefit for pipelines, especially if you ever want to test on windows as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree that there is a consensus, but I've changed to accommodate.
.github/workflows/ci.yaml
Outdated
uses: actions/cache@v1 | ||
with: | ||
path: home/.cabal/store/ghc-${{ matrix.ghc-ver }} | ||
key: ${{ matrix.name }}-build-${{ github.sha }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key will only ever match if you retry a failed build. I'd suggest just using something like ${{ runner.os}}-${{ matrix.ghc }}-cabal-store
.
If you want to get fancy with it, you could have the primary key be the hash of the cabal.project.freeze
file and then the fallback would be the "generic" cabal-store key.
eg:
key: ${{ matrix.name }}-build-${{ hashFiles('**/cabal.project.freeze') }}
restore-keys: ${{ runner.os}}-${{ matrix.ghc }}-cabal-store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runner.os should always be the same right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your case, yes. If you decide to test on windows or another OS for some reason, then it won't be. Might be unnecessary future-proofing, but it depends. It's very necessary for Cryptol, but not every project shares Cryptol's concerns.
50676a1
to
71f2aa3
Compare
It's not in a place that it could be reviewed -- I'll push on Sunday. |
No description provided.