aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rwxr-xr-xFirestore/test.sh23
2 files changed, 28 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 2f8f497..042fab1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,8 @@ before_install:
- bundle exec pod install --project-directory=Example --repo-update
- bundle exec pod install --project-directory=Firestore/Example --no-repo-update
- brew install clang-format
+ - brew install cmake
+ - brew install go # Somehow the build for Abseil requires this.
- echo "$TRAVIS_COMMIT_RANGE"
- echo "$TRAVIS_PULL_REQUEST"
- |
@@ -37,6 +39,10 @@ script:
fi
- |
if [ $SKIP_FIRESTORE != 1 ]; then
+ ./scripts/lint.sh # Google C++ style compliance
+ fi
+ - |
+ if [ $SKIP_FIRESTORE != 1 ]; then
./Firestore/test.sh
fi
diff --git a/Firestore/test.sh b/Firestore/test.sh
index 7e26e3f..b211f46 100755
--- a/Firestore/test.sh
+++ b/Firestore/test.sh
@@ -38,6 +38,23 @@ test_iOS() {
| xcpretty
}
+test_CMake() {
+ echo "cpu core: $(sysctl -n hw.ncpu)"
+ echo "set cmake build" && \
+ mkdir build && \
+ cd build && \
+ cmake .. || \
+ exit 1
+
+ echo "initial cmake build" && \
+ make -j $(sysctl -n hw.ncpu) all || \
+ exit 2
+
+ echo "test Firestore cmake build" && \
+ cd Firestore && \
+ make test
+}
+
test_iOS; RESULT=$?
if [[ $RESULT == 65 ]]; then
echo "xcodebuild exited with 65, retrying"
@@ -46,4 +63,8 @@ if [[ $RESULT == 65 ]]; then
test_iOS; RESULT=$?
fi
-exit $RESULT
+if [ $RESULT != 0 ]; then exit $RESULT; fi
+
+test_CMake; RESULT=$?
+
+if [ $RESULT != 0 ]; then exit $RESULT; fi