From ca3530676c5b5cdb44124e163642647bc40a2c7d Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Wed, 14 Jun 2017 20:31:41 +0200 Subject: output some status messages --- appveyor.sh | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/appveyor.sh b/appveyor.sh index dfed25668..6ea09e1b9 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -1,12 +1,19 @@ #!/usr/bin/env bash +### functions +message() { echo -e "\e[1;32m\n${1}\n\e[0m"; } +error() { echo -e "\e[1;31m\nError: ${1}\n\e[0m"; exit 1; } + + + +### setup + +# do everything in /build cd "$(dirname "$0")" mkdir build cd build - - -# Write an empty fonts.conf to speed up fc-cache +# write an empty fonts.conf to speed up fc-cache export FONTCONFIG_FILE=/dummy-fonts.conf cat >"$FONTCONFIG_FILE" < @@ -14,30 +21,42 @@ cat >"$FONTCONFIG_FILE" < EOF - - # install dependencies -pacman -S $MINGW_PACKAGE_PREFIX-ccache --needed --noconfirm --noprogressbar +message "--- Installing dependencies" source ../msys2installdeps.sh +pacman -S $MINGW_PACKAGE_PREFIX-ccache --needed --noconfirm --noprogressbar +ccache --max-size=200M + + + +### build / test + +message "\n\n##### STARTING BUILD #####" # configure -ccache --max-size=200M +message "--- Configuring the build" cmake .. -G Ninja \ -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ -DCMAKE_INSTALL_MESSAGE="NEVER" \ - || exit 1 + || error "cmake failed" # build +message "--- Compiling Inkscape" ccache --zero-stats -ninja || exit 1 +ninja || error "compilation failed" ccache --show-stats # install -ninja install || exit 1 +message "--- Installing the project" +ninja install || error "installation failed" # test -inkscape/inkscape.exe -V || exit 1 +message "--- Running tests" +inkscape/inkscape.exe -V || error "tests failed" + +message "##### BUILD SUCCESSFULL #####\n\n" + -# package +### package 7z a inkscape.7z inkscape -- cgit v1.2.3