Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Travis run for CMake test and lint.sh #769

Merged
merged 17 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
- |
Expand All @@ -31,6 +33,7 @@ script:
- "! git grep -I ' $' ':(exclude)Firestore/Protos/nanopb'"
- "! git grep -EL --name-only 'Copyright [0-9]{4}.*Google' | grep -v third_party | egrep '\\.(m|h|cc|mm|c)$'"
- ./scripts/style.sh test-only # Validate clang-format compliance
- ./scripts/lint.sh # Google C++ style compliance
- |
if [ $SKIP_FIREBASE != 1 ]; then
./test.sh
Expand Down
22 changes: 21 additions & 1 deletion Firestore/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ test_iOS() {
| xcpretty
}

test_CMake() {
echo "set cmake build" && \
mkdir build && \
cd build && \
cmake .. || \
exit 1

echo "initial cmake build" && \
make -j 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"
Expand All @@ -46,4 +62,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