-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Travis CI using Bazel #29
Comments
Technically this is already the case, because of simple execution calls. I would rename this issue to be more about patching travis-ci to support bazel projects with sane defaults, and less shell-script magic. All the hooks are already there in a .travis.yml file to do all the needed setup in a pinch. So... steps would be:
|
I have set up a working demo at https://github.com/korfuri/bazel-travis It is not optimal at all for a few reasons:
Nevertheless, it works, feel free to use it as an example for your own projects. |
Thank you korfuri! |
Although this issue is closed, I would add that using a custom CROSSTOOL is no longer necessary for travis. Instead, select the "trusty beta" image in the dist: trusty
sudo: required
os:
- linux As this has gcc4.8, zip, and jdk8, no longer need to specify oraclejdk8 or addons. That's it! https://github.com/pubref/rules_protobuf/blob/master/.travis.yml |
I've set up a Travis CI build using Bazel binary packages, though it requires manually installing Oracle 8 JDK since Bazel is incompatible with Travis CI's Oracle 8 JDK package. See more details, including a complete config, in issue #1821. For an even better experience, we would need to get Bazel repo whitelisted for Travis CI (see |
Just wanted to add that the three alternatives look very different and maybe a blog post reviewing the three and explaining pros/cons could help noobs. I ended up using @korfuri's suggestion for a small getting-started repo |
FYI: rules_protobuf, rules_go, and rules_closure all have working examples of Travis that build on both Linux and OSX. |
I didn't mean to suggest any of the alternatives don't work but rather that they differ and so a blog post by someone (maybe the bazel team) could be great for noobs. |
- Setting this variable to a truthy value is equivalent to setting the use_local_mono=True. This is useful for CI when you don't want to have to check in the value of the flag to version control.
Allow creating projects on Travis which use Bazel to build.
The text was updated successfully, but these errors were encountered: