Skip to content

Commit 4402110

Browse files
committed
Bump CIs to PG 12
1 parent 6cc86eb commit 4402110

File tree

2 files changed

+42
-70
lines changed

2 files changed

+42
-70
lines changed

.travis.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ env:
66
- PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0"
77
- SHLIB_LINK=-lgcov
88
matrix:
9+
- PG=12
910
- PG=11
1011
- PG=10
1112
- PG=9.6
12-
- PG=9.5
13-
- PG=9.4
14-
- PG=9.3
1513
install:
1614
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
1715
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

appveyor.yml

+41-67
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,38 @@
1-
version: 1.2.{build}
21
pull_requests:
32
do_not_increment_build_number: true
4-
os: Visual Studio 2015
3+
os: Visual Studio 2017
54
configuration: Release
6-
platform:
7-
- x86
8-
- x64
5+
platform: x64
96
clone_depth: 1
107
environment:
118
PGUSER: postgres
129
PGPASSWORD: Password12!
1310
matrix:
11+
- pg: 12.0-1
12+
PlatformToolset: v141
1413
- pg: master
1514
PlatformToolset: v141
1615
configuration: Debug
17-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
18-
- pg: 9.4.22-1
19-
PlatformToolset: v120
20-
- pg: 9.5.17-1
21-
PlatformToolset: v120
22-
- pg: 9.6.13-1
23-
PlatformToolset: v120
24-
- pg: 10.8-1
25-
PlatformToolset: v120
26-
- pg: 11.3-1
16+
- pg: 11.5-2
2717
PlatformToolset: v140
2818
matrix:
2919
allow_failures:
3020
- pg: master
31-
- pg: 9.4.22-1
32-
platform: x64
33-
- pg: 9.5.17-1
34-
platform: x64
35-
exclude:
36-
- platform: x86
37-
pg: 11.3-1
38-
- platform: x86
39-
pg: master
21+
4022

4123
init: # Make %exe% available for caching
42-
- if %PLATFORM%==x64 ( set pf=%ProgramFiles%&& set x64=-x64) else set pf=%ProgramFiles(x86)%
43-
- set exe=postgresql-%pg%-windows%x64%.exe
44-
- setx /m exe %exe%
24+
- ps: |
25+
$env:exe = "postgresql-$env:pg-windows-x64.exe"
26+
[Environment]::SetEnvironmentVariable("exe", $env:exe, "Machine")
4527
4628
install:
47-
48-
# http://www.databasesoup.com/2016/05/changing-postgresql-version-numbering.html
49-
- for /f "tokens=2 delims=-" %%A in ("%exe%") do set pgversion=%%~nA
50-
- echo pgversion=%pgversion%
51-
- set pgroot=%pf%\PostgreSQL\%pgversion%
52-
- echo %pgroot%
5329
- ps: |
54-
if ("$env:pg" -eq "master") {
30+
# http://www.databasesoup.com/2016/05/changing-postgresql-version-numbering.html
31+
$env:pgversion = $env:pg -replace "\.\d+-\d+$", ""
32+
$env:pgroot = "$env:ProgramFiles\PostgreSQL\$env:pgversion"
33+
if ("$env:pg" -notmatch "\.") {
5534
$env:Path += ";C:\msys64\usr\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64"
56-
git clone -q --depth 1 https://git.postgresql.org/git/postgresql.git c:\projects\postgresql
35+
git clone -q --depth 1 --branch $env:pg https://git.postgresql.org/git/postgresql.git c:\projects\postgresql
5736
pushd c:\projects\postgresql
5837
perl src\tools\msvc\build.pl
5938
perl src\tools\msvc\install.pl "$env:pgroot"
@@ -64,7 +43,7 @@ install:
6443
Start-FileDownload "http://get.enterprisedb.com/postgresql/$env:exe"
6544
}
6645
& ".\$env:exe" --unattendedmodeui none --mode unattended --superpassword "$env:PGPASSWORD" --servicepassword "$env:PGPASSWORD" | Out-Null
67-
Stop-Service "postgresql$env:x64-$env:pgversion"
46+
Stop-Service "postgresql-x64-$env:pgversion"
6847
}
6948
}
7049
@@ -77,43 +56,38 @@ build_script:
7756
/verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
7857

7958
after_build:
80-
- set dll=%PLATFORM:x86=.%\%CONFIGURATION%\temporal_tables.dll
81-
- appveyor AddMessage Packing -Category Information
82-
- md tmp\share\extension
83-
- copy *.sql tmp\share\extension\
84-
- copy *.control tmp\share\extension\
85-
- copy LICENSE tmp\TEMPORAL_TABLES_LICENSE
86-
- md tmp\lib
87-
- md tmp\symbols
88-
- copy "%dll%" tmp\lib
89-
- copy "%dll:.dll=.pdb%" tmp\symbols
90-
- set zip=temporal_tables-%APPVEYOR_REPO_COMMIT:~0,8%-pg%pgversion%-%PLATFORM%.zip
91-
- 7z a -r %zip% .\tmp\* > nul
59+
- ps: |
60+
$dll = "x64\$env:CONFIGURATION\temporal_tables.dll"
61+
Add-AppveyorMessage Packing -Category Information
62+
New-Item -Name tmp\share\extension -ItemType "directory"
63+
Copy-Item "*.sql" -Destination tmp\share\extension\
64+
Copy-Item "*.control" -Destination tmp\share\extension\
65+
Copy-Item LICENSE -Destination tmp\TEMPORAL_TABLES_LICENSE
66+
New-Item -Name tmp\lib -ItemType "directory"
67+
New-Item -Name tmp\debug_symbols -ItemType "directory"
68+
Copy-Item $dll -Destination tmp\lib
69+
Copy-Item ($dll -replace "\.dll", ".pdb") -Destination tmp\debug_symbols
70+
if ($env:APPVEYOR_REPO_TAG -eq "false") {
71+
$env:APPVEYOR_REPO_TAG_NAME=${env:APPVEYOR_REPO_COMMIT}.SubString(0,8)
72+
}
73+
$zip = "temporal_tables-$env:APPVEYOR_REPO_TAG_NAME-pg$env:pgversion-windows-$env:PLATFORM.zip"
74+
Compress-Archive -Path ".\tmp\*" -DestinationPath $zip
9275
9376
test_script:
94-
- path %pgroot%\bin;%PATH%
95-
- appveyor AddMessage "Copying the extension files to the PostgreSQL directories." -Category Information
96-
- 7z x %zip% "-o%pgroot%"
9777
- ps: |
98-
if ("$env:pg" -eq "master") {
78+
$env:path += ";$env:pgroot\bin"
79+
Add-AppveyorMessage "Copying the extension files to the PostgreSQL directories." -Category Information
80+
Expand-Archive -LiteralPath $zip -DestinationPath $env:pgroot
81+
if ("$env:pg" -notmatch "\.") {
9982
Set-Content -path pg.pass -value "$env:pgpassword" -encoding ascii
10083
initdb -A md5 -U "$env:PGUSER" --pwfile=pg.pass C:\pgdata
101-
pg_ctl register -S demand -N "postgresql$env:x64-$env:pgversion" -D c:\pgdata
84+
pg_ctl register -S demand -N "postgresql-x64-$env:pgversion" -D c:\pgdata
10285
}
103-
- rem Start the database server.
104-
- net start postgresql%x64%-%pgversion%
105-
106-
- appveyor AddTest Regression -Framework pg_regress -FileName sql\ -Outcome Running
107-
- ps: |
86+
Start-Service postgresql-x64-$env:pgversion
10887
Add-AppveyorTest Regression -Framework pg_regress -FileName sql\ -Outcome Running
109-
if ("9.4" -eq "$env:pgversion") {
110-
$env:psqlopt="--psqldir"
111-
} else {
112-
$env:psqlopt="--bindir"
113-
}
11488
$env:Outcome="Passed"
11589
$elapsed=(Measure-Command {
116-
pg_regress "$env:psqlopt=$env:pgroot\bin" --dbname=pl_regression `
90+
pg_regress "--bindir=$env:pgroot\bin" --dbname=pl_regression `
11791
install no_system_period invalid_system_period no_history_table `
11892
no_history_system_period invalid_types invalid_system_period_values `
11993
versioning versioning_custom_system_time structure uninstall 2>&1 |
@@ -135,9 +109,9 @@ artifacts:
135109
deploy:
136110
# Deploy to GitHub Releases
137111
- provider: GitHub
138-
artifact: /.*\.zip/
139-
draft: false
112+
draft: true
140113
prerelease: false
114+
auth_token:
115+
secure: pR/CfKkATG5dbsaTAJS2WsKC+OBuli4eMe3hSylaNUMnvvjUEXmfIseZF+//1d/j
141116
on:
142-
branch: master # release from master branch only
143117
appveyor_repo_tag: true # deploy on tag push only

0 commit comments

Comments
 (0)