Golang cross compile on Heroku.
Just request GitHub repository name, you can get compiled binary for your platform without golang runtime on your local PC. Currently request target repository must be
go build-able. Support platform is Darwin/Linux/Windows, 386/amd64.
This is just POC and playing with Heroku with Docker. Don't depend on this service for production tooling, you should prepare your own build environment. And if repository owner provides binary as release, you should use it.
Demo application is hosted on https://gox-server.herokuapp.com/.
For example, to get github.com/Soulou/curl-unix-socket compiled binary,
$ curl -A "`uname -sp`" https://gox-server.herokuapp.com/Soulou/curl-unix-socket > curl-unix-socket $ chmod a+x curl-unix-socket
Or access from your browser https://gox-server.herokuapp.com/Soulou/curl-unix-socket.
To get binary hosted on github.com/owner/repo,
$ curl -A "`uname -sp`" https://gox-server.herokuapp.com/owner/repo
To create binary
gox-server just runs
go build, so github.com/owner/repo need to be able to run
go build. If it needs some extra build or command (e.g.,
make), you can not get binary.
You can run this on local dev environment. You need to prepare
docker and heroku docker plugin.
$ heroku docker:start
You can create your own compile server on Heroku. After create account on Heroku, run below,
$ heroku create $ herocku docker:release
- Fork (https://github.com/tcnksm/gox-server/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
make testcommand and confirm that it passes
- Create new Pull Request