forked from citusdata/citus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
89 lines (72 loc) · 2.88 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
# - Full sample file at: https://www.appveyor.com/docs/appveyor-yml/
#---------------------------------#
# general configuration #
#---------------------------------#
version: 1.0.{build}-{branch}
# Maximum number of concurrent jobs for the project
max_jobs: 1
#---------------------------------#
# environment configuration #
#---------------------------------#
cache:
- C:\tools\vcpkg\installed\
- C:\tools\vcpkg\packages\
# Build worker image (VM template)
image: Visual Studio 2017
# save the cache even if the build fails
environment:
VCPKG_DIR: C:\tools\vcpkg
APPVEYOR_SAVE_CACHE_ON_ERROR: true
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# clone directory
clone_folder: c:\projects\citus
# doesn't checkout the entire history, uses github API to download a zip of the repo
shallow_clone: true # default is "false"
# scripts which run after cloning repository
install:
# add flex/bison to path
- set PATH=%PATH%;C:\msys64\usr\bin
- flex --version
- bison --version
# make postgres think we're a contrib module
- git clone -b REL_10_STABLE https://github.com/postgres/postgres C:\projects\postgres
- git -C C:\projects\postgres apply C:\projects\citus\windows\Mkvcbuild.pm.patch
# only build Citus, don't build the other contrib modules
- git -C C:\projects\postgres apply C:\projects\citus\windows\Mkvcbuild-minimize.patch
- rmdir /s /q C:\projects\postgres\contrib
- mkdir C:\projects\postgres\contrib
- xcopy /i /e C:\projects\citus C:\projects\postgres\contrib\citus
- '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"'
# we need this for usage reporting
- vcpkg install curl:x64-windows & exit 0
#---------------------------------#
# build configuration #
#---------------------------------#
platform: x64
configuration:
- Release
build_script:
- ps: cd C:\projects\postgres\src\tools\msvc
- build RELEASE
#---------------------------------#
# tests configuration #
#---------------------------------#
before_test:
- ps: cd C:\projects\postgres\src\tools\msvc
- install C:\projects\pgsql
- cd C:\projects\postgres\contrib\citus\src\backend\distributed
- copy citus--*.sql C:\projects\pgsql\share\extension\
- perl install.pl C:\projects\pgsql
test_script:
- ps: cd C:\projects\postgres\contrib\citus\src\test\regress
- perl pg_regress_multi.pl --bindir=C:\projects\pgsql\bin --load-extension=citus -- --schedule=multi_schedule
on_failure:
- ps: cd C:\projects\postgres\contrib\citus\src\test\regress
- type regression.diffs