Skip to content

Commit 327ddb7

Browse files
pdillingerfacebook-github-bot
authored andcommitted
Travis: fail fast on install failures (#7239)
Summary: A recent build continued with confusing results after failing to "snap install cmake" so ensure failures in installs are fatal. Also upgrade snapd before "snap install" to hopefully avoid this error: error: cannot perform the following tasks: - Mount snap "cmake" (513) (snap "cmake" assumes unsupported features: command-chain (try to update snapd and refresh the core snap)) Pull Request resolved: #7239 Test Plan: watch Travis Reviewed By: akankshamahajan15 Differential Revision: D23244110 Pulled By: pdillinger fbshipit-source-id: 33dbf145f6999d0b90576cdfde484f15c5d1ac19
1 parent 3e422ce commit 327ddb7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,33 +224,33 @@ install:
224224
PATH=$PATH:/usr/local/opt/ccache/libexec;
225225
fi
226226
- if [ "${JOB_NAME}" == cmake-gcc8 ]; then
227-
sudo apt-get install -y g++-8;
227+
sudo apt-get install -y g++-8 || exit $?;
228228
CC=gcc-8 && CXX=g++-8;
229229
fi
230230
- if [ "${JOB_NAME}" == cmake-gcc9 ] || [ "${JOB_NAME}" == cmake-gcc9-c++20 ]; then
231-
sudo apt-get install -y g++-9;
231+
sudo apt-get install -y g++-9 || exit $?;
232232
CC=gcc-9 && CXX=g++-9;
233233
fi
234234
- if [ "${JOB_NAME}" == cmake-mingw ]; then
235-
sudo apt-get install -y mingw-w64 ;
235+
sudo apt-get install -y mingw-w64 || exit $?;
236236
fi
237237
- if [ "${JOB_NAME}" == make-gcc4.8 ]; then
238-
sudo apt-get install -y g++-4.8 ;
238+
sudo apt-get install -y g++-4.8 || exit $?;
239239
CC=gcc-4.8 && CXX=g++-4.8;
240240
fi
241241
- if [[ "${JOB_NAME}" == cmake* ]] && [ "${TRAVIS_OS_NAME}" == linux ]; then
242-
sudo snap install cmake --beta --classic;
242+
sudo apt-get install snapd && sudo snap install cmake --beta --classic || exit $?;
243243
export PATH=/snap/bin:$PATH;
244244
fi
245245
- |
246246
if [[ "${JOB_NAME}" == java_test || "${JOB_NAME}" == cmake* ]]; then
247247
# Ensure JDK 8
248248
if [ "${TRAVIS_OS_NAME}" == osx ]; then
249-
brew tap AdoptOpenJDK/openjdk
250-
brew cask install adoptopenjdk8
249+
brew tap AdoptOpenJDK/openjdk || exit $?
250+
brew cask install adoptopenjdk8 || exit $?
251251
export JAVA_HOME=$(/usr/libexec/java_home)
252252
else
253-
sudo apt-get install -y openjdk-8-jdk
253+
sudo apt-get install -y openjdk-8-jdk || exit $?
254254
export PATH=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin:$PATH
255255
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
256256
fi

0 commit comments

Comments
 (0)