aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: a35bfcf33e19cc584944746ffc42367e00f48b52 (plain)
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
sudo: required
dist: trusty

language: c

compiler:
  - clang
  - gcc

cache:
  directories:
    - $HOME/cmocka

env:
  - CFLAGS="-W -Wall -Wextra -Wpedantic -Wpointer-arith -Wstrict-prototypes -Wshadow -Werror"

script:
  - sed -i 's/BACKEND_\(.*\)=no/BACKEND_\1=yes/' config.mk # Enable all backends for test build
  - make V=yes
  - CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" make check

notifications:
  email: false

addons:
  apt:
    packages:
      - libfreeimage-dev
      - libjpeg-turbo8-dev
      - libpng-dev
      - librsvg2-dev
      - libsdl2-ttf-dev
      - libtiff-dev

install:
  # Note: travis concatinates lines belonging to the same item
  - if [ ! -d $HOME/cmocka/cmocka-1.1.0 ];
    then
      curl "https://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz" | tar xJf - -C $HOME/cmocka &&
      cd $HOME/cmocka &&
      env CFLAGS="-O2 -pipe" cmake cmocka-1.1.0 &&
      env CFLAGS="-02 -pipe" make &&
      cd -;
    fi
  - sudo make -C $HOME/cmocka install
  - sudo ldconfig