-
Notifications
You must be signed in to change notification settings - Fork 37
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
Consider distributing prebuilt static libs #13
Comments
I would be willing to help on this front. What are you looking for exactly? Travis, CircleCI, etc...which 3 platforms? |
Could be any CI. I'd like to have the build.go file run successfully for 64bit versions of linux, windows, and macos and have the artifacts reachable. In the future, I'd like those static artifacts to be bundled into a download archive by themselves (but same dir structure). I'd be happy just putting that bundle in the releases area when I tag. I have considered having the script also fetch last dependencies from their respective repos, but there's human intervention required anyways so submodules are fine. Oh, and probably just a quick sanity test for each platform maybe using Bine just to confirm successful compile, but that's future too. |
Sounds good, let me lay out a basic structure and run it by you. I'm more familiar and prefer travis so that is what I'll be using, but that can be changed later if necessary. I can set up the automated GitHub releases as well. At first, I'll set Regarding confirming if the artifacts are reachable, I may ping you regarding commands you use now for testing, etc. |
Thanks! Yeah, I don't really test much beyond a couple of examples in https://github.com/cretz/bine/tree/master/examples and https://github.com/cretz/bine/tree/master/process/embedded/tor-0.3.5/embeddedtest. I think an integration test that does what https://github.com/cretz/bine/blob/master/tests/tor_dialer_test.go does but with embedded would be ideal. The way I planned on doing releases henceforth was a branch for a Tor version, a PR, and then a merge-master, then a tagged release. |
I understand now. I could write something simple to test the service after the fact. Do you mind if I play with docker and docker-compose for building as well or would you like to exclude docker? Would be more for internal testing. We can fine tune the branch names and releases later on once we have the builds somewhat working. Also, feel free to peek at what I am working on: https://github.com/ciehanski/tor-static/blob/integrate-ci/.travis.yml |
Ideally docker wouldn't be needed, but I'm open to whatever. The build is pretty much straightforward, if the prereqs are followed, this repo is recursively git clone'd, and For anything like bundling those artifacts in the future, I would like to put the code as a command in build.go instead of in travis's yml file or shell scripts. That yml looks quite perfect/clean so far. |
Makes sense, I only mentioned it because I'm on macos and use go modules mostly so my gopath was funky when trying to build locally, no worries though. As per showing the libs, I think your way of thinking is valid and I like that method. So far, everything is building fine in osx and linux(xenial). Still working on the msys2 shell/retries for windows builds. Where can I find the exact files you would like pushed to releases? |
Awesome. Yeah, the Windows shell reloads are annoying, maybe there are better ways or it's not needed but the tutorials I've seen suggest to keep re-running until no longer asked. I want exactly the libs needed to satisfy a static build. So literally what is linked as a result of show-libs. All the files listed at https://github.com/cretz/bine/blob/master/process/embedded/tor-0.3.5/process.go, but we want them in their same directory structure (so the difference between using this artifact-only archive and building from scratch has the same layout). That's why I mentioned the show-libs part, because you can see in the build.go code where I have them as a multidimensional array of dir name then array of file names. Ideally in build.go some of that show-lib code wuld be factored out to just return that lib set, then it would have a new "package-artifacts" or some such command that instead of just dumping it to screen instead built both a zip and tarball out of it. But all of that can be a future step. |
Sounds good thanks for explaining again, this is a new area for my so my apologies. I'll see what I can come up with. |
Just a heads up, I believe my first PR will not include windows, unfortunately. The windows build fails too frequently to rely upon, from travis' side of things considering Windows support is still experimental. Hopefully this will be acceptable at first and we can add it in later. |
Sure. Also, I am quite adept at Windows, so I would be willing to help you work through bugs there. You'll note at https://github.com/torproject/tor/blob/master/.travis.yml they don't even include Windows which is one of the reasons I think this project is so valuable. So yes, feel free to PR without it or let me know your issues and maybe we can work through em. I did note you have an |
Ok, see the referenced commit above (edit: and below) this comment. There is a "package-libs" command for build.go now that will create |
That looks fantastic! I have implemented the
You can view my tests here. |
Where is |
I see you have issues with Travis CI for building on Windows. I have a bitbucket.org academic plan account, maybe I can write a configuration for bitbucket pipelines which builds inside docker images, the hard part would be to write the configuration for pipelines. I can make a mirror of this repo and if someone can help me with the configuration of the pipelines we can produce and serve those artifacts on my mirror. I discovered bine a couple of days ago and it's great! I want to build a tor hidden service which will run on a raspberry pi on my home's local network and will expose an authenticated interface for switching on my PC with WOL (Wake On LAN) packets, so I can then connect with ssh through tor to my home's PC. |
I ended up getting it working with AppVeyor. I am a bit busy, but I will be testing this issue (static-lib distribution) hopefully soon. |
In my case the problem was, that I was using go modules. |
Any update on this? GH actions exist now as well, so building wouldn't even require much in the "infrastructure" department anymore. |
Agreed, GH actions would be just fine for this and the workflow yaml is fairly easy to write. I am afraid I don't really work on this library much anymore so I don't know if/when I'd be able to get to this. |
I'll give it a go then! :) Going for Linux builds first. Is there a specific Go version you want to build at? |
Nope. Probably oldest non-EOL which I think is 1.17. |
Would need CI infrastructure, don't want to do this for all 3 platforms myself.
The text was updated successfully, but these errors were encountered: