Skip to content

Commit

Permalink
Bump CIs to PG 12
Browse files Browse the repository at this point in the history
  • Loading branch information
mlt committed Oct 16, 2019
1 parent 6cc86eb commit 4402110
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 70 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ env:
- PG_CPPFLAGS="-fprofile-arcs -ftest-coverage -O0"
- SHLIB_LINK=-lgcov
matrix:
- PG=12
- PG=11
- PG=10
- PG=9.6
- PG=9.5
- PG=9.4
- PG=9.3
install:
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
Expand Down
108 changes: 41 additions & 67 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,38 @@
version: 1.2.{build}
pull_requests:
do_not_increment_build_number: true
os: Visual Studio 2015
os: Visual Studio 2017
configuration: Release
platform:
- x86
- x64
platform: x64
clone_depth: 1
environment:
PGUSER: postgres
PGPASSWORD: Password12!
matrix:
- pg: 12.0-1
PlatformToolset: v141
- pg: master
PlatformToolset: v141
configuration: Debug
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- pg: 9.4.22-1
PlatformToolset: v120
- pg: 9.5.17-1
PlatformToolset: v120
- pg: 9.6.13-1
PlatformToolset: v120
- pg: 10.8-1
PlatformToolset: v120
- pg: 11.3-1
- pg: 11.5-2
PlatformToolset: v140
matrix:
allow_failures:
- pg: master
- pg: 9.4.22-1
platform: x64
- pg: 9.5.17-1
platform: x64
exclude:
- platform: x86
pg: 11.3-1
- platform: x86
pg: master


init: # Make %exe% available for caching
- if %PLATFORM%==x64 ( set pf=%ProgramFiles%&& set x64=-x64) else set pf=%ProgramFiles(x86)%
- set exe=postgresql-%pg%-windows%x64%.exe
- setx /m exe %exe%
- ps: |
$env:exe = "postgresql-$env:pg-windows-x64.exe"
[Environment]::SetEnvironmentVariable("exe", $env:exe, "Machine")
install:

# 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%
- set pgroot=%pf%\PostgreSQL\%pgversion%
- echo %pgroot%
- ps: |
if ("$env:pg" -eq "master") {
# http://www.databasesoup.com/2016/05/changing-postgresql-version-numbering.html
$env:pgversion = $env:pg -replace "\.\d+-\d+$", ""
$env:pgroot = "$env:ProgramFiles\PostgreSQL\$env:pgversion"
if ("$env:pg" -notmatch "\.") {
$env:Path += ";C:\msys64\usr\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64"
git clone -q --depth 1 https://git.postgresql.org/git/postgresql.git c:\projects\postgresql
git clone -q --depth 1 --branch $env:pg https://git.postgresql.org/git/postgresql.git c:\projects\postgresql
pushd c:\projects\postgresql
perl src\tools\msvc\build.pl
perl src\tools\msvc\install.pl "$env:pgroot"
Expand All @@ -64,7 +43,7 @@ install:
Start-FileDownload "http://get.enterprisedb.com/postgresql/$env:exe"
}
& ".\$env:exe" --unattendedmodeui none --mode unattended --superpassword "$env:PGPASSWORD" --servicepassword "$env:PGPASSWORD" | Out-Null
Stop-Service "postgresql$env:x64-$env:pgversion"
Stop-Service "postgresql-x64-$env:pgversion"
}
}
Expand All @@ -77,43 +56,38 @@ build_script:
/verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

after_build:
- 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
- md tmp\symbols
- copy "%dll%" tmp\lib
- copy "%dll:.dll=.pdb%" tmp\symbols
- set zip=temporal_tables-%APPVEYOR_REPO_COMMIT:~0,8%-pg%pgversion%-%PLATFORM%.zip
- 7z a -r %zip% .\tmp\* > nul
- ps: |
$dll = "x64\$env:CONFIGURATION\temporal_tables.dll"
Add-AppveyorMessage Packing -Category Information
New-Item -Name tmp\share\extension -ItemType "directory"
Copy-Item "*.sql" -Destination tmp\share\extension\
Copy-Item "*.control" -Destination tmp\share\extension\
Copy-Item LICENSE -Destination tmp\TEMPORAL_TABLES_LICENSE
New-Item -Name tmp\lib -ItemType "directory"
New-Item -Name tmp\debug_symbols -ItemType "directory"
Copy-Item $dll -Destination tmp\lib
Copy-Item ($dll -replace "\.dll", ".pdb") -Destination tmp\debug_symbols
if ($env:APPVEYOR_REPO_TAG -eq "false") {
$env:APPVEYOR_REPO_TAG_NAME=${env:APPVEYOR_REPO_COMMIT}.SubString(0,8)
}
$zip = "temporal_tables-$env:APPVEYOR_REPO_TAG_NAME-pg$env:pgversion-windows-$env:PLATFORM.zip"
Compress-Archive -Path ".\tmp\*" -DestinationPath $zip
test_script:
- path %pgroot%\bin;%PATH%
- appveyor AddMessage "Copying the extension files to the PostgreSQL directories." -Category Information
- 7z x %zip% "-o%pgroot%"
- ps: |
if ("$env:pg" -eq "master") {
$env:path += ";$env:pgroot\bin"
Add-AppveyorMessage "Copying the extension files to the PostgreSQL directories." -Category Information
Expand-Archive -LiteralPath $zip -DestinationPath $env:pgroot
if ("$env:pg" -notmatch "\.") {
Set-Content -path pg.pass -value "$env:pgpassword" -encoding ascii
initdb -A md5 -U "$env:PGUSER" --pwfile=pg.pass C:\pgdata
pg_ctl register -S demand -N "postgresql$env:x64-$env:pgversion" -D c:\pgdata
pg_ctl register -S demand -N "postgresql-x64-$env:pgversion" -D c:\pgdata
}
- rem Start the database server.
- net start postgresql%x64%-%pgversion%

- appveyor AddTest Regression -Framework pg_regress -FileName sql\ -Outcome Running
- ps: |
Start-Service postgresql-x64-$env:pgversion
Add-AppveyorTest Regression -Framework pg_regress -FileName sql\ -Outcome Running
if ("9.4" -eq "$env:pgversion") {
$env:psqlopt="--psqldir"
} else {
$env:psqlopt="--bindir"
}
$env:Outcome="Passed"
$elapsed=(Measure-Command {
pg_regress "$env:psqlopt=$env:pgroot\bin" --dbname=pl_regression `
pg_regress "--bindir=$env:pgroot\bin" --dbname=pl_regression `
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 2>&1 |
Expand All @@ -135,9 +109,9 @@ artifacts:
deploy:
# Deploy to GitHub Releases
- provider: GitHub
artifact: /.*\.zip/
draft: false
draft: true
prerelease: false
auth_token:
secure: pR/CfKkATG5dbsaTAJS2WsKC+OBuli4eMe3hSylaNUMnvvjUEXmfIseZF+//1d/j
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only

0 comments on commit 4402110

Please sign in to comment.