aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 17303cc8f8ccbed54da4266d1a7beed1c015eb6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: c

matrix:
  include:
    - os: linux
      compiler: gcc
      env: TARGET=
    - os: linux
      compiler: gcc
      env: TARGET=debug
    - os: linux
      compiler: gcc
      env: TARGET=coverage
    - os: linux
      compiler: clang
      env: TARGET=
    - os: linux
      compiler: clang
      env: TARGET=debug
    - os: osx
      compiler: clang
      env: TARGET=
    - os: osx
      compiler: clang
      env: TARGET=debug
    - os: osx
      compiler: clang
      env: TARGET=coverage

cache:
  directories:
    - $HOME/.cache/vis

before_install:
  - mkdir -p "$HOME/.cache/vis/sources" && mkdir dependency && ln -s "$HOME/.cache/vis/sources" dependency/sources

install:
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      brew update &&
      brew install libtermkey &&
      brew install lua &&
      luarocks install lpeg;
      if [ "$TARGET" = "coverage" ]; then
        brew install plan9port;
      fi
    fi

script:
  - id
  - env
  - locale
  - tty || true
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      ./configure && make $TARGET;
    else
      make local && make clean && make $TARGET;
    fi
  - file vis
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      otool -L vis;
    else
      ldd vis;
    fi
  - size vis
  - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" ./vis -v
  - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/core $TARGET
  - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/lua
  - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vis
  - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/sam
  - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vim

after_success:
  - if [ "$TARGET" = "coverage" ]; then
      bash <(curl -s https://codecov.io/bash);
    fi