summaryrefslogtreecommitdiff
path: root/.travis
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-10 16:12:10 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-10 16:45:50 +0000
commit0b7e29e0197f18ea38a62f8f89a1fe60edb462a0 (patch)
tree943cc7911b8e975dbc4d56a045425571518c08b4 /.travis
parentabc17b0f8997ab07ae66130edd5dc8c43e72c886 (diff)
Add the bazel build as one of the PR-blocking builds.
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/bazel-linux25
1 files changed, 25 insertions, 0 deletions
diff --git a/.travis/bazel-linux b/.travis/bazel-linux
new file mode 100755
index 00000000..5caf2a72
--- /dev/null
+++ b/.travis/bazel-linux
@@ -0,0 +1,25 @@
1#!/bin/sh
2
3ACTION="$1"
4
5set -eu
6
7travis_install() {
8 # Get bazel.
9 wget https://github.com/bazelbuild/bazel/releases/download/0.15.0/bazel-0.15.0-installer-linux-x86_64.sh
10 chmod +x bazel-0.15.0-installer-linux-x86_64.sh
11 ./bazel-0.15.0-installer-linux-x86_64.sh --user
12 echo 'build --jobs=4 --curses=no --verbose_failures' >> $HOME/.bazelrc
13 echo "import %workspace%/tools/bazelrc/linux-$CC" >> $HOME/.bazelrc
14}
15
16travis_script() {
17 # Run the tests, but if they fail, at least we should be able to build.
18 bazel test //c-toxcore/... || bazel build //c-toxcore/...
19}
20
21if [ "-z" "$ACTION" ]; then
22 "travis_script"
23else
24 "travis_$ACTION"
25fi