build: run unit tests on osx, ensure proto output included (#4081)

This adds back functionality that was accidentally dropped when
porting from travis:
- make sure generating protos will not lead to any uncomitted changes
- actually run the unit tests
This commit is contained in:
zpencer 2018-02-14 16:44:02 -08:00 committed by GitHub
parent 8c51683af1
commit a45d07bcb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -50,8 +50,17 @@ export LD_LIBRARY_PATH=/tmp/protobuf/lib
export LDFLAGS=-L/tmp/protobuf/lib
export CXXFLAGS="-I/tmp/protobuf/include"
# Run tests
# Ensure all *.proto changes include *.java generated code
./gradlew assemble generateTestProto install $GRADLE_FLAGS
if [[ -z "${SKIP_CLEAN_CHECK:-}" && ! -z $(git status --porcelain) ]]; then
git status
echo "Error Working directory is not clean. Forget to commit generated files?"
exit 1
fi
# Run tests
./gradlew build
pushd examples
./gradlew build $GRADLE_FLAGS
# --batch-mode reduces log spam