forked from ossc-db/pg_rman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (51 loc) · 2.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
before_install:
- psql --version
- sudo service postgresql stop
- sudo apt-get -y --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
- sudo rm -rf /var/lib/postgresql
- sudo apt-get update -qq
- sudo apt-get -y install bc libpam-dev libedit-dev
- git clone https://github.com/postgres/postgres.git postgres-dev
- cd postgres-dev
- export POSTGRES_HOME=/home/travis/build/ossc-db/pg_rman/pgsql/$PGVERSION
- echo 'export POSTGRES_HOME=/home/travis/build/ossc-db/pg_rman/pgsql/$PGVERSION' >> ~/.bashrc
- ./configure --prefix=$POSTGRES_HOME
- make -j 2
- make install
- echo 'export PATH=$PATH:$POSTGRES_HOME/bin' >> ~/.bashrc
- export PATH=$PATH:$POSTGRES_HOME/bin
- echo 'export PGDATA=/home/travis/build/ossc-db/pg_rman/pg_data/$PGVERSION' >> ~/.bashrc
- export PGDATA=/home/travis/build/ossc-db/pg_rman/pg_data/$PGVERSION
- mkdir -p $PGDATA
- mkdir -p /home/travis/build/ossc-db/pg_rman/pg_data/archivelog
- initdb --no-locale -D $PGDATA
- sudo echo "local all postgres trust" > $PGDATA/pg_hba.conf
- sudo echo "local all all trust" >> $PGDATA/pg_hba.conf
- sudo echo "host all all 127.0.0.1/32 trust" >> $PGDATA/pg_hba.conf
- sudo echo "host all all ::1/128 trust" >> $PGDATA/pg_hba.conf
- sudo echo "logging_collector = on" >> $PGDATA/postgresql.conf
- sudo echo "wal_level = replica" >> $PGDATA/postgresql.conf
- sudo echo "archive_mode = on" >> $PGDATA/postgresql.conf
- sudo echo "archive_command = 'cp %p /home/travis/build/ossc-db/pg_rman/pg_data/archivelog/%f'" >> $PGDATA/postgresql.conf
- pg_ctl -V
- pg_ctl -D $PGDATA start
before_script:
- cd /home/travis/build/ossc-db/pg_rman
- git clone https://github.com/ossc-db/pg_rman.git pg_rman
- cd pg_rman && git describe --alway
- make
- make install
env:
matrix:
- PGVERSION=12
language: cpp
compiler:
# - clang
- gcc
script: make installcheck
after_script:
- cat /home/travis/build/ossc-db/pg_rman/pg_rman/regression.diffs
notifications:
email:
on_success: change
on_failure: always