Publish the dependencies archives as soon as they are generated.

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.
This commit is contained in:
Matthieu Gautier 2017-04-18 11:58:51 +02:00
parent 2290d0a135
commit 254d036c42
2 changed files with 4 additions and 13 deletions

View File

@ -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 <<EOF > manifest.txt
cat <<EOF > 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}

View File

@ -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