~octaspire/dern

dern/.travis.yml -rw-r--r-- 1.4 KiB View raw
0c4866a3octaspire Fix compiler warnings and an error on some plugins in NetBSD 1 year, 5 months ago
                                                                                
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
language: c

os:
    - linux
    - osx

compiler:
    - clang
    - gcc

before_install:
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -q; sudo apt-get install gdb lcov libegl1-mesa-dev libgles2-mesa-dev; sudo apt-get install valgrind libncursesw5-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev -y; fi
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ncurses sdl2 sdl2_image sdl2_mixer sdl2_ttf; fi

before_script:
    - DERN_TRAVIS_BUILD_DIR=$(pwd)

script:
    - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "gcc" ]]; then ulimit -c unlimited -S; make valgrind coverage; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" != "gcc" ]]; then ulimit -c unlimited -S; make valgrind; fi
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make test; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "gcc" ]]; then cd release; gcov octaspire-dern-amalgamated.gcno; cd ..; fi

after_success:
    - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "gcc" ]]; then bash <(curl -s https://codecov.io/bash); fi

# 'after_failure'-hook in modified form from:
# jsteemann.github.io/blog/2014/10/30/getting-core-dumps-of-failed-travisci-builds/
after_failure:
    - cd "$DERN_TRAVIS_BUILD_DIR"
    - COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1)
    - if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" octaspire-dern-unit-test-runner -ex "thread apply all bt" -ex "set pagination 0" -batch; fi