[PATCH 8/8] Add AppVeyor CI configuration and test script

Vladimir Panteleev notmuch at thecybershadow.net
Tue Aug 22 15:43:39 PDT 2017


From: Vladimir Panteleev <vladimir at thecybershadow.net>

At the time of writing, this successfully builds notmuch and runs the
test suite, with 550/793 tests passing.

Whether or not actually testing on AppVeyor is desirable, the test
script illustrates a verifiably working method to build notmuch on
Windows/Cygwin.
---
 appveyor.yml      |  7 +++++++
 devel/appveyor.sh | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 appveyor.yml
 create mode 100644 devel/appveyor.sh

diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000..b4ab6262
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,7 @@
+build_script:
+  # Update the CygWin installer
+  - C:\cygwin64\bin\wget.exe -O /cygdrive/c/cygwin64/setup-x86_64.exe https://cygwin.com/setup-x86_64.exe
+  # Update all packages and install dependencies
+  - C:\cygwin64\setup-x86_64.exe --quiet-mode --upgrade-also --packages gcc-core,gcc-g++,make,python2,python2-devel,libxapian-devel,libgmime2.6-devel,libiconv-devel,docbook-xsl,libxslt,libxml2,zlib-devel
+  # Run our script
+  - C:\cygwin64\bin\bash.exe -l %CD%/devel/appveyor.sh
diff --git a/devel/appveyor.sh b/devel/appveyor.sh
new file mode 100644
index 00000000..651f91f2
--- /dev/null
+++ b/devel/appveyor.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+set -xeuo pipefail
+shopt -s lastpipe
+
+# Test script for the AppVeyor CI service.
+# Ran from ../appveyor.yml.
+# Runs under CygWin bash.
+
+# Reset PATH variable inherited from Windows environment
+export PATH=/usr/local/bin:/usr/bin:/bin
+
+# Set correct working directory
+cd "$(dirname "$0")"/..
+
+# Download talloc
+test -f talloc-2.1.10.tar.gz || wget https://www.samba.org/ftp/talloc/talloc-2.1.10.tar.gz
+rm -rf talloc-2.1.10
+tar zxvf talloc-2.1.10.tar.gz
+
+# Build/install talloc
+(
+	cd talloc-2.1.10
+	./configure --prefix=/usr --disable-python
+	make || true # fails at linking - fix problem and resume build
+	ln -s cygtalloc-2.dll bin/default/talloc.dll
+	ln -s cygtalloc-2.dll bin/default/cygtalloc.dll
+	make
+	make install
+)
+
+./configure
+
+# Windows PE loader doesn't understand Cygwin symlinks
+cp -L /usr/lib/cygtalloc.dll cygtalloc-2.dll
+
+make
+make test
+
+"$@"
-- 
2.13.3



More information about the notmuch mailing list