|
1 | 1 | # Control file for continuous integration testing at http://travis-ci.org/ |
2 | 2 |
|
3 | 3 | language: c |
4 | | -compiler: |
5 | | - - clang |
6 | | - - gcc |
7 | | - |
8 | | -os: |
9 | | - - linux |
10 | | - - osx |
11 | | - |
12 | | -env: |
13 | | - - USE_CONFIG=no |
14 | | - - USE_CONFIG=yes |
15 | 4 |
|
16 | 5 | matrix: |
17 | 6 | include: |
18 | 7 | - compiler: gcc |
19 | 8 | os: linux |
20 | | - env: USE_CONFIG=yes USE_LIBDEFLATE=yes |
| 9 | + env: DO_MAINTAINER_CHECKS=yes USE_CONFIG=no |
| 10 | + |
| 11 | + - compiler: gcc-8 |
| 12 | + os: linux |
| 13 | + env: USE_CONFIG=yes CC=gcc-8 AR=gcc-ar-8 |
| 14 | + addons: |
| 15 | + apt: |
| 16 | + sources: |
| 17 | + - ubuntu-toolchain-r-test |
| 18 | + packages: |
| 19 | + - gcc-8 |
| 20 | + |
| 21 | + # An optimised build with address and leak checking, also using libdeflate |
| 22 | + - compiler: gcc-8 |
| 23 | + os: linux |
| 24 | + dist: xenial |
| 25 | + env: USE_CONFIG=yes USE_LIBDEFLATE=yes CC=gcc-8 AR=gcc-ar-8 CFLAGS="-g -Wall -O3 -fsanitize=address" LDFLAGS="-fsanitize=address" |
| 26 | + addons: |
| 27 | + apt: |
| 28 | + sources: |
| 29 | + - ubuntu-toolchain-r-test |
| 30 | + packages: |
| 31 | + - gcc-8 |
| 32 | + |
| 33 | + - compiler: clang |
| 34 | + os: osx |
| 35 | + env: USE_CONFIG=no |
| 36 | + |
| 37 | + - compiler: clang |
| 38 | + os: osx |
| 39 | + env: USE_CONFIG=yes |
| 40 | + |
21 | 41 | - compiler: clang |
22 | 42 | os: osx |
23 | 43 | env: USE_CONFIG=yes USE_LIBDEFLATE=yes |
24 | 44 |
|
25 | | -# For linux systems |
26 | | -addons: |
27 | | - apt: |
28 | | - packages: |
29 | | - - liblzma-dev |
30 | | - - libbz2-dev |
| 45 | + - compiler: gcc |
| 46 | + os: linux |
| 47 | + env: USE_CONFIG=yes |
| 48 | + |
| 49 | + - compiler: clang |
| 50 | + os: linux |
| 51 | + env: USE_CONFIG=yes |
| 52 | + |
| 53 | + - compiler: gcc |
| 54 | + os: linux |
| 55 | + env: CFLAGS="-std=c99 -pedantic" USE_CONFIG=yes |
31 | 56 |
|
32 | 57 | # For MacOSX systems |
33 | 58 | before_install: |
34 | | - - if [[ "$TRAVIS_OS_NAME" == "osx" && "$USE_CONFIG" == "no" ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install xz || ( brew update && brew install xz ); fi |
| 59 | + - | |
| 60 | + if [[ "$TRAVIS_OS_NAME" == "osx" && "$USE_CONFIG" == "no" ]]; then |
| 61 | + HOMEBREW_NO_AUTO_UPDATE=1 brew install xz || ( brew update && brew install xz ) |
| 62 | + fi |
35 | 63 |
|
36 | 64 | before_script: |
37 | | - - if test "x$USE_LIBDEFLATE" == "xyes" ; then ( cd "$HOME" && git clone --depth 1 https://github.com/ebiggers/libdeflate.git && cd libdeflate && make -j 2 CFLAGS='-fPIC -O3' libdeflate.a ); fi |
| 65 | + - | |
| 66 | + if test "x$USE_LIBDEFLATE" == "xyes"; then |
| 67 | + pushd "$HOME" && \ |
| 68 | + git clone --depth 1 https://github.com/ebiggers/libdeflate.git && \ |
| 69 | + pushd libdeflate && \ |
| 70 | + make -j 2 CFLAGS='-fPIC -O3' libdeflate.a && \ |
| 71 | + popd && \ |
| 72 | + popd |
| 73 | + fi |
38 | 74 |
|
39 | 75 | script: |
40 | | - - if test "x$USE_LIBDEFLATE" = "xyes" ; then CONFIG_OPTS='CPPFLAGS="-I$HOME/libdeflate" LDFLAGS="-L$HOME/libdeflate" --with-libdeflate' ; else CONFIG_OPTS='--without-libdeflate' ; fi |
41 | | - - if test "$USE_CONFIG" = "yes" ; then autoreconf && eval ./configure $CONFIG_OPTS || { cat config.log ; false ; } ; fi && make -j 2 -e && make test |
| 76 | + - | |
| 77 | + if test "x$USE_LIBDEFLATE" = "xyes"; then |
| 78 | + CONFIG_OPTS='CPPFLAGS="-I$HOME/libdeflate" LDFLAGS="$LDFLAGS -L$HOME/libdeflate" --with-libdeflate' |
| 79 | + else |
| 80 | + CONFIG_OPTS='--without-libdeflate' |
| 81 | + fi |
| 82 | + - | |
| 83 | + if test "$USE_CONFIG" = "yes"; then |
| 84 | + MAKE_OPTS= ; |
| 85 | + autoreconf && \ |
| 86 | + eval ./configure --enable-werror $CONFIG_OPTS CFLAGS=\"-g -O3 $CFLAGS\" || \ |
| 87 | + ( cat config.log; false ) |
| 88 | + else |
| 89 | + MAKE_OPTS=-e |
| 90 | + fi && \ |
| 91 | + if test "x$DO_MAINTAINER_CHECKS" = "xyes"; then |
| 92 | + make maintainer-check |
| 93 | + fi && \ |
| 94 | + make -j 2 $MAKE_OPTS && \ |
| 95 | + make test-shlib-exports && \ |
| 96 | + make test |
0 commit comments