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

Installing roswell for CI on Windows #374

Closed
iamFIREcracker opened this issue May 19, 2019 · 8 comments

Comments

@iamFIREcracker
Copy link

@iamFIREcracker iamFIREcracker commented May 19, 2019

I was doing some experiments with roswell on travis-ci lately, and noticed that the default install-for-ci.sh script works quite nicely on Windows too (after you installed pre-compiled binaries; ros will be found somewhere on $PATH, and the script will then jump to the setup phase skipping the install/compile one).

Anyway, is there appetite for enhancing the script to support Windows? If so I could try and put together a PR; for now, I wrapped that logic into another script (that you can find here), and as you can see it's really simple:

  • Check for /tmp/roswell to be in $PATH
  • Download/unpack pre-compiled binaries
  • Delegate to install-for-ci.sh

Now, I am not 100% sold on step 1 above, but honestly I could not come up with a way to update $PATH for the current process (so ros could be set up), and for subsequent ones (i.e. CI build steps).

@snmsts

This comment has been minimized.

Copy link
Member

@snmsts snmsts commented May 19, 2019

Great work.
Are there ci service which you can use the script with?

@iamFIREcracker

This comment has been minimized.

Copy link
Author

@iamFIREcracker iamFIREcracker commented May 20, 2019

I only tested it with travis-ci, but I don't see why it shouldn't work with other services. If any of you guys is using a different system and is willing to help out, please give it a go, here you can find the travis-ci configuration I used to pre-compile (Linux, macOS, and Windows) a CL command line application I recently wrote -- most important bits:

  • Windows-only: add /tmp/roswell to $PATH
  • curl -L https://gist.githubusercontent.com/iamFIREcracker/3564db5a24e296e087da49513d6cd00c/raw/4e356d00a98bb09c73c131c8c9db9f6fbd1cf018/roswell-install-for-ci.sh | sh

And that's it, ros should now be available for you to use (i.e. make binary-ros in my case)!

@snmsts

This comment has been minimized.

Copy link
Member

@snmsts snmsts commented May 21, 2019

Ok I'll manage to merge your experiment. in a few days thanks.

@snmsts

This comment has been minimized.

Copy link
Member

@snmsts snmsts commented May 27, 2019

https://github.com/roswell/travis-windows I'm testing... not finished.

snmsts added a commit that referenced this issue Jun 1, 2019
@snmsts

This comment has been minimized.

Copy link
Member

@snmsts snmsts commented Jun 1, 2019

I think you don't need your hack anymore.

@iamFIREcracker

This comment has been minimized.

Copy link
Author

@iamFIREcracker iamFIREcracker commented Jun 3, 2019

I see you:

  • Removed the guard to check that /tmp/roswell was listed in $PATH
  • Moved the unzipped binaries inside ~/.roswell/bin

Does it mean we don't have to add /tmp/roswell (or ~/.roswell/bin) to $PATH anymore? If not the case, don't you think it's better to make the script fail early, with a controlled message? (e.g. /tmp/roswell not found in $PATH)

Thanks for taking the time to look into this.

@snmsts

This comment has been minimized.

Copy link
Member

@snmsts snmsts commented Jun 4, 2019

would be ok to set /usr/bin for ci?

@snmsts

This comment has been minimized.

Copy link
Member

@snmsts snmsts commented Jun 5, 2019

anyway now I'm using windows on this repo.
https://travis-ci.org/roswell/roswell/jobs/541115985
Thank you!

@snmsts snmsts closed this Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.