diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000..42535879efb45 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,47 @@ +sudo: required +language: java +dist: trusty +services: + - postgresql + +before_script: + - ./.travis/make_postgres.sh + - sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432 + - psql -U postgres -c "create user test with password 'test'; select version();" + - psql -c 'create database test owner test;' -U postgres + - echo "MAVEN_OPTS='-Xmx1g -Dgpg.skip=true'" > ~/.mavenrc + - psql test -c 'CREATE EXTENSION hstore;' -U postgres + +script: + # make sure previous build artifacts are not used for subsequent builds + - ./.travis/travis_build.sh + +before_cache: + # No sense in caching current build artifacts + rm -rf $HOME/.m2/repository/org/postgresql + +# Skip default "mvn install" issued by Travis +# Root project cannot be compiled with older JDKs, so it makes sense to just skip the step +install: true + +cache: + directories: + - '$HOME/.m2/repository' + +matrix: + fast_finish: true + include: + - env: + - TEST=PG_CHECK + script: make check + - env: + - TEST=PG_CHECK_WORLD + script: PGHOST=localhost make check-world + - jdk: oraclejdk8 + env: + - TEST=pgjdbc + script: ./.travis/pgjdbc_check.sh + +branches: + only: + - travis diff --git a/.travis/make_postgres.sh b/.travis/make_postgres.sh new file mode 100755 index 0000000000000..71783c1f91ae3 --- /dev/null +++ b/.travis/make_postgres.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -x -e + +sudo service postgresql stop + +PREFIX=$HOME/pg_head + +./configure --prefix=$PREFIX + +# Build PostgreSQL from source and start the DB +make && make install && $PREFIX/bin/pg_ctl -D $PREFIX/data initdb && $PREFIX/bin/pg_ctl -D $PREFIX/data -l postgres.log start + +sleep 10 + +cat postgres.log diff --git a/.travis/pgjdbc_check.sh b/.travis/pgjdbc_check.sh new file mode 100755 index 0000000000000..16cd07e14658b --- /dev/null +++ b/.travis/pgjdbc_check.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -x -e + +git clone --depth=1 https://github.com/pgjdbc/pgjdbc.git + +git log -1 + +cd pgjdbc + +mvn clean package -B -V diff --git a/README.md b/README.md new file mode 100644 index 0000000000000..5d06c174fb69e --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +[![Build Status](https://travis-ci.org/vlsi/postgres.svg?branch=travis)](https://travis-ci.org/vlsi/postgres) + +PostgreSQL Database Management System +===================================== + +This directory contains the source code distribution of the PostgreSQL +database management system. + +PostgreSQL is an advanced object-relational database management system +that supports an extended subset of the SQL standard, including +transactions, foreign keys, subqueries, triggers, user-defined types +and functions. This distribution also contains C language bindings. + +PostgreSQL has many language interfaces, many of which are listed here: + + http://www.postgresql.org/download + +See the file INSTALL for instructions on how to build and install +PostgreSQL. That file also lists supported operating systems and +hardware platforms and contains information regarding any other +software packages that are required to build or run the PostgreSQL +system. Copyright and license information can be found in the +file COPYRIGHT. A comprehensive documentation set is included in this +distribution; it can be read as described in the installation +instructions. + +The latest version of this software may be obtained at +http://www.postgresql.org/download/. For more information look at our +web site located at http://www.postgresql.org/.