Skip to content
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

Merged
merged 1 commit into from
Mar 30, 2020
Merged

Add github action #44

merged 1 commit into from
Mar 30, 2020

Conversation

joehendrix
Copy link
Contributor

No description provided.

@joehendrix joehendrix changed the title Add github action WIP: Add github action Mar 27, 2020
@joehendrix joehendrix force-pushed the jhx/github branch 29 times, most recently from 84ef627 to 9ffcd05 Compare March 27, 2020 07:45
@joehendrix joehendrix force-pushed the jhx/github branch 3 times, most recently from a0f1756 to eaee65d Compare March 27, 2020 17:29
Comment on lines 13 to 11
- name: Get CVC4
run: |
git clone -b eqrange-quant --single-branch https://github.com/GaloisInc/vadd-CVC4.git .

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

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.

Copy link
Contributor Author

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.

uses: actions/cache@v1
with:
path: home/.cabal/store/ghc-${{ matrix.ghc-ver }}
key: ${{ matrix.name }}-build-${{ github.sha }}

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

Copy link
Contributor Author

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?

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.

@joehendrix joehendrix changed the title WIP: Add github action WIP: Add github action NO REVIEW NEEDED! Mar 27, 2020
@joehendrix joehendrix changed the title WIP: Add github action NO REVIEW NEEDED! WIP: Add github action NO REVIEWS REQUESTED! Mar 27, 2020
@joehendrix joehendrix changed the title WIP: Add github action NO REVIEWS REQUESTED! WIP: Add github action Mar 27, 2020
@joehendrix joehendrix force-pushed the jhx/github branch 10 times, most recently from 50676a1 to 71f2aa3 Compare March 27, 2020 20:09
@joehendrix joehendrix changed the title WIP: Add github action Add github action Mar 27, 2020
@joehendrix
Copy link
Contributor Author

It's not in a place that it could be reviewed -- I'll push on Sunday.

@joehendrix joehendrix merged commit e710c33 into master Mar 30, 2020
@joehendrix joehendrix deleted the jhx/github branch May 23, 2020 04:46
@joehendrix joehendrix restored the jhx/github branch May 23, 2020 04:50
@joehendrix joehendrix deleted the jhx/github branch May 23, 2020 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants