grl
grl copied to clipboard
Automated release creation + binary install w/ homebrew / linuxbrew bottles
Homebrew may be a good way to create automated install/releases with packaging. There are several possible approaches that might be taken based on existing available utilities used by various projects. Homebrew "bottles" are pre-builts binaries which can be downloaded and installed in an automated fashion without recompiling.
Homebrew based approaches
Homebrew style implementation
Comments have also been made on homebrew itself for information. https://github.com/Homebrew/homebrew-core/pull/9392#issuecomment-276893901
There's no specific document but the brew test-bot --help command will give you more information and the source is here: https://github.com/homebrew/homebrew-test-bot
One key will be to retain a separate clone of homebrew release versions that work based on exact known working commit hashes, so it is possible to return to exact working releases if the homebrew, brew, or homebrew-core "master" branch breaks dependencies.
Homebrew and equivalently Linuxbrew uses bintray to host their bottles.
OSRF style implementation
Open Source Robotics Foundation (OSRF) has created automated scripts that work for these purposes as described in https://github.com/osrf/homebrew-simulation/issues/214.
Here is where their scripts are: https://bitbucket.org/osrf/release-tools/src/38c341b34146e73c15101931dbff604341078622/jenkins-scripts/?at=default
Adapting for travis-ci + github release page
OSRF uses jenkins. However, I believe it might be possible to do the same with travis-ci + github release tags and binary uploads.
Example Release tags: https://github.com/ahundt/grl/releases
travis-ci release upload assistance tool: https://github.com/travis-ci/artifacts
releases document: https://docs.travis-ci.com/user/deployment/releases/
Homebrew Design considerations
Linuxbrew (and homebrew) is great for getting up to date versions of packages for everything from the lowest level gcc package all the way up to your own code. However, homebrew/linxbrew update the versions so frequently that if you use their master branch directly people may update libraries you depend on leading to an obscure breaking change. However, by forking the project, git tagging and installing only specific known working versions it should be viable to be able to install in exactly the same way every time.
There is also the side effect that linuxbrew sometimes builds and installs /usr/local versions of its libraries that are included with the OS, so it will be important to manage which ones are loaded and used. For example you can use linuxbrew to install gcc, cmake, qt, nearly anything. However, mixing and matching without knowing exactly what is using which dependency can lead to conflicts so it is important to be aware of this. Some of these issues may have also been resolved or improved over the last year.
Docker Option
Docker is a totally different option/approach.
Docker can be used for many of these things as well and is easier to use. However, one key failing point is that it isn't designed to be used for GUI software. Some very sketchy hacks exist but these barely work so I'm not sure it is the right approach.
Debian option
This would be a linux only option, but it should be possible to create debian based installs and such, and create ppas. CMake has some support for this but I'm not familiar and would need to do more research. Libraries like https://github.com/jrl-umi3218/Tasks do provide these so their approach may be a possible reference.