forked from arkhipov/temporal_tables
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
97 lines (87 loc) · 3.41 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
90
91
92
93
94
95
96
97
version: 1.0.{build}
pull_requests:
do_not_increment_build_number: true
os: Visual Studio 2015
configuration: Release
platform:
- x86
- x64
clone_depth: 1
environment:
PGUSER: postgres
PGPASSWORD: Password12!
matrix:
- exe: postgresql-9.3.18-1-windows-%PLATFORM%.exe
- exe: postgresql-9.4.13-1-windows-%PLATFORM%.exe
- exe: postgresql-9.5.8-1-windows-%PLATFORM%.exe
- exe: postgresql-9.6.4-1-windows-%PLATFORM%.exe
- exe: postgresql-10.0-2-windows-x64.exe
- exe: postgresql-10.0-2-windows.exe
matrix:
exclude:
- platform: x64
exe: postgresql-10.0-2-windows.exe
- platform: x86
exe: postgresql-10.0-2-windows-x64.exe
install:
- set dist=%exe:-x86=%
# http://www.databasesoup.com/2016/05/changing-postgresql-version-numbering.html
- for /f "tokens=2 delims=-" %%A in ("%exe%") do set pgversion=%%~nA
- echo pgversion=%pgversion%
- if %PLATFORM%==x64 ( set pf=%ProgramFiles%&& set x64=-x64) else set pf=%ProgramFiles(x86)%
- set pgroot=%pf%\PostgreSQL\%pgversion%
- echo %pgroot%
- if not exist "%pgroot%\bin" (
( if not exist %exe% curl -sL -o %exe% --retry 2 --retry-delay 30 http://get.enterprisedb.com/postgresql/%dist% )
&& %exe% --unattendedmodeui minimal
--mode unattended
--superpassword %PGPASSWORD%
--servicepassword %PGPASSWORD%
&& net stop postgresql%x64%-%pgversion%
)
cache: '%exe%'
build_script:
- if %pgversion%=="9.3" (set PlatformToolset=Windows7.1SDK) else set PlatformToolset=v120
- msbuild /p:PlatformToolset=%PlatformToolset% /p:configuration=%CONFIGURATION% /p:platform=%PLATFORM%
temporal_tables.vcxproj
/verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
test_script:
- path %pgroot%\bin;%PATH%
- set dll=%PLATFORM:x86=.%\%CONFIGURATION%\temporal_tables.dll
- appveyor AddMessage Packing -Category Information
- md tmp\share\extension
- copy *.sql tmp\share\extension\
- copy *.control tmp\share\extension\
- copy LICENSE tmp\TEMPORAL_TABLES_LICENSE
- md tmp\lib
- copy %dll% tmp\lib
- set zip=temporal_tables-%APPVEYOR_REPO_COMMIT:~0,8%-pg%pgversion%-%PLATFORM%.zip
- 7z a -r %zip% .\tmp\* > nul
- appveyor AddMessage "Copying the extension files to the PostgreSQL directories." -Category Information
- 7z x %zip% "-o%pgroot%"
- rem Start the database server.
- net start postgresql%x64%-%pgversion%
- appveyor AddTest Regression -Framework pg_regress -FileName sql\ -Outcome Running
- set psqlopt=--bindir
- if %pgversion%==9.3 set psqlopt=--psqldir
- if %pgversion%==9.4 set psqlopt=--psqldir
- pg_regress "%psqlopt%=%pgroot%\bin"
install no_system_period invalid_system_period no_history_table
no_history_system_period invalid_types invalid_system_period_values
versioning versioning_custom_system_time structure uninstall
- if ERRORLEVEL 1 (set Outcome=Failed) else set Outcome=Passed
- perl -e "my @s=stat('regression.out'); print 1000*($s[9]-$s[10]);" > duration
- set /p Duration=< duration
- appveyor UpdateTest Regression -Framework pg_regress -FileName sql\ -Outcome %Outcome% -Duration %Duration%
- if not %Outcome%==Passed type regression.diffs
artifacts:
- path: '*.zip'
deploy:
# Deploy to GitHub Releases
- provider: GitHub
artifact: /.*\.zip/
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only