Skip to content

Commit 9825070

Browse files
committed
Fix error handling on Travis-CI
- Add back `set -o errexit` so that Travis-CI will detect errors
1 parent 9f2926a commit 9825070

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ before_install:
9595
- export CXX=g++-${GCC}
9696
- export MPICH_BOT_URL_HEAD=MPICH_GCC${GCC}_BOT_URL_HEAD
9797
- |
98+
set -o errexit
9899
if [[ (-n ${TRAVIS_TAG}) && (${TRAVIS_OS_NAME} == osx) ]] && ${TRAVIS_SECURE_ENV_VARS} ; then
99100
brew update > /dev/null
100101
[[ "$(brew ls --versions gpg2)" ]] || brew install gpg2
@@ -111,7 +112,9 @@ before_install:
111112
curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import
112113
git tag -v ${TRAVIS_TAG}
113114
fi
115+
set +o errexit
114116
- |
117+
set -o errexit
115118
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
116119
export PATH="${PATH}:${HOME}/Library/Python/2.7/bin"
117120
else
@@ -122,9 +125,11 @@ before_install:
122125
${CC} --version
123126
${CXX} --version
124127
fi
128+
set +o errexit
125129
126130
install:
127131
- |
132+
set -o errexit
128133
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
129134
brew update > /dev/null
130135
@@ -170,9 +175,11 @@ install:
170175
mpicc --version
171176
cmake --version
172177
fi
178+
set +o errexit
173179
174180
script:
175181
- |
182+
set -o errexit
176183
if [[ ${BUILD_TYPE} == InstallScript ]]; then
177184
./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
178185
cd prerequisites/builds/opencoarrays/*
@@ -191,15 +198,18 @@ script:
191198
cd ..
192199
done
193200
fi
201+
set +o errexit
194202
195203
after_script:
196204
- |
205+
set -o errexit
197206
if [[ "${TRAVIS_TAG}" ]]; then
198207
if [[ "v${TRAVIS_TAG}" != "v$(sed -n 's/\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)/\1/p' .VERSION)" ]]; then
199208
echo "ERROR: You are trying to tag a new release but have a version missmatch in \`.VERSION\`"
200209
false # throw an error
201210
fi
202211
fi
212+
set +o errexit
203213
204214
after_success:
205215
- find . -name '*.gcno' -print

0 commit comments

Comments
 (0)