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

Provide an easy way to install just on github actions for linux, mac & windows #943

Closed
soenkehahn opened this issue Aug 9, 2021 · 2 comments · Fixed by #944
Closed

Provide an easy way to install just on github actions for linux, mac & windows #943

soenkehahn opened this issue Aug 9, 2021 · 2 comments · Fixed by #944

Comments

@soenkehahn
Copy link
Contributor

It would be nice if there was an easy and documented way to install just into the environment that is used on github actions for all three platforms, linux, mac and windows (in alphabetical order). For linux apt-get install --yes just works, for mac brew install just works, but for windows there's no easy way to install it that works on github actions. At least none that I could figure out. just is packaged for scoop, but that is not installed on github CI. And the install script from https://just.systems/install.sh does not work.

Motivation: I think it's nice to organize your CI targets in a justfile and then run them through just on CI. One big advantage of that is that it allows you to easily run whatever will be run on CI locally, without having to manually keep a CI script and a justfile in sync. And -- through using separate recipes -- this works both for the entire CI script, but also for parts. You could e.g. have a just test, just lints & just formatting-check. On CI they're all run, and locally you can also run them all (through e.g. just all), but locally during development you can also run only parts, e.g. just test. And for all recipes you're guaranteed to get whatever is running on CI. (Here's an example of such a justfile: https://github.com/soenkehahn/cradle/blob/52bbee878c1b803d089ae0912329a2b46b37a2c9/justfile)

Possible solutions:

  • Get github to include just in their environments.
  • Get github to install scoop in their environments. And then have a bash snippet that installs just using apt, brew or scoop (in alphabetical order) depending on the OS.
  • Provide a github action that installs just. Users could then e.g. just say - use: casey/install-just. (Not sure how this works exactly, but it can be done: https://docs.github.com/en/actions/creating-actions)
  • Fix the install script on https://just.systems/install.sh. And document an easy one-liner that works on all platforms. (Currently the documented version is curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to DEST, which requires users to pick a DEST. That would be platform dependent, which will then turn this from a one-liner into a longer snippet. So it'd be good if this worked without providing a DEST argument.)
@casey
Copy link
Owner

casey commented Aug 9, 2021

I just remembered that someone did write a GitHub action for this:

https://github.com/extractions/setup-just

I'm not sure if it works on Windows though, but if it doesn't, then adding windows support to it would probably be the easiest way forward.

@soenkehahn
Copy link
Contributor Author

Yes, https://github.com/extractions/setup-just seems to work on all platforms. Great! I think it'd be good to include this or a pointer to this in the 'Installation' section of just's readme. I'm leaving this issue open in case you want to do that. Feel free to close, though.

@casey casey linked a pull request Aug 10, 2021 that will close this issue
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 a pull request may close this issue.

2 participants