Skip to content

Commit ec97e14

Browse files
committed
Travis-CI and Appveyor integration
1 parent 83fd453 commit ec97e14

File tree

6 files changed

+166
-0
lines changed

6 files changed

+166
-0
lines changed

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: c
2+
compiler: gcc
3+
dist: xenial
4+
addons:
5+
apt:
6+
packages:
7+
- libreadline-dev
8+
- zlib1g-dev
9+
install:
10+
- curl -L https://cpanmin.us | perl - App::cpanminus
11+
- ~/perl5/bin/cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
12+
- ~/perl5/bin/cpanm IPC::Run
13+
- ~/perl5/bin/cpanm Test::More
14+
- ~/perl5/bin/cpanm Time::HiRes
15+
script:
16+
- export CFLAGS="-Og"
17+
- ./configure --enable-debug --enable-cassert --enable-depend --enable-tap-tests BISONFLAGS="-v"
18+
- make check-world

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# PostgreSQL mirror
2+
[![Travis-ci Status](https://travis-ci.com/postgrespro/postgres.svg?branch=master_ci)](https://travis-ci.com/postgrespro/postgres)
3+
[![Build status](https://ci.appveyor.com/api/projects/status/24ye5umhokcdyr90/branch/master_ci?svg=true)](https://ci.appveyor.com/project/ololobus/postgres-95nau/branch/master_ci)
4+
5+
Involves automatic builds of PRs/commits on Linux (Travis-CI) and Windows (Appveyor):
6+
* Linux: full `make check-world`
7+
* Windows: only build + `make check`
8+
9+
These checks are very similar to [cfbot](https://github.com/postgresql-cfbot) builds.
10+
11+
If you want to verify your patch set before sending it to hackers, then just send a PR with your changes to the branch [master_ci](https://github.com/postgrespro/postgres/tree/master_ci) from any other postgres fork across GitHub. [See example](https://github.com/postgrespro/postgres/pull/3).
12+
13+
Branch [master](https://github.com/postgrespro/postgres/tree/master) is left intact for convinience. Default branch is [master_ci](https://github.com/postgrespro/postgres/tree/master_ci) now, but do not push or commit anything there. To update [master_ci](https://github.com/postgrespro/postgres/tree/master_ci) you should do:
14+
15+
```shell
16+
git checkout master_ci
17+
git pull --rebase upstream master
18+
git push -f origin master_ci
19+
```
20+
21+
For original PostgreSQL readme [refer to README file](README).

appveyor.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
skip_branch_with_pr: true
2+
shallow_clone: true
3+
4+
image:
5+
- Visual Studio 2015
6+
7+
install:
8+
- appveyor-retry cinst winflexbison
9+
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'
10+
- '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64'
11+
12+
before_build:
13+
- rename c:\ProgramData\chocolatey\bin\win_flex.exe flex.exe
14+
- rename c:\ProgramData\chocolatey\bin\win_bison.exe bison.exe
15+
# - cpan App::cpanminus
16+
# - cpanm CPAN
17+
# - cpanm Test::More
18+
# - cpanm Time::HiRes
19+
# - cpanm --notest --no-prompt -f IPC::Run # There are some problems with running IPC::Run tests on install
20+
- perl buildsetup.pl
21+
22+
build:
23+
project: pgsql.sln
24+
25+
test_script:
26+
- cd src\tools\msvc && vcregress check #&& vcregress bincheck
27+
28+
on_failure:
29+
- perl dumpregr.pl
30+
31+
configuration:
32+
- Release

buildsetup.pl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# First part of postgres build.pl, just doesn't run msbuild
2+
3+
use strict;
4+
5+
use File::Copy;
6+
7+
BEGIN
8+
{
9+
10+
chdir("../../..") if (-d "../msvc" && -d "../../../src");
11+
12+
}
13+
14+
use lib "src/tools/msvc";
15+
16+
use Cwd;
17+
18+
use Mkvcbuild;
19+
20+
# buildenv.pl is for specifying the build environment settings
21+
# it should contain lines like:
22+
# $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
23+
24+
if (-e "src/tools/msvc/buildenv.pl")
25+
{
26+
do "src/tools/msvc/buildenv.pl";
27+
}
28+
elsif (-e "./buildenv.pl")
29+
{
30+
do "./buildenv.pl";
31+
}
32+
33+
copy("config.pl", "src/tools/msvc/config.pl");
34+
35+
# set up the project
36+
our $config;
37+
do "config_default.pl";
38+
do "config.pl" if (-f "src/tools/msvc/config.pl");
39+
40+
# print "PATH: $_\n" foreach (split(';',$ENV{PATH}));
41+
42+
Mkvcbuild::mkvcbuild($config);

config.pl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Configuration arguments for vcbuild.
2+
use strict;
3+
use warnings;
4+
5+
our $config = {
6+
asserts => 1, # --enable-cassert
7+
# float4byval=>1, # --disable-float4-byval, on by default
8+
9+
# float8byval=> $platformbits == 64, # --disable-float8-byval,
10+
# off by default on 32 bit platforms, on by default on 64 bit platforms
11+
12+
# blocksize => 8, # --with-blocksize, 8kB by default
13+
# wal_blocksize => 8, # --with-wal-blocksize, 8kB by default
14+
# wal_segsize => 16, # --with-wal-segsize, 16MB by default
15+
ldap => 1, # --with-ldap
16+
extraver => undef, # --with-extra-version=<string>
17+
gss => undef, # --with-gssapi=<path>
18+
icu => undef, # --with-icu=<path>
19+
nls => undef, # --enable-nls=<path>
20+
tap_tests => 1, # --enable-tap-tests
21+
tcl => undef, # --with-tcl=<path>
22+
perl => undef, # --with-perl
23+
python => undef, # --with-python=<path>
24+
openssl => undef, # --with-openssl=<path>
25+
uuid => undef, # --with-ossp-uuid
26+
xml => undef, # --with-libxml=<path>
27+
xslt => undef, # --with-libxslt=<path>
28+
iconv => undef, # (not in configure, path to iconv)
29+
zlib => undef # --with-zlib=<path>
30+
};
31+
32+
1;

dumpregr.pl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use strict;
2+
use warnings FATAL => qw(all);
3+
4+
use File::Find;
5+
6+
my $Target = "regression.diffs";
7+
8+
find(\&dump, "src");
9+
10+
sub dump {
11+
if ($_ eq $Target) {
12+
my $path = $File::Find::name;
13+
print "=== \$path ===\\n";
14+
open(my $fh, "<", $_) || die "wtf";
15+
for (1..1000) {
16+
my $line = <$fh>;
17+
last unless defined $line;
18+
print $line;
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy