about summary refs log tree commit diff stats
path: root/.travis.yml
blob: 71f450d4b54575b59642cdf3835fbbcdbe8e0705 (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
dist: bionic
language: bash

services:
  - docker # Linux tests are run in Docker containers.

addons:
  homebrew:
    brewfile: Brewfile.travis # mac OS dependencies.
    # libsignal-protocol-c is still not in the Travis CI Homebrew snapshot, the
    # line below could be removed when the snapshot has been updated to speed up
    # the OSX job.
    update: true

matrix:
  include:
    - os: linux
      env: BUILD_FLAVOR=tumbleweed
    - os: linux
      env: BUILD_FLAVOR=debian
    - os: linux
      env: BUILD_FLAVOR=arch
    - os: linux
      env: BUILD_FLAVOR=fedora
    - os: osx
      env:
        # Ensure that "keg-only" Homebrew versions are used.
        - PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH"
        - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:$PKG_CONFIG_PATH"
        - PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig:$PKG_CONFIG_PATH"
        - PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"
        - PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
        - PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH"

before_install:
  - >
    if [ "$TRAVIS_OS_NAME" = "linux" ]; then
      # Ensure that Travis uses the latest version of Docker.
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
      sudo apt-get update
      sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
      docker build -f Dockerfile."$BUILD_FLAVOR" -t profanity .
    fi

script:
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
    docker run -it profanity ./ci-build.sh;
    fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
    ./ci-build.sh;
    fi

after_failure:
  - cat ./config.log
  - env