-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
37 lines (32 loc) · 1.24 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
---
language: c++
compiler: clang
addons:
apt:
packages:
- libcap-dev
- libopus-dev
- libvpx-dev
cache:
directories:
- $HOME/cache
install:
# Where to find libraries.
- export LD_LIBRARY_PATH="$HOME/cache/usr/lib"
- export PKG_CONFIG_PATH="$HOME/cache/usr/lib/pkgconfig"
- export CPPFLAGS="-I$HOME/cache/usr/include"
- export LDFLAGS="-L$HOME/cache/usr/lib"
# c-sodium
- git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium
- test -f $HOME/cache/usr/lib/libsodium.so || (cd libsodium && ./configure --prefix=$HOME/cache/usr && make install -j$(nproc))
# c-toxcore
- git clone --depth=1 https://github.com/TokTok/c-toxcore
- test -f $HOME/cache/usr/lib/libtoxcore.so || (cd c-toxcore && cmake -B_build -H. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/cache/usr && make -C_build install -j$(nproc))
# nlohmann-json
- mkdir -p $HOME/cache/usr/include/nlohmann
- wget https://raw.githubusercontent.com/nlohmann/json/develop/single_include/nlohmann/json.hpp -O $HOME/cache/usr/include/nlohmann/json.hpp
script:
- make -k -j$(nproc) && make check
# Only build pull requests and releases, don't build master on pushes,
# except through api or cron.
if: type IN (pull_request, api, cron) OR tag IS present