Skip to content

Instantly share code, notes, and snippets.

@adunstan adunstan/appveyor.yml
Last active Jun 3, 2018

Embed
What would you like to do?
Setup for appveyor builds
# appveyor.yml
install:
- cinst winflexbison
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'
before_build:
- net user testuser Blurfl9426! /add
- rename c:\ProgramData\chocolatey\bin\win_flex.exe flex.exe
- rename c:\ProgramData\chocolatey\bin\win_bison.exe bison.exe
- curl -S -O https://gist.githubusercontent.com/adunstan/7f18e5db33bb2d73f69ff8c9337a4e6c/raw/buildsetup.pl
- perl buildsetup.pl
build:
project: pgsql.sln
configuration:
- Release
test_script:
- echo redirect escape ^> foo.bar
- echo echo script running > test_script.bat
- echo cd %cd%\src\tools\msvc >> test_script.bat
- echo SET PATH=%PATH% >> test_script.bat
- perl -e "print q{.\vcregress check > regression.out}, qq{\n};" >> test_script.bat
- type test_script.bat
- psexec -u testuser -p Blurfl9426! c:\projects\pgdevel\test_script.bat
- type src\tools\msvc\regression.out
# first part of postgres build.pl, just doesn't run msbuild
use strict;
BEGIN
{
chdir("../../..") if (-d "../msvc" && -d "../../../src");
}
use lib "src/tools/msvc";
use Cwd;
use Mkvcbuild;
# buildenv.pl is for specifying the build environment settings
# it should contain lines like:
# $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
if (-e "src/tools/msvc/buildenv.pl")
{
do "src/tools/msvc/buildenv.pl";
}
elsif (-e "./buildenv.pl")
{
do "./buildenv.pl";
}
# set up the project
our $config;
do "config_default.pl";
do "config.pl" if (-f "src/tools/msvc/config.pl");
# print "PATH: $_\n" foreach (split(';',$ENV{PATH}));
Mkvcbuild::mkvcbuild($config);
@davecramer

This comment has been minimized.

Copy link

commented Nov 3, 2017

forgive my ignorance.. why are you using testuser to run the regression ?

@adunstan

This comment has been minimized.

Copy link
Owner Author

commented Jun 3, 2018

Dave, sorry, didn't see your comment before. The issue is that if it runs as a user with administrative privileges the tablespace check fails. Hence use of a new user. Thomas Munro gets around this by disabling that test. I'm going to look at allowing disabling of tests without patching the postgres code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.