aboutsummaryrefslogtreecommitdiffstats
path: root/azure-pipelines/build-windows
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-10-11 19:35:07 +0200
committerJay Berkenbilt <ejb@ql.org>2018-10-11 21:07:51 +0200
commit4628461383855610f87c8df5c64535f521056a32 (patch)
tree7ef7e671d1b2f35cf1e81b4b22d24bb9426bb4f0 /azure-pipelines/build-windows
parente7adaff786bf4bed30be39a8a28edb9f65888b12 (diff)
downloadqpdf-4628461383855610f87c8df5c64535f521056a32.tar.zst
Set up Azure Pipelines
Use free Azure Pipelines to do Linux, Windows, and Mac build and test and to generate Windows binary distributions.
Diffstat (limited to 'azure-pipelines/build-windows')
-rwxr-xr-xazure-pipelines/build-windows40
1 files changed, 40 insertions, 0 deletions
diff --git a/azure-pipelines/build-windows b/azure-pipelines/build-windows
new file mode 100755
index 00000000..834c884f
--- /dev/null
+++ b/azure-pipelines/build-windows
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -ex
+cd $(dirname $0)/..
+wordsize=$1
+tool=$2
+
+if [[ $tool == mingw ]]; then
+ pacman -Sy --noconfirm make base-devel tar zip unzip
+ if [[ $wordsize == 64 ]]; then
+ pacman -Sy --noconfirm mingw-w64-x86_64-toolchain
+ PATH="/c/tools/msys64/mingw64/bin:$PATH"
+ else
+ pacman -Sy --noconfirm mingw-w64-i686-toolchain
+ PATH="/c/tools/msys64/mingw32/bin:$PATH"
+ fi
+ g++ -v
+elif [[ $tool == msvc ]]; then
+ cl
+fi
+unzip distfiles/distfiles.zip
+curl -L https://downloads.sourceforge.net/project/qpdf/external-libs/2017-08-21/qpdf-external-libs-bin.zip -o qpdf-external-libs-bin.zip
+unzip qpdf-external-libs-bin.zip
+cwd=`pwd`
+PATH=$cwd/libqpdf/build:$PATH
+
+installdir=install-$tool$wordsize
+rm -rf $installdir
+./config-$tool --with-windows-wordsize=$wordsize --enable-show-failed-test-output
+make -j$(nproc)
+# XXX Fix test fragility -- it's always check status in the content preservation tests.
+make -k check || echo "WARNING: TESTS FAILED"
+make install
+
+v=`(cd $installdir; ls -d qpdf-*)`
+cp -p README-windows-install.txt $installdir/$v/README.txt
+mkdir installers
+(cd $installdir; zip -r ../installers/$v-bin-$tool$wordsize.zip $v)
+
+set +x
+ls -l installers