summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 38b72d547465e13862df36a0c8b5af08663203a2 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
language: cpp

jobs:
  include:
    # Ubuntu Bionic (18.04) with GCC 7
    - os: linux
      dist: bionic
      addons:
        apt:
          sources:
            - sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
          packages:
            - libgtest-dev
            - libboost-dev
            - python3.6
            - python3-urllib3
            - ninja-build
      before_install:
        - wget https://bootstrap.pypa.io/get-pip.py
        - /usr/bin/python3.6 get-pip.py --user --no-cache-dir
      install:
        - /usr/bin/python3.6 $HOME/.local/bin/pip install --user meson --no-cache-dir
      env:
        - MATRIX_EVAL="export PATH=\$HOME/.local/bin:\$PATH"

    # Ubuntu Bionic (18.04) with GCC 7 on big-endian
    - os: linux
      arch: s390x
      dist: bionic
      addons:
        apt:
          sources:
            - sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
          packages:
            - libgtest-dev
            - libboost-dev
            - python3.6
            - python3-urllib3
            - ninja-build
      before_install:
        - wget https://bootstrap.pypa.io/get-pip.py
        - /usr/bin/python3.6 get-pip.py --user --no-cache-dir
      install:
        - /usr/bin/python3.6 $HOME/.local/bin/pip install --user meson --no-cache-dir
      env:
        - MATRIX_EVAL="export PATH=\$HOME/.local/bin:\$PATH"

    # Ubuntu Bionic (18.04) with GCC 7 on ARM64
    - os: linux
      arch: arm64
      dist: bionic
      addons:
        apt:
          sources:
            - sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
          packages:
            - libgtest-dev
            - libboost-dev
            - python3.6
            - python3-urllib3
            - ninja-build
      before_install:
        - wget https://bootstrap.pypa.io/get-pip.py
        - /usr/bin/python3.6 get-pip.py --user --no-cache-dir
      install:
        - /usr/bin/python3.6 $HOME/.local/bin/pip install --user meson --no-cache-dir
      env:
        - MATRIX_EVAL="export PATH=\$HOME/.local/bin:\$PATH"

    # Ubuntu Trusty (16.04) with GCC 6
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - sourceline: 'ppa:mhier/libboost-latest'
            - sourceline: 'ppa:mstipicevic/ninja-build-1-7-2'
            - sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
          packages:
            - g++-6
            - libgtest-dev
            - boost1.67
            - python3.6
            - python3-urllib3
            - ninja-build
      before_install:
        - wget https://bootstrap.pypa.io/get-pip.py
        - /usr/bin/python3.6 get-pip.py --user --no-cache-dir
      install:
        - /usr/bin/python3.6 $HOME/.local/bin/pip install --user meson --no-cache-dir
      env:
        # use gold as workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=17068
        - MATRIX_EVAL="export CC='ccache gcc-6' CXX='ccache g++-6' LDFLAGS=-fuse-ld=gold PATH=\$HOME/.local/bin:\$PATH"

    # Ubuntu Trusty (16.04) with GCC 8
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - sourceline: 'ppa:mhier/libboost-latest'
            - sourceline: 'ppa:mstipicevic/ninja-build-1-7-2'
            - sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
          packages:
            - g++-8
            - libgtest-dev
            - boost1.67
            - python3.6
            - python3-urllib3
            - ninja-build
      before_install:
        - wget https://bootstrap.pypa.io/get-pip.py
        - /usr/bin/python3.6 get-pip.py --user --no-cache-dir
      install:
        - /usr/bin/python3.6 $HOME/.local/bin/pip install --user meson --no-cache-dir
      env:
        # use gold as workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=17068
        - MATRIX_EVAL="export CC='ccache gcc-8' CXX='ccache g++-8' LDFLAGS=-fuse-ld=gold PATH=\$HOME/.local/bin:\$PATH"

    - os: osx
      osx_image: xcode9.4
      addons:
        homebrew:
          packages:
            - ccache
            - meson
          update: true
      env:
        - MATRIX_EVAL="export PATH=/usr/local/opt/ccache/libexec:$PATH HOMEBREW_NO_ANALYTICS=1"

cache:
  apt: true
  ccache: true
  directories:
    - $HOME/Library/Caches/Homebrew

before_cache:
  - test "$TRAVIS_OS_NAME" != "osx" || brew cleanup

before_install:
  - eval "${MATRIX_EVAL}"

install:
  # C++14

  # Work around "Target /usr/local/lib/libgtest.a is a symlink
  # belonging to nss. You can unlink it" during gtest install
  - test "$TRAVIS_OS_NAME" != "osx" || brew unlink nss

  - test "$TRAVIS_OS_NAME" != "osx" || brew install https://gist.githubusercontent.com/Kronuz/96ac10fbd8472eb1e7566d740c4034f8/raw/gtest.rb

before_script:
  - ccache -s

script:
  - eval "${MATRIX_EVAL}"
  - OPTIONS="-Dtest=true"
  - meson . output --werror $OPTIONS
  - ninja -C output -v test
  - ccache -s