forked from matthijs/sqlpp11-connector-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (38 loc) · 1.69 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
language: cpp
sudo: required
compiler:
#- clang
- gcc
notifications:
email:
on_success: change
on_failure: always
install:
# install a newer cmake since at this time Travis only has version 2.8
- CMAKE_VERSION_MM=3.4
- CMAKE_VERSION_FULL=$CMAKE_VERSION_MM.1
- cd ..
- git clone --branch v1.0.0 --depth 1 https://github.com/HowardHinnant/date
- cd sqlpp11-connector-postgresql
- wget --no-check-certificate http://www.cmake.org/files/v${CMAKE_VERSION_MM}/cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh
- sudo sh cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository -y ppa:apokluda/boost1.53
- sudo apt-get update -qq
- sudo apt-get install g++-4.9 libboost1.53-dev libpq-dev postgresql-server-dev-all --no-install-recommends
- sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.6
- sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.9
- sudo update-alternatives --quiet --set gcc /usr/bin/gcc-4.9
- cd ..
- git clone --branch develop --depth 1 https://github.com/rbock/sqlpp11.git
- cd sqlpp11
- cmake . -DHinnantDate_ROOT_DIR="$PWD/../date"
- sudo make install
- cd ..
- cd sqlpp11-connector-postgresql
before_script:
- mkdir build
- cd build
- cmake .. -DCMAKE_PREFIX_PATH="/usr/local/" -DHinnantDate_ROOT_DIR="$PWD/../../date"
script:
- cmake --build .