-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
67 lines (63 loc) · 2.17 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
58
59
60
61
62
63
64
65
66
67
sudo: true
cache: ccache
language: C++
matrix:
include:
- os: linux
dist: bionic
env: CXX_COMPILER=g++-8
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-8
- pandoc
- libboost-all-dev
- os: linux
dist: bionic
env: CXX_COMPILER=g++-9
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-9
- pandoc
- libboost-all-dev
- os: linux
dist: bionic
compiler: clang++
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-9
- pandoc
- libboost-all-dev
# - os: osx
# osx_image: xcode10.3
# - os: osx
# osx_image: xcode11.2
before_install:
# We need to re-export CC and CXX here, because travis exports CXX=g++ or clang++ AFTER we set CXX.
- PATH=$HOME/local/bin:$PATH
- echo $PATH
- if [ -n "${C_COMPILER}" ]; then export CC="${C_COMPILER}"; fi
- if [ -n "${CXX_COMPILER}" ]; then export CXX="${CXX_COMPILER}"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install meson ccache && pip install requests; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip && unzip -q ninja-linux.zip -d ~/bin && pyenv local 3.7 && pip3 install meson requests; fi
script:
# build restbed
- git clone --recursive https://github.com/corvusoft/restbed.git
- mkdir restbed/build
- ( cd restbed/build ; cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTS=NO -DBUILD_SSL=NO -DCMAKE_INSTALL_PREFIX="$HOME/local/" .. ; make ; make install )
# build otcetera
- export CPPFLAGS="-I${HOME}/local/include"
- export LDFLAGS="-L${HOME}/local/lib -L${HOME}/local/library"
- if ! meson build --prefix=$HOME/local ; then cat build/meson-logs/meson-log.txt ; exit 1 ; fi
- ninja -C build install
# test otcetera
- export LD_LIBRARY_PATH="${HOME}/local/lib:${HOME}/local/library"
- if ! ninja -C build test ; then cat build/meson-logs/testlog.txt ; exit 1 ; fi