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

language: c

compiler:
  - clang
  - gcc

cache:
  directories:
    - $HOME/cmocka

env:
  - CFLAGS="-W -Wall -Wextra -Wpedantic -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -Werror"

script:
  - make V=yes
  - CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" make check

notifications:
  email: false

addons:
  apt:
    packages:
      - libfreeimage-dev
      - libsdl2-ttf-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