-
Notifications
You must be signed in to change notification settings - Fork 2
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
Initial CI build #62
base: master
Are you sure you want to change the base?
Initial CI build #62
Conversation
3b7f74f
to
fd82c45
Compare
fd82c45
to
c128dc4
Compare
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.
Hooray! Thank you so much for doing this.
- name: Lint | ||
run: cargo clippy | ||
|
||
test: |
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.
Perhaps this should be named "build
" instead of "test
"? At present, this job doesn't run any tests.
- name: Upload binary | ||
uses: actions/upload-artifact@v3 | ||
if: github.repository == 'GaloisInc/${{ env.NAME }}' | ||
with: | ||
name: "${{ env.NAME }}" | ||
path: "target/release/${{ env.NAME }}" | ||
if-no-files-found: error |
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.
Have you confirmed that the resulting binary is actually usable if the toolchain isn't installed?
@@ -6,7 +6,7 @@ fn main() { | |||
// Add the toolchain lib/ directory to `-L`. This fixes the linker error "cannot find | |||
// -lLLVM-13-rust-1.60.0-nightly". | |||
let out = Command::new("rustup") | |||
.args(&["which", "rustc"]) | |||
.args(["which", "rustc"]) |
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 is surprising. What motivated this change?
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.
Clippy! I can revert it if you prefer.
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.
Ah, right! Perhaps this belongs in a separate commit to make this clearer.
run: | | ||
rustup default nightly-2023-01-23 | ||
rustup component add clippy rustc-dev | ||
- uses: Swatinem/rust-cache@v2.7.0 |
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 wonder if we should configure the cache a bit more to make it behave like our typical Haskell GHA setups. After reading the rust-cache
README a bit, I think we should tweak the following:
- I think we should enable
cache-on-failure
so that build dependencies will still cache even if buildingmir-json
itself fails. - To future-proof this a little bit in case we accidentally corrupt the cache and need to invalidate it, I think it would be worth setting
prefix-key: ${{ env.CACHE_VERSION }}
, whereCACHE_VERSION
is a GHA environment variable.
Similarly for the use of rust-cache
in the other job below.
Fixes #42