1 # Travis CI configuration file
10 # Install autopoint on Ubuntu (needed for gettext)
17 # More configurations are configured in the matrix section
39 - llvm-toolchain-trusty-6.0
40 - ubuntu-toolchain-r-test
51 - ubuntu-toolchain-r-test
62 - llvm-toolchain-trusty-6.0
63 - ubuntu-toolchain-r-test
69 # Required for -fsanitize=undefined
70 # see https://github.com/travis-ci/travis-ci/issues/9033
87 if [ "$CONFIG" = "coverage" ] ; then
89 pip install --user cpp-coveralls
91 git clone --depth=1 https://github.com/libexif/libexif-testsuite.git
94 ln -s "$TRAVIS_BUILD_DIR" src/libexif
97 cd "$TRAVIS_BUILD_DIR"
101 # Ensure brew gettext is in the PATH so autopoint is found on OS X
102 - PATH="$PATH:/usr/local/opt/gettext/bin" autoreconf -sivf
103 - if [ "$CONFIG" = "normal" ] ; then CFLAGS='-Wall -Wextra -O3'; fi
104 - if [ "$CONFIG" = "c90" ] ; then CFLAGS='-std=iso9899:1990 -D_XOPEN_SOURCE=500 -Wall -Wextra -O3'; fi
105 - if [ "$CONFIG" = "stackprotect" ] ; then CFLAGS='-g -O0 -fstack-protector-all'; fi
106 - if [ "$CONFIG" = "clang6" ] ; then CFLAGS='-Wall -Wextra -O3'; export CC=clang-6.0; fi
107 - if [ "$CONFIG" = "gcc8" ] ; then CFLAGS='-Wall -Wextra -O3'; export export CC=gcc-8; fi
108 - if [ "$CONFIG" = "sanitize" ] ; then CFLAGS='-g -Wall -Wextra -fsanitize=address -fsanitize=undefined'; export CC=clang-6.0; fi
109 - if [ "$CONFIG" = "coverage" ] ; then cd "$HOME"/libexif-testsuite; CFLAGS=--coverage; LDFLAGS=--coverage; fi
110 - ./configure --prefix="${HOME}"/install CFLAGS="$CFLAGS" ${LDFLAGS:+LDFLAGS=$LDFLAGS} || { tail -300 config.log; false; }
112 - make check || { tail -300 test*/test-suite.log; false; }
114 - if [ "$CONFIG" = "coverage" ] ; then cd "$TRAVIS_BUILD_DIR"; fi
117 - if [ "$CONFIG" = "coverage" ] ; then coveralls --build-root libexif --exclude test --exclude contrib --gcov-options '\-lp'; fi