-
-
Notifications
You must be signed in to change notification settings - Fork 5
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 a generic install.sh and update README.md. #88
Conversation
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.
Thanks for chipping in.
I had left things as advisory - aka I leave it to you to know how to download a thing and check a hash and not tackled the bigger problem of an installer until 1.0. Getting a head start on that is good, but I'd definitely want these things in the end:
- science.scie.app docs have an install page with instructions / links and the instructions should probably use a sice.app URL (if there were install scripts and they lived in this repo, they could be symlinked into the doc tree so that they get published to the doc site).
- Install should be at least explained for each supported platform, ideally though, it would be supported via script or officially supported package.
There is roughly that for scie-pants for example between:
- https://www.pantsbuild.org/2.21/docs/getting-started/installing-pants
- https://github.com/pantsbuild/setup/blob/gh-pages/get-pants.sh (which works on Windows Git-supplied bash in addition to linux and mac)
- https://github.com/pantsbuild/scie-pants/blob/d50bd33fd67e944384c9548811a66c1cb03113a5/.github/workflows/release.yml#L156-L178
I'm not sure what you were gunning for here @kwlzn. A step towards that sort of thing maybe? No matter the intent, a basic CI test on the supported platforms at least would be great. Even if just a step that ran the installer and then ran the installed binary and confirmed the version output.
yeah, a pre-1.0 rough edged step in that direction. essentially, just aiming to make it trivial to link to and have a complete newcomer running I'm happy to refine this a bit more tho and port |
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.
LGTM, we'll see what CI says.
the salient part of the latest CI failure seems to be a failure in the pwsh curl mode call:
my intuition says the |
I think probably not. It seems highly likely dirname / basename don't play well with |
afaict, I did notice one mixed there is one other similar path separator join (directly adjacent to where |
explicitly converting the but based on https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/ it seems windows does have native curl since windows 10 (2018-present - not sure if support needs to go back further than that?) - it works as expected at least in CI, so I moved to that as a unification. with the broken downloads fixed, we're now onto a shasum failure:
which seems to indicate some trailing carriage returns that may be messing things up:
(with shasum checking removed, the tests pass E2E on the windows shards) |
eef5002
to
d57ff05
Compare
sanitizing the downloaded sha256 file with so, I think this is good to go - assuming you're ok with the switch to |
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.
The remaining wonkiness was just self hosted runner hygiene. I've fixed that up with a custom runner job start / stop script and I'll follow up with a few CI workflow tweaks as well towards that end.
cd "${workdir}" | ||
|
||
if [[ "${OS}" == "windows" ]]; then | ||
# N.B. Windows sha256sum is sensitive to trailing \r in files. |
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.
Hrm, my bug:
lift/science/commands/build.py
Line 81 in bf8edd1
checksum_file.write_text(f"{digest.hexdigest()} *{dst_binary_name}{os.linesep}") |
2 bugs really, using
\r\n
when science is run on Windows, and using the host OS linesep for a shasum file for a potentially foreign scie. Afaict after some brief research, shasum files are not a thing in Windows; so I can just always use a \n
linesep.
Your fix needs to remain to handle old releases. but I'll fix that.
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.
Fixed in #92
Thanks for wading through this Kris.
Absolutely - simpler. I was forced to pwsh 2 years ago when getting scie-jump green in CI. I'm not sure what is different this much time passed. |
install.sh
utility.README.md
to use the new installer.OSX install example: