Skip to content

Commit

Permalink
Set FAIL_ON_WARNINGS in .travis.sh
Browse files Browse the repository at this point in the history
When building pull request
  • Loading branch information
ledvinap committed Jun 2, 2016
1 parent a540f91 commit 1f50f91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 7 additions & 2 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ CURL_PUB_BASEOPTS=(
"--form" "github_repo=${TRAVIS_REPO_SLUG}"
"--form" "build_name=${BUILDNAME}" )

# pass FAIL_ON_WARNINGS when building Pull Request
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
OPTIONS="FAIL_ON_WARNINGS"
fi

# A hacky way of running the unit tests at the same time as the normal builds.
if [ $RUNTESTS ] ; then
cd ./src/test && make test
cd ./src/test && make test OPTIONS="$OPTIONS"

# A hacky way of building the docs at the same time as the normal builds.
elif [ $PUBLISHDOCS ] ; then
Expand Down Expand Up @@ -64,6 +69,6 @@ else
curl -k "${CURL_BASEOPTS[@]}" "${CURL_PUB_BASEOPTS[@]}" --form "file=@${TARGET_FILE}" ${PUBLISH_URL} || true
exit 0;
else
make -j2
make -j2 OPTIONS="$OPTIONS"
fi
fi
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ SERIAL_DEVICE ?= $(firstword $(wildcard /dev/ttyUSB*) no-port-found)
# Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override.
FLASH_SIZE ?=


# Detect travis Pull Request build
ifeq ($(TRAVIS),true) # travis build
ifneq ($(TRAVIS_PULL_REQUEST), false) # building pull request
OPTIONS += FAIL_ON_WARNINGS # do not allow pull requests with warnings
endif
endif

###############################################################################
# Things that need to be maintained as the source changes
#
Expand Down

0 comments on commit 1f50f91

Please sign in to comment.