From 6c4943de97ff77750acbf736038215778d25b73c Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 8 Apr 2017 15:22:57 +0300 Subject: [PATCH] Cache travis dependencies after Qt build. --- .travis.yml | 1 - .travis/build.sh | 27 ++++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90a1a72c5..48e2659e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ env: # GitHub auth token (GH_AUTH_TOKEN) - secure: "QBbD9VXAx3Mn0vFmHZtm6/sq+twMyR7ilQh7TQm8gBy2TrjhHKDKQ4wRQ5sa2MUFUbzrUOvPlPGq1WuY1mAUt8UE6jZDJNyyDWb6iIlcEmNRsd39XAhYHvJ+uI9JsD+U3OctZ+7Bo4fno0RLv1D5lzh5bpohmjgWxx9TiSZItbsRU+m0XM0Tahx335aXF8NFoVjheGXCOcLAXDt6OmaKPmlrXreuta5nOoRKeOg5vHlt/KNU1pYb8MFvWJc14DKxq3jNqrYlo9vHFv5tVhR1aqvVFWTD/4Z88OSxx3POzyVWdMso0lFov9uxs8qHoqLsGhDMElggyz/jnqZIHpwQMaYIGQ0LLYDv21jGgOuCOWKYlfjDY+tuESXmVPzerTlYBWLZDPrpE8BnXVYo8B/sF4WN6oCuBRjawlqYhqTH+tDDORc9Uc9pamhcuh6OsLMx3PHoyg8joN3t8yUnwhySXyfQ36hqlZ+Y4bBDRZBH/SB/EPmedyLGwdhzQFsUnOBotYeOym7LUdnGraGcj1iTPLdo5TMlBYlAiB12J5mHTNuzUKXh+PBV4REg4Mm2xYX+Pue5Qo1JcOWJteIX4BdPv526DXB3yaNWS1pZgGvYqtBwQlCeOfwOYupS0PksvmV7aX7c4qJSyW3dmEd03cxmebD0b2SbqyPxGFuUajJ7B60=" matrix: - - BUILD_VERSION="prepare_dependencies" - BUILD_VERSION="" - BUILD_VERSION="disable_autoupdate" - BUILD_VERSION="disable_register_custom_scheme" diff --git a/.travis/build.sh b/.travis/build.sh index b1818ce5e..4210186a7 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -9,33 +9,35 @@ UPSTREAM="$REPO/upstream" EXTERNAL="$REPO/external" CACHE="$HOME/travisCacheDir" +QT_WAS_BUILT="0" + QT_VERSION=5.6.2 XKB_PATH="$BUILD/libxkbcommon" -XKB_CACHE_VERSION="2" +XKB_CACHE_VERSION="3" QT_PATH="$BUILD/qt" -QT_CACHE_VERSION="2" +QT_CACHE_VERSION="3" QT_PATCH="$UPSTREAM/Telegram/Patches/qtbase_${QT_VERSION//\./_}.diff" BREAKPAD_PATH="$BUILD/breakpad" -BREAKPAD_CACHE_VERSION="2" +BREAKPAD_CACHE_VERSION="3" GYP_PATH="$BUILD/gyp" -GYP_CACHE_VERSION="2" +GYP_CACHE_VERSION="3" GYP_PATCH="$UPSTREAM/Telegram/Patches/gyp.diff" VA_PATH="$BUILD/libva" -VA_CACHE_VERSION="2" +VA_CACHE_VERSION="3" VDPAU_PATH="$BUILD/libvdpau" -VDPAU_CACHE_VERSION="1" +VDPAU_CACHE_VERSION="3" FFMPEG_PATH="$BUILD/ffmpeg" -FFMPEG_CACHE_VERSION="2" +FFMPEG_CACHE_VERSION="3" OPENAL_PATH="$BUILD/openal-soft" -OPENAL_CACHE_VERSION="2" +OPENAL_CACHE_VERSION="3" GYP_DEFINES="" @@ -57,6 +59,8 @@ run() { build() { mkdir -p "$EXTERNAL" + BUILD_VERSION_DATA=$(echo $BUILD_VERSION | cut -d'-' -f 1) + # libxkbcommon getXkbCommon @@ -84,9 +88,9 @@ build() { # Guideline Support Library getGSL - if [[ $BUILD_VERSION == *"prepare_dependencies"* ]]; then - success_msg "Dependencies were prepared successfully! :)" - exit 0 + if [ "$QT_WAS_BUILT" == "1" ]; then + error_msg "Qt was built, please restart the job :(" + exit 1 fi # Configure the build @@ -516,6 +520,7 @@ getCustomQt() { } buildCustomQt() { + QT_WAS_BUILT="1" info_msg "Downloading and building patched qt" if [ -d "$EXTERNAL/qt${QT_VERSION}" ]; then