build: add a make docker target
[vis.git] / .travis.yml
blob8ec0eb801d2a46d2c43ae40c4510306fa70fe74c
1 language: c
3 matrix:
4   include:
5     - os: linux
6       compiler: gcc
7       env: TARGET=
8     - os: linux
9       compiler: clang
10       env: TARGET=
11     - os: linux
12       compiler: gcc
13       env: TARGET=debug
14     - os: linux
15       compiler: clang
16       env: TARGET=debug
17     - os: linux
18       compiler: gcc
19       env: TARGET=clean
20     - os: linux
21       compiler: gcc
22       env: TARGET= CONFIG=--disable-curses
23     - os: linux
24       compiler: gcc
25       env: TARGET= CONFIG=--disable-lua
26     - os: linux
27       compiler: gcc
28       env: TARGET= CONFIG=--disable-tre
29     - os: osx
30       compiler: clang
31       env: TARGET=
32     - os: osx
33       compiler: clang
34       env: TARGET=debug
35     - os: osx
36       compiler: clang
37       env: TARGET= CONFIG=--disable-curses
38     - os: osx
39       compiler: clang
40       env: TARGET= CONFIG=--disable-lua
41     - os: osx
42       compiler: clang
43       env: TARGET= CONFIG=--disable-tre
45 addons:
46   apt:
47     packages:
48     - 9base
49     - libacl1-dev
50     - libtre-dev
52 cache:
53   directories:
54     - $HOME/.cache/vis
56 before_install:
57   - mkdir -p "$HOME/.cache/vis/sources" && mkdir dependency && ln -s "$HOME/.cache/vis/sources" dependency/sources
59 install:
60   - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
61       brew update &&
62       brew install libtermkey lua tre plan9port &&
63       luarocks install lpeg &&
64       luarocks install busted;
65     fi
67 script:
68   - id
69   - env
70   - locale
71   - tty || true
72   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
73       make local && make clean;
74     fi
75   - ./configure CFLAGS="-I$(pwd)/dependency/install/usr/include" LDFLAGS="-L$(pwd)/dependency/install/usr/lib" $CONFIG
76   - make CFLAGS_EXTRA=--coverage $TARGET
77   - if [ -e vis ]; then
78       LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" ./vis -v;
79       file vis;
80       size vis;
81       if [ "$TRAVIS_OS_NAME" = "osx" ]; then
82         otool -L vis;
83       else
84         ldd vis;
85       fi
86     fi
87   - make -C test/core coverage
88   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/lua
89   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vis
90   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/sam
91   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vim
93 after_success:
94   - bash <(curl -s https://codecov.io/bash)