Skip to content

Commit

Permalink
Use Travis .bazelrc
Browse files Browse the repository at this point in the history
  • Loading branch information
regisd committed Sep 30, 2018
1 parent 744e65f commit 7741987
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
17 changes: 17 additions & 0 deletions jflex/examples/.travis.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Taken from https://github.com/korfuri/bazel-travis/blob/master/.bazelrc

# This is from Bazel's former travis setup, to avoid blowing up the RAM usage.
startup --host_jvm_args=-Xms2000m
startup --host_jvm_args=-Xmx3000m
test --ram_utilization_factor=10

# This is so we understand failures better
build --verbose_failures
test --test_output=errors

# This is so we don't use sandboxed execution. Sandboxed execution
# runs stuff in a container, and since Travis already runs its script
# in a container (unless you require sudo in your .travis.yml) this
# fails to run tests.
# build --spawn_strategy=standalone --genrule_strategy=standalone
# test --test_strategy=standalone
12 changes: 9 additions & 3 deletions scripts/bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ source "$BASEDIR"/scripts/logger.sh
# fail on error
set -e

if [[ $TRAVIS ]]; then
BAZEL='bazel --bazelrc=$TRAVIS_BUILD_DIR/.travis.bazelrc'
else
BAZEL='bazel'
fi

logi "Start Bazel"
logi "==========="
cd jflex/examples
bazel start
$BAZEL start

logi "Build everything"
bazel build //...
$BAZEL build //...

logi "Test everything"
logi "==============="
bazel test //..
$BAZEL test //..

cd "$CWD"

0 comments on commit 7741987

Please sign in to comment.