diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-10 16:12:10 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-10 16:45:50 +0000 |
commit | 0b7e29e0197f18ea38a62f8f89a1fe60edb462a0 (patch) | |
tree | 943cc7911b8e975dbc4d56a045425571518c08b4 /.travis | |
parent | abc17b0f8997ab07ae66130edd5dc8c43e72c886 (diff) |
Add the bazel build as one of the PR-blocking builds.
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/bazel-linux | 25 |
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 | |||
3 | ACTION="$1" | ||
4 | |||
5 | set -eu | ||
6 | |||
7 | travis_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 | |||
16 | travis_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 | |||
21 | if [ "-z" "$ACTION" ]; then | ||
22 | "travis_script" | ||
23 | else | ||
24 | "travis_$ACTION" | ||
25 | fi | ||