Care about cmake exit code during build by Travis CI.
authorMikhail Kurinnoi <viewizard@viewizard.com>
Tue, 27 Oct 2020 13:47:20 +0000 (06:47 -0700)
committerAlexander Soldatov/Platform Lab /SRR/Staff Engineer/Samsung Electronics <soldatov.a@samsung.com>
Wed, 28 Oct 2020 11:36:13 +0000 (14:36 +0300)
Note, we can't use `set -e` here, since build may stop unexpectedly because of benign non-zero status in internal travis scripts (see https://github.com/travis-ci/docs-travis-ci-com/issues/1672).

.travis.yml

index bb312ef2f1565427e45327fbcd8e71a609d7d147..da84606d1f66e7d4bdac245518b4cc44f30ccc10 100644 (file)
@@ -36,9 +36,9 @@ env:
   - RELEASE_BRANCH=master
 
 script:
+  - eval "${MATRIX_EVAL}"
+  - mkdir build && cd build
   - |
-      eval "${MATRIX_EVAL}"
-      mkdir build && cd build
       if [ ${TRAVIS_OS_NAME} = 'windows' ]; then
         powershell -Command "Set-ExecutionPolicy Unrestricted"
         cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=$PWD/../bin
@@ -47,7 +47,7 @@ script:
         cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../bin
         cmake --build . --target install
       fi
-      cd ..
+  - cd ..
 
 before_deploy:
   - |
@@ -66,7 +66,7 @@ before_deploy:
         if [ ${TRAVIS_OS_NAME} = 'windows' ]; then
           7z a netcoredbg-win64.zip netcoredbg
         elif [ ${TRAVIS_OS_NAME} = 'linux' ]; then
-          tar cfz netcoredbg-${TRAVIS_OS_NAME}-${TRAVIS_DIST}.tar.gz ./netcoredbg/*
+          tar cfz netcoredbg-${TRAVIS_OS_NAME}-${TRAVIS_DIST}-${TRAVIS_CPU_ARCH}.tar.gz ./netcoredbg/*
         else
           tar cfz netcoredbg-${TRAVIS_OS_NAME}.tar.gz ./netcoredbg/*
         fi