Many people enjoy the Windows testing the cfbot runs on the AppVeyor
service.
You can also run this yourself without the detour through the commit
fest app. Attached are three patches that add .appveyor.yml files, for
MSVC, MinGW, and Cygwin respectively. (An open problem is to combine
them all into one.) I have been using these regularly over the last few
months to test code on these Windows variants.
To use them, first you need to set up your AppVeyor account and link it
to a github (or gitlab or ...) repository. Then git am the patch on top
of some branch, push to github (or ...) and watch it build.
This is just for individual enjoyment; I don't mean to commit them at
this time.
(Some of this has been cribbed from the cfbot work and many other places
all over the web.)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From 732e7ac33eb1bf5a3d42d20307747089d6f54fa5 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 10 Mar 2020 19:22:22 +0100
Subject: [PATCH] AppVeyor configuration for Cygwin
---
.appveyor.yml | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 .appveyor.yml
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000000..1d271dbaaa
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,32 @@
+environment:
+ global:
+ CYG_MIRROR: http://cygwin.mirror.rafal.ca/
+ CYG_CACHE: C:/cygwin/var/cache/setup
+ matrix:
+ - CYG_ARCH: x86
+ CYG_ROOT: C:/cygwin
+ - CYG_ARCH: x86_64
+ CYG_ROOT: C:/cygwin64
+
+install:
+ - set PATH=%CYG_ROOT%/bin;%PATH%
+ - 'appveyor DownloadFile http://cygwin.com/setup-%CYG_ARCH%.exe -FileName
setup.exe'
+ - 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P
flex -P libreadline-devel -P libssl-devel -P libxml2-devel -P libxslt-devel -P
openldap-devel -P zlib-devel'
+ - sh -l -c "cygserver-config --yes"
+ - sh -l -c "cygrunsrv -S cygserver"
+
+build_script:
+ - set HOME=.
+ - set PATH=%CYG_ROOT%/bin;%PATH%
+ - sh -l -c "./configure --enable-cassert --enable-debug --enable-nls
--with-ldap --with-libxml --with-libxslt --with-openssl"
+ - sh -l -c "make world COPT=-Werror"
+
+test_script:
+ - set HOME=.
+ - set PATH=%CYG_ROOT%/bin;%PATH%
+ - sh -l -c "make check-world COPT=-Werror"
+
+on_failure:
+ - set HOME=.
+ - sh -l -c "test -f config.status || cat config.log"
+ - sh -l -c "find . -name regression.diffs | xargs cat"
--
2.25.0
From a04c2140482645a810bfd682b204bac5194eea8d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 10 Mar 2020 19:23:46 +0100
Subject: [PATCH] AppVeyor configuration for MinGW
---
.appveyor.yml | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 .appveyor.yml
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000000..fffa351e90
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,31 @@
+environment:
+ matrix:
+ - MSYSTEM: MINGW32
+ - MSYSTEM: MINGW64
+
+#
https://www.postgresql.org/message-id/flat/f1caef93-9640-022e-9211-bbe8755a56b0%402ndQuadrant.com
+matrix:
+ allow_failures:
+ - MSYSTEM: MINGW64
+
+install:
+ - set PATH=C:/msys64/usr/bin;%PATH%
+ - sh -l -c "pacman --noconfirm -S --needed ${MINGW_PACKAGE_PREFIX}-gettext
${MINGW_PACKAGE_PREFIX}-icu ${MINGW_PACKAGE_PREFIX}-libxml2
${MINGW_PACKAGE_PREFIX}-libxslt ${MINGW_PACKAGE_PREFIX}-openssl"
+ - sh -l -c "curl -L http://cpanmin.us | perl - --self-upgrade"
+ - sh -l -c "cpanm --notest IPC::Run"
+
+build_script:
+ - set HOME=.
+ - set PATH=C:/msys64/usr/bin;%PATH%
+ - sh -l -c "./configure --enable-cassert --enable-debug --enable-nls
--enable-tap-tests --with-icu --with-ldap --with-libxml --with-libxslt
--with-openssl"
+ - sh -l -c "make world COPT=-Werror"
+
+test_script:
+ - set HOME=.
+ - set PATH=C:/msys64/usr/bin;%PATH%
+ - sh -l -c "make check-world COPT=-Werror"
+
+on_failure:
+ - set HOME=.
+ - sh -l -c "test -f config.status || cat config.log"
+ - sh -l -c "find . -name regression.diffs | xargs cat"
--
2.25.0
From ed6610fb02d8c63d66315a83b752de5c6b9b84eb Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Tue, 10 Mar 2020 19:25:54 +0100
Subject: [PATCH] AppVeyor configuration for MSVC
---
.appveyor.yml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 .appveyor.yml
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000000..124736ce3a
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,19 @@
+install:
+ - appveyor-retry cinst winflexbison
+ - rename c:\ProgramData\chocolatey\bin\win_flex.exe flex.exe
+ - rename c:\ProgramData\chocolatey\bin\win_bison.exe bison.exe
+ - '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'
+ - '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
x86_amd64'
+
+configuration:
+ - Release
+
+before_build:
+ - perl src/tools/msvc/mkvcbuild.pl
+
+build:
+ project: pgsql.sln
+
+test_script:
+ - cd src/tools/msvc && vcregress check
+ - cd src/tools/msvc && vcregress ecpgcheck
--
2.25.0