Added clang-5 and gcc-7 Travis build configurations.
[platform/upstream/libexif.git] / .travis.yml
1 # Travis CI configuration file
2
3 sudo: false
4
5 language: c
6
7 # Install autopoint on Ubuntu (needed for gettext)
8 addons:
9   apt:
10     packages:
11     - autopoint
12
13 env:
14   # More configurations are configured in the matrix section
15   matrix:
16     - CONFIG=normal
17     - CONFIG=c90
18     - CONFIG=stackprotect
19   global:
20     - MAKEFLAGS='-j 2'
21
22 matrix:
23   include:
24   - os: linux
25     addons:
26       apt:
27         sources:
28           - llvm-toolchain-trusty-5.0
29         packages:
30           - autopoint
31           - clang-5.0
32     compiler: clang
33     env:
34       - CONFIG=clang5
35   - os: linux
36     addons:
37       apt:
38         sources:
39           - ubuntu-toolchain-r-test
40         packages:
41           - autopoint
42           - g++-7
43     compiler: gcc
44     env:
45       - CONFIG=gcc7
46
47 script:
48   # Ensure brew gettext is in the PATH so autopoint is found on OS X
49   - PATH="$PATH:/usr/local/opt/gettext/bin" autoreconf -sivf
50   - if [ "$CONFIG" = "normal" ] ; then CFLAGS='-Wall -Wextra -O3'; fi
51   - if [ "$CONFIG" = "c90" ] ; then CFLAGS='-std=iso9899:1990 -D_XOPEN_SOURCE=500 -Wall -Wextra -O3'; fi
52   - if [ "$CONFIG" = "stackprotect" ] ; then CFLAGS='-g -O0 -fstack-protector-all'; fi
53   - if [ "$CONFIG" = "clang5" ] ; then CFLAGS='-Wall -Wextra -O3'; export CC=clang-5.0; fi
54   - if [ "$CONFIG" = "gcc7" ] ; then CFLAGS='-Wall -Wextra -O3'; export export CC=gcc-7; fi
55   - ./configure --prefix="${HOME}" CFLAGS="$CFLAGS" || { tail -300 config.log; false; }
56   - make
57   - make check
58   - make install
59
60 compiler:
61   - clang
62   - gcc
63
64 os:
65   - linux
66   - osx