summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 4beb5a5e39dacdf817df875ac63e4ed1e6f7d57c (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
# see
#   http://docs.travis-ci.com/user/getting-started/
#   http://docs.travis-ci.com/user/languages/c/
#   http://docs.travis-ci.com/user/build-configuration/
#   http://docs.travis-ci.com/user/multi-os/
#   https://docs.travis-ci.com/user/build-matrix/
#

# focal: Ubuntu 20.04 LTS
# bionic: Ubuntu 18.04 LTS
dist: focal

language: c

branches:
  only:
    - master

matrix:
  include:
    - name: "gcc on Linux"
      os: linux
      compiler: gcc
    - name: "clang on Linux"
      os: linux
      compiler: clang
    - name: "c++ on Linux"
      os: linux
      compiler: c++
    - name: "clang on OSX"
      os: osx
      compiler: clang
    - name: "cmake on Linux"
      os: linux
      compiler: gcc
      env: BUILD_CMAKE=yes EXPERIMENTAL=yes
    - name: "clang ASAN on Linux"
      os: linux
      compiler: clang
      env: CFLAGS="-fsanitize=address -O1 -fno-omit-frame-pointer -g3"
    - name: "gcc on Linux ppc"
      os: linux
      compiler: gcc
      arch: ppc64le
      dist: bionic
      env: EXPERIMENTAL=yes
    - name: "gcc on Linux arm"
      os: linux
      compiler: gcc
      arch: arm64
      dist: bionic
      env: EXPERIMENTAL=yes
    # windows env has no automake, autoconf via chocolately
    # - name: "windows"
    #   os: windows
    #   env: EXPERIMENTAL=yes
  allow_failures:
    - env: EXPERIMENTAL=yes

install:
  - |
    if [ "$TRAVIS_OS_NAME" = "" ]; then TRAVIS_OS_NAME=linux; fi
    case "$TRAVIS_OS_NAME" in
      linux)
        sudo apt-get update -qq -y
        sudo apt-get install -qq -y gtk-doc-tools libyajl-dev
        ./scripts/install-bison3.sh
        ;;
      osx)
        brew install bison gtk-doc yajl
        ln -sf /usr/local/Cellar/bison/*/bin/bison /usr/local/bin/bison
        ./scripts/install-bison3.sh
        ;;
      windows)
        choco install WinFlexBison
        BUILD_CNAME="yes"
        ;;
    esac

script:
  - |
    env | sort
    ./autogen.sh --disable-gtk-doc
    if [ "$BUILD_CMAKE" = yes ]; then
      mkdir -p work && cd work && cmake .. && make && ctest
    else
      make && make test
    fi