From 3527babfee7471ce6985f891172ab170b9b3c870 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Fri, 27 Sep 2013 12:22:44 -0700 Subject: [PATCH] chore(travis): use consistent build name - have build name is in the form of "__(_TC)?" to have consistency over time. - have "Generator" field in cdash XMLs which is in the form of "###" it will be displayed as a small mouseover-text. --- .travis.osx.yml | 11 +++++++++-- .travis.windows.yml | 9 ++++++++- .travis.yml | 11 +++++++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.travis.osx.yml b/.travis.osx.yml index 78f61f02c..7c4aaed0a 100644 --- a/.travis.osx.yml +++ b/.travis.osx.yml @@ -23,13 +23,15 @@ before_script: script: - cd build - SITE=OSX10.8.2@Travis -- GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1` - if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then BUILD_TYPE=Release; else BUILD_TYPE=Debug; fi -- BUILD_NAME=${TRAVIS_BRANCH}_${GIT_COMMIT}_g++-4.9.0_${BUILD_TYPE} +- BUILD_NAME=${TRAVIS_BRANCH}_g++-4.9.0_${BUILD_TYPE} +- if [[ $TCMALLOC == ON ]]; then + BUILD_NAME=${BUILD_NAME}_TC; + fi; - CONFIG_FILE=DartConfiguration.tcl - sed -i "" "s/^Site:.*/Site:$SITE/" $CONFIG_FILE - sed -i "" "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE @@ -61,6 +63,11 @@ after_script: yes "C" | ctest -D ExperimentalMemCheck -VV; fi - if [[ $PUSH_TO_CDASH == TRUE ]]; then + GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; + GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`; + GIT_SUBJECT=${GIT_SUBJECT//\"/}; + GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT")); + find Testing -name "*.xml" -exec sed -i "" "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";"; ctest -D ExperimentalSubmit; fi - cd .. diff --git a/.travis.windows.yml b/.travis.windows.yml index 52b088df1..646bde318 100644 --- a/.travis.windows.yml +++ b/.travis.windows.yml @@ -28,13 +28,15 @@ script: - cd build - cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../src -DTCMALLOC=OFF -DCMAKE_TOOLCHAIN_FILE=/tmp/mxe/usr/x86_64-w64-mingw32/share/cmake/mxe-conf.cmake - SITE=Windows@Travis - - GIT_COMMIT=`git log HEAD~ --oneline -n 1 | cut -d ' ' -f 1` - if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then BUILD_TYPE=Release; else BUILD_TYPE=Debug; fi - BUILD_NAME=${TRAVIS_BRANCH}_${GIT_COMMIT}_w64-mingw32-g++-4.8.1_${BUILD_TYPE} + - if [[ $TCMALLOC == ON ]]; then + BUILD_NAME=${BUILD_NAME}_TC; + fi; - CONFIG_FILE=DartConfiguration.tcl - sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE - sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE @@ -43,6 +45,11 @@ script: - sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE - ctest -D ExperimentalBuild -VV - if [[ $PUSH_TO_CDASH == TRUE ]]; then + GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; + GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`; + GIT_SUBJECT=${GIT_SUBJECT//\"/}; + GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT")); + find Testing -name "*.xml" -exec sed -i "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";"; find Testing -type f -name "*.xml" -exec sed -i 's/OSName=\"Linux\"/OSName=\"Windows\"/' {} \; ; ctest -D ExperimentalSubmit; fi diff --git a/.travis.yml b/.travis.yml index 2ffd957e0..57fa099ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -163,13 +163,15 @@ script: fi - if [[ $CMAKE_BUILD_TYPE == DEBUG || $CMAKE_BUILD_TYPE == RELEASE || $TESTCOV == ON ]]; then SITE=Ubuntu12.04@Travis; - GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; if [[ $CMAKE_BUILD_TYPE == RELEASE ]]; then BUILD_TYPE=Release; else BUILD_TYPE=Debug; fi; - BUILD_NAME=${TRAVIS_BRANCH}_${GIT_COMMIT}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}; + BUILD_NAME=${TRAVIS_BRANCH}_${CMAKE_CXX_COMPILER}_${BUILD_TYPE}; + if [[ $TCMALLOC == ON ]]; then + BUILD_NAME=${BUILD_NAME}_TC; + fi; CONFIG_FILE=DartConfiguration.tcl; sed -i "s/^Site:.*/Site:$SITE/" $CONFIG_FILE; sed -i "s/BuildName:.*/BuildName:$BUILD_NAME/" $CONFIG_FILE; @@ -197,6 +199,11 @@ after_script: yes "C" | ctest -D ExperimentalMemCheck -VV; fi - if [[ $LEANREPO == BLESSED && $PUSH_TO_CDASH == TRUE ]]; then + GIT_COMMIT=`git log --oneline -n 1 | cut -d ' ' -f 1`; + GIT_SUBJECT=`git log --oneline -n 1 | cut -d ' ' -f 2-`; + GIT_SUBJECT=${GIT_SUBJECT//\"/}; + GIT_SUBJECT=$(echo -e $(printf '%q' "$GIT_SUBJECT")); + find Testing -name "*.xml" -exec sed -i "s/Generator=\".*\"/Generator=\"${GIT_COMMIT}###${GIT_SUBJECT}\"/" {} ";"; ctest -D ExperimentalSubmit; fi - cd ..