forked from census-instrumentation/opencensus-cpp
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
46 lines (40 loc) · 1.61 KB
/
.travis.yml
File metadata and controls
46 lines (40 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: cpp
matrix:
include:
- os: linux
dist: trusty
sudo: false
env: BAZEL_OS=linux
- os: osx
env: BAZEL_OS=darwin
compiler: clang
# - Limit memory.
# - Enable thread safety analysis (only works with clang).
env: BAZEL_OPTIONS="--local_resources=4096,2,1.0 --copt=-Werror=thread-safety"
cache:
directories:
- $HOME/bazel-cache
- $HOME/gopath/bin
before_install:
# Install buildifier if it's not present. It needs at least go 1.8.
# Skip format on OS X: it doesn't have clang-format by default, and has a different sed.
- if \[ "$TRAVIS_OS_NAME" == "linux" \]; then
if ! which buildifier >/dev/null; then
eval "$(gimme 1.11)";
go get -v github.com/bazelbuild/buildtools/buildifier;
fi;
tools/format.sh;
fi
- wget https://github.com/bazelbuild/bazel/releases/download/0.17.1/bazel-0.17.1-installer-${BAZEL_OS}-x86_64.sh
- chmod +x bazel-0.17.1-installer-${BAZEL_OS}-x86_64.sh
- ./bazel-0.17.1-installer-${BAZEL_OS}-x86_64.sh --user
- echo "build --disk_cache=$HOME/bazel-cache" > ~/.bazelrc
- echo "build --experimental_strict_action_env" >> ~/.bazelrc
script:
# Limit the amount of progress output. We can't use --noshow_progress because
# Travis terminates the build after 10 mins without output.
- bazel build $BAZEL_OPTIONS --experimental_ui_actions_shown=1 -k $(bazel query "kind(rule, //...)" | grep -v :_)
- bazel test $BAZEL_OPTIONS --experimental_ui_actions_shown=1 -k $(bazel query "kind(test, //...) except attr('tags', 'manual|noci', //...)" | grep -v :_)
before_cache:
# Before uploading cache.
- du -sk $HOME/bazel-cache