Upload an archive of the build directory in case of failure.

This commit is contained in:
Matthieu Gautier 2020-01-20 23:02:12 +01:00
parent d37acc2cbe
commit c178c6ea35
2 changed files with 21 additions and 0 deletions

16
.github/scripts/upload_failure_logs.sh vendored Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
cd $HOME
ARCHIVE_NAME=fail_log_${OS_NAME}_${PLATFORM_TARGET}.tar.gz
tar -czf ${ARCHIVE_NAME} $HOME/BUILD_* $HOME/SOURCE $HOME/LOGS $HOME/TOOLCHAINS
echo "Uploading archive $ARCHIVE_NAME"
scp -p -i ${SSH_KEY} \
-o PasswordAuthentication=no \
-o StrictHostKeyChecking=no \
$ARCHIVE_NAME \
ci@tmp.kiwix.org:/data/tmp/ci

View File

@ -84,3 +84,8 @@ jobs:
kiwix-build/.github/scripts/ensure_base_deps.py
env:
PLATFORM_TARGET: ${{matrix.target}}
- name: Upload failure logs
if: failure()
run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.sh
env:
PLATFORM_TARGET: ${{matrix.target}}