Merge branch 'lexer-c' of https://github.com/zsugabubus/vis
[vis.git] / .travis.yml
blobab0dd7df9ff8e6388c5b2ea7598798b2fbee2834
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
51     - libtool-bin
53 cache:
54   directories:
55     - $HOME/.cache/vis
57 before_install:
58   - mkdir -p "$HOME/.cache/vis/sources" && mkdir dependency && ln -s "$HOME/.cache/vis/sources" dependency/sources
60 install:
61   - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
62       brew update &&
63       brew install libtermkey lua luarocks tre &&
64       luarocks install lpeg &&
65       luarocks install busted;
66     fi
68 script:
69   - id
70   - env
71   - locale
72   - tty || true
73   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
74       make local && make clean;
75     fi
76   - ./configure CFLAGS="-I$(pwd)/dependency/install/usr/include" LDFLAGS="-L$(pwd)/dependency/install/usr/lib" $CONFIG
77   - make CFLAGS_EXTRA=--coverage $TARGET
78   - if [ -e vis ]; then
79       LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" ./vis -v;
80       file vis;
81       size vis;
82       if [ "$TRAVIS_OS_NAME" = "osx" ]; then
83         otool -L vis;
84       else
85         ldd vis;
86       fi
87     fi
88   - make -C test/core coverage
89   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/lua
90   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vis
91   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/sam
92   - test ! -e vis || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vim
94 after_success:
95   - bash <(curl -s https://codecov.io/bash)