diff options
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 | ||