summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-06-11 14:23:09 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-06-11 14:23:09 +0000
commit371178f4cca00e602dee70bbc2c8030cfa9a7eec (patch)
treeab85e755a9cd605ff103e3aaa482d49468b9e05c
parentMerge branch 'ccache' into 'master' (diff)
parentCI on Windows using AppVeyor and MSYS2 (diff)
downloadinkscape-371178f4cca00e602dee70bbc2c8030cfa9a7eec.tar.gz
inkscape-371178f4cca00e602dee70bbc2c8030cfa9a7eec.zip
Merge branch 'appveyor' into 'master'
CI on Windows using AppVeyor and MSYS2 See merge request !5
-rw-r--r--appveyor.sh38
-rw-r--r--appveyor.yml22
-rwxr-xr-xmsys2installdeps.sh20
3 files changed, 74 insertions, 6 deletions
diff --git a/appveyor.sh b/appveyor.sh
new file mode 100644
index 000000000..26d75571a
--- /dev/null
+++ b/appveyor.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+cd "$(dirname "$0")"
+mkdir build
+cd build
+
+
+
+# Write an empty fonts.conf to speed up fc-cache
+export FONTCONFIG_FILE=/dummy-fonts.conf
+cat >"$FONTCONFIG_FILE" <<EOF
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig></fontconfig>
+EOF
+
+
+
+# update/install dependecies
+pacman -Suu --needed --noconfirm --noprogressbar
+pacman -S $MINGW_PACKAGE_PREFIX-ccache --needed --noconfirm --noprogressbar
+source ../msys2installdeps.sh
+
+# configure
+ccache --max-size=200M
+cmake .. -G Ninja -DCMAKE_C_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_COMPILER_LAUNCHER="ccache"
+
+# build
+ccache --zero-stats
+ninja
+ccache --show-stats
+ninja install
+
+# test
+inkscape/inkscape.exe -V
+
+# package
+7z a inkscape.7z inkscape
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 000000000..dd484b49e
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,22 @@
+version: '{branch}-{build}'
+
+branches:
+ only:
+ - master
+
+clone_depth: 10
+
+environment:
+ matrix:
+ - MSYSTEM: MINGW64
+ - MSYSTEM: MINGW32
+
+build_script:
+ - C:\msys64\usr\bin\pacman -Syuu --needed --noconfirm --noprogressbar
+ - C:\msys64\usr\bin\bash --login -c "$(cygpath ${APPVEYOR_BUILD_FOLDER})/appveyor.sh"
+
+artifacts:
+ - path: build\inkscape.7z
+
+cache:
+ - C:\msys64\home\appveyor\.ccache
diff --git a/msys2installdeps.sh b/msys2installdeps.sh
index fd46e455c..e05411ea3 100755
--- a/msys2installdeps.sh
+++ b/msys2installdeps.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# ------------------------------------------------------------------------------
-# This script installs all dependecies required for building Inkscape with MSYS2
+# -------------------------------------------------------------------------------
+# This script installs all dependencies required for building Inkscape with MSYS2
# execute it once on an MSYS shell, i.e.
# - use the "MSYS2 MSYS" shortcut in the start menu or
# - run "msys2.exe" in MSYS2's installation folder
@@ -8,12 +8,20 @@
# MSYS2 and installed libraries can be updated later by executing
# pacman -Syu --ignore=mingw-w64-*-imagemagick
# in an MSYS shell
-# ------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
# select if you want to build 32-bit (i686), 64-bit (x86_64), or both
-#ARCH=mingw-w64-i686
-#ARCH=mingw-w64-x86_64
-ARCH={mingw-w64-i686,mingw-w64-x86_64}
+case "$MSYSTEM" in
+ MINGW32)
+ ARCH=mingw-w64-i686
+ ;;
+ MINGW64)
+ ARCH=mingw-w64-x86_64
+ ;;
+ *)
+ ARCH={mingw-w64-i686,mingw-w64-x86_64}
+ ;;
+esac
# sync package databases
pacman -Sy