From 254d036c423e470d9c51ab1d247b481d4326c210 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 18 Apr 2017 11:58:51 +0200 Subject: [PATCH] Publish the dependencies archives as soon as they are generated. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We may end in a deadlock if we publish dependencies archives at the end of the compilation and if all compilation succeed. For example project B may depend on project A. If we change the project A API and the project B code to reflect the API change and merge A' API in master and create a PR for B, the PR for B will need a new archive with new project A' API. However, as B' master fails with new A, the whole compilation fails and nothing is publish. So B'PR is never compiled successfully. By publish the archives as soons as generated, the A' new API will be published and B'PR will compile correctly, even if master fails. Will be able to merge B'PR without bypassing travisCI. --- travis/compile_all.sh | 7 ++++--- travis/deploy.sh | 10 ---------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/travis/compile_all.sh b/travis/compile_all.sh index 6f83c8a..f33dde2 100755 --- a/travis/compile_all.sh +++ b/travis/compile_all.sh @@ -3,9 +3,9 @@ set -e BASE_DIR="BUILD_${PLATFORM}" -DEPS_ARCHIVES_DIR=${HOME}/DEPS_ARCHIVES -mkdir -p ${DEPS_ARCHIVES_DIR} NIGHTLY_ARCHIVES_DIR=${HOME}/NIGHTLY_ARCHIVES +SSH_KEY=travis/travisci_builder_id_key + mkdir -p ${NIGHTLY_ARCHIVES_DIR} cd ${HOME} @@ -37,7 +37,7 @@ then ANDROID_NDK_DIR=$(find . -name "android-ndk*") ARCHIVE_NAME="deps_${PLATFORM}_${TARGET}.tar.gz" - cat < manifest.txt + cat < manifest.txt ${ARCHIVE_NAME} ********************************* @@ -46,6 +46,7 @@ Generated at $(date) EOF tar -czf ${ARCHIVE_NAME} INSTALL manifest.txt ${MESON_FILE} ${ANDROID_NDK_DIR} + scp -i ${SSH_KEY} ${ARCHIVE_NAME} nightlybot@download.kiwix.org:/var/www/tmp.kiwix.org/ci/ ) ${TRAVIS_BUILD_DIR}/kiwix-build.py --target-platform $PLATFORM ${TARGET} diff --git a/travis/deploy.sh b/travis/deploy.sh index f680d16..929db04 100755 --- a/travis/deploy.sh +++ b/travis/deploy.sh @@ -2,19 +2,9 @@ set -e -DEPS_ARCHIVES_DIR=${HOME}/DEPS_ARCHIVES NIGHTLY_ARCHIVES_DIR=${HOME}/NIGHTLY_ARCHIVES - SSH_KEY=travis/travisci_builder_id_key -DEPS_ARCHIVES=$(find $DEPS_ARCHIVES_DIR -type f) -if [[ "x$DEPS_ARCHIVES" != "x" ]] -then - scp -vp -i ${SSH_KEY} \ - ${DEPS_ARCHIVES} \ - nightlybot@download.kiwix.org:/var/www/tmp.kiwix.org/ci/ -fi - NIGHTLY_ARCHIVES=$(find $NIGHTLY_ARCHIVES_DIR -type f) if [[ "x$NIGHTLY_ARCHIVES" != "x" ]] then