diff options
| author | Eduard Braun <Eduard.Braun2@gmx.de> | 2017-06-16 20:47:33 +0000 |
|---|---|---|
| committer | Eduard Braun <Eduard.Braun2@gmx.de> | 2017-06-16 20:47:33 +0000 |
| commit | e84cecd0ee6ea97cde0349901f425d0d130b24d3 (patch) | |
| tree | a46c776d16b97cfa6c0e2bd9c5baa5802b5d89d8 | |
| parent | Make tests buildable on windows and account for newer gtest 1.8.0 (which alre... (diff) | |
| parent | Disable tests - they still deadlock sporadically :-( (diff) | |
| download | inkscape-e84cecd0ee6ea97cde0349901f425d0d130b24d3.tar.gz inkscape-e84cecd0ee6ea97cde0349901f425d0d130b24d3.zip | |
Improve AppVeyor configuration
- speed up build by skipping full system upgrade
- build all branches (as long as they have an appveyor.yml)
- actually fail if there are errors during build
- run some basic tests on inkscape.exe
- prepare actual tests (disabled for now as they deadlock sometimes)
| -rw-r--r-- | appveyor.sh | 69 | ||||
| -rw-r--r-- | appveyor.yml | 6 |
2 files changed, 58 insertions, 17 deletions
diff --git a/appveyor.sh b/appveyor.sh index 26d75571a..436c5e932 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -1,12 +1,20 @@ #!/usr/bin/env bash +### functions +message() { echo -e "\e[1;32m\n${1}\n\e[0m"; } +warning() { echo -e "\e[1;33m\nWarning: ${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" <<EOF <?xml version="1.0"?> @@ -14,25 +22,60 @@ cat >"$FONTCONFIG_FILE" <<EOF <fontconfig></fontconfig> EOF +# install dependencies +message "--- Installing dependencies" +source ../msys2installdeps.sh +pacman -S $MINGW_PACKAGE_PREFIX-ccache --needed --noconfirm --noprogressbar +ccache --max-size=200M + +# pending package updates, see +# - https://github.com/Alexpux/MINGW-packages/pull/2597 +# - https://github.com/Alexpux/MINGW-packages/pull/2588 +wget -nv https://gitlab.com/Ede123/bintray/raw/master/$MINGW_PACKAGE_PREFIX-gc-7.6.0-1-any.pkg.tar.xz \ + && pacman -U $MINGW_PACKAGE_PREFIX-gc-7.6.0-1-any.pkg.tar.xz --noconfirm +wget -nv https://gitlab.com/Ede123/bintray/raw/master/$MINGW_PACKAGE_PREFIX-gtest-1.8.0-1-any.pkg.tar.xz \ + && pacman -U $MINGW_PACKAGE_PREFIX-gtest-1.8.0-1-any.pkg.tar.xz --noconfirm -# update/install dependecies -pacman -Suu --needed --noconfirm --noprogressbar -pacman -S $MINGW_PACKAGE_PREFIX-ccache --needed --noconfirm --noprogressbar -source ../msys2installdeps.sh + +### build / test + +message "\n\n##### STARTING BUILD #####" # configure -ccache --max-size=200M -cmake .. -G Ninja -DCMAKE_C_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" +message "--- Configuring the build" +cmake .. -G Ninja \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_MESSAGE="NEVER" \ + || error "cmake failed" # build +message "--- Compiling Inkscape" ccache --zero-stats -ninja +ninja || error "compilation failed" ccache --show-stats -ninja install + +# install +message "--- Installing the project" +ninja install || error "installation failed" # test -inkscape/inkscape.exe -V +message "--- Running tests" +# check if the installed executable works +inkscape/inkscape.exe -V || error "installed executable won't run" +PATH= inkscape/inkscape.exe -V >/dev/null || error "installed executable won't run with empty PATH (missing dependecies?)" +err=$(PATH= inkscape/inkscape.exe -V 2>&1 >/dev/null) +if [ -n "$err" ]; then warning "installed executable produces output on stderr:"; echo "$err"; fi +# check if the uninstalled executable works +INKSCAPE_DATADIR=../share bin/inkscape.exe -V >/dev/null || error "uninstalled executable won't run" +err=$(INKSCAPE_DATADIR=../share bin/inkscape.exe -V 2>&1 >/dev/null) +if [ -n "$err" ]; then warning "installed executable produces output on stderr:"; echo "$err"; fi +# run tests (don't fail yet as most tests SEGFAULT on exit) +#ninja check || warning "tests failed" # disabled because of sporadic deadlocks :-( + +message "##### BUILD SUCCESSFULL #####\n\n" + -# package +### package 7z a inkscape.7z inkscape diff --git a/appveyor.yml b/appveyor.yml index dd484b49e..4bf250aed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,5 @@ version: '{branch}-{build}' -branches: - only: - - master - clone_depth: 10 environment: @@ -20,3 +16,5 @@ artifacts: cache: - C:\msys64\home\appveyor\.ccache + +test: off |
