Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5271a25

Browse files
Thomas MunroNikita Glukhov
Thomas Munro
authored and
Nikita Glukhov
committed
Add CI control files for Travis and AppVeyor.
This commit is not intended to be part of a patch submission, it's just a way to trigger builds on Travis and/or AppVeyor. Push a PostgreSQL source tree to GitHub including this commit, after enabling travis-ci.org and/or appveyor.com to watch your GitHub repo and build any branch containing .travis.yml/appveyor.yml. This is a good way to find out what will happen on cfbot.cputube.org after you post a patch to the pgsql-hackers mailing list in a thread that is registered in commitfest.postgresql.org. Add described at https://wiki.postgresql.org/wiki/Continuous_Integration .
1 parent a00c915 commit 5271a25

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

.travis.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
sudo: required
2+
addons:
3+
apt:
4+
packages:
5+
- gdb
6+
- lcov
7+
- libipc-run-perl
8+
- libperl-dev
9+
- libpython-dev
10+
- tcl-dev
11+
- libldap2-dev
12+
- libicu-dev
13+
- docbook
14+
- docbook-dsssl
15+
- docbook-xsl
16+
- libxml2-utils
17+
- openjade1.3
18+
- opensp
19+
- xsltproc
20+
language: c
21+
cache: ccache
22+
before_install:
23+
- echo '/tmp/%e-%s-%p.core' | sudo tee /proc/sys/kernel/core_pattern
24+
script: ./configure --enable-debug --enable-cassert --enable-tap-tests --with-tcl --with-python --with-perl --with-ldap --with-icu && make -j4 all contrib docs && make check-world
25+
after_failure:
26+
- for f in $(find . -name regression.diffs) ; do echo "========= Contents of $f" ; head -1000 $f ; done
27+
- |
28+
for corefile in $(find /tmp/ -name '*.core' 2>/dev/null) ; do
29+
binary=$(gdb -quiet -core $corefile -batch -ex 'info auxv' | grep AT_EXECFN | perl -pe "s/^.*\"(.*)\"\$/\$1/g")
30+
echo dumping $corefile for $binary
31+
gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" $binary $corefile
32+
done
33+

appveyor.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# appveyor.yml
2+
install:
3+
- cinst winflexbison
4+
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'
5+
6+
before_build:
7+
- rename c:\ProgramData\chocolatey\bin\win_flex.exe flex.exe
8+
- rename c:\ProgramData\chocolatey\bin\win_bison.exe bison.exe
9+
- perl buildsetup.pl
10+
11+
build:
12+
project: pgsql.sln
13+
14+
before_test:
15+
- 'perl -p -i.bak -e "s/^test: tablespace/#test: tablespace/" src/test/regress/serial_schedule'
16+
- 'perl -p -i.bak -e "s/^test: tablespace/#test: tablespace/" src/test/regress/parallel_schedule'
17+
18+
test_script:
19+
- cd src\tools\msvc && vcregress check
20+
21+
on_failure:
22+
- perl dumpregr.pl
23+
24+
configuration:
25+
- Release

buildsetup.pl

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

dumpregr.pl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
while (my $line = <$fh>) {
16+
print $line;
17+
if ($. > 1000) { last; }
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)