-
Notifications
You must be signed in to change notification settings - Fork 109
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 --require-version flag #497
Conversation
Apologies for my OCaml! Especially |
This adds a flag that lets you require a minimum version of the Sail compiler. If the version doesn't meet the requirements it exits with exit code 1. Otherwise it continues as normal. This means you can use it as a standalone check (`sail --require-version 0.17.2`) or as an additional flag to your existing commands. The Sail version is also now hard-coded, and verified against the Git tags in CI.
42dfe50
to
f47222d
Compare
@Alasdair would be great to have a new release that includes this flag soon so we can update the riscv sail model build system to have fewer confusing failure modes. |
Yep, I will take this and probably simplify the version logic a bit. I'll try to get it in tomorrow. |
Ah so the reason the check in the CI fails is because GitHub actions does a shallow clone that doesn't include the tags. It's not showing as failing on this PR because the ci_core_tests script is only run for the build matrix job, and that isn't enabled for external PRs right now. |
Ahh that also explains why the version was |
I might just remove that check in the action, just have to be careful to keep things in sync when bumping the version number. |
I believe you can retrieve just the metadata history like this:
After I did that on a |
I added this commit in #544, so closing this PR I'll look at re-adding the version check in the CI separately |
This adds a flag that lets you require a minimum version of the Sail compiler. If the version doesn't meet the requirements it exits with exit code 1. Otherwise it continues as normal.
This means you can use it as a standalone check (
sail --require-version 0.17.2
) or as an additional flag to your existing commands.I added
--abbrev=0
to thegit describe
command so we don't have to later strip the stuff after the-
.