Skip to content

Commit 9c5d569

Browse files
committed
fix postgresql on travis
1 parent 4dd8c9f commit 9c5d569

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ branches:
44
only:
55
- master
66

7+
dist: trusty
8+
9+
services:
10+
- postgresql
11+
712
env:
813
global:
914
- CMAKE_ARGS_ALL="-DBUILD_EXAMPLES=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/share/postgresql/"
@@ -36,7 +41,7 @@ install:
3641

3742
before_script:
3843
- mkdir build && cd build && cmake -DCMAKE_C_COMPILER=$CMAKE_CC -DCMAKE_CXX_COMPILER=$CMAKE_CXX $CMAKE_ARGS $CMAKE_ARGS_ALL -DTEST_DATABASE=$DB ..
39-
- if [ "$DB" == "postgresql" ]; then psql -c "CREATE DATABASE $USER;" -U postgres; fi
44+
- if [ "$DB" == "postgresql" ]; then psql -c "CREATE DATABASE $USER;" -U postgres || true; fi
4045
- if [ "$DB" == "mysql" ]; then mysql -e "CREATE DATABASE test;"; fi
4146

4247
script:

0 commit comments

Comments
 (0)