Skip to content

Commit

Permalink
build: update Travis CI to run a presubmit script
Browse files Browse the repository at this point in the history
  • Loading branch information
jayconrod committed Mar 11, 2017
1 parent f3fbb64 commit 2d31bd8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 15 deletions.
16 changes: 1 addition & 15 deletions .travis.yml
Expand Up @@ -21,21 +21,7 @@ before_install:
rm -f install.sh
script:
- |
bazel \
--output_base=$HOME/.cache/bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
--verbose_failures \
--sandbox_debug \
--test_output=errors \
--test_strategy=standalone \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--local_resources=400,1,1.0 \
//...
- ./presubmit.sh

notifications:
email: false
41 changes: 41 additions & 0 deletions presubmit.sh
@@ -0,0 +1,41 @@
#!/bin/bash

set -euxo pipefail

echo ">>> Running all Bazel tests"
bazel \
--output_base=$HOME/.cache/bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
--verbose_failures \
--sandbox_debug \
--test_output=errors \
--test_strategy=standalone \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--local_resources=400,1,1.0 \
//...


echo ">>> Running all examples"
for label in $(bazel query //examples:all); do
bazel \
--output_base=$HOME/.cache/bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
run \
--verbose_failures \
--sandbox_debug \
--test_output=errors \
--test_strategy=standalone \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--local_resources=400,1,1.0 \
"$label"
done


echo ">>> All presubmit tests passed."

0 comments on commit 2d31bd8

Please sign in to comment.