summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 0e56ad7b9496db7ca7ae45809c4ef61680454c85 (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
# For Pull Requests, we build only the first three jobs: autotools on Linux,
# cmake on Linux, and cmake on Windows 32 bit.
#
# For branch builds and cron builds (once a day), we build all the jobs. This
# is achieved using the "if: type IN (push, api, cron)" fields in the matrix.

language: c

matrix:
  include:
  - stage: "Stage 1"
    env: JOB=toxcore ENV=linux
    compiler: clang
    addons:
      apt: &apt-dependencies
        sources:
        - avsm
        - hvr-ghc
        packages:
        - alex-3.1.7            # For hstox.
        - cabal-install-1.18    # For hstox.
        - check                 # For tests.
        - ghc-7.8.4             # For hstox.
        - happy-1.19.5          # For hstox.
        - libcv-dev             # For av_test.
        - libhighgui-dev        # For av_test.
        - libopencv-contrib-dev # For av_test.
        - libsndfile1-dev       # For av_test.
        - libvpx-dev            # For toxav.
        - opam                  # For apidsl and Frama-C.
        - aspcud                # For Opam
        - portaudio19-dev       # For av_test.
        - texinfo               # For libconfig.
  - stage: "Stage 1"
    if: type IN (push, api, cron)
    env: JOB=autotools ENV=linux
    compiler: gcc
    addons:
      apt: *apt-dependencies
  - stage: "Stage 1"
    if: type IN (push, api, cron)
    env: JOB=toxcore ENV=windows ARCH=i686
    group: deprecated-2017Q4
    services:
    - docker
  - stage: "Stage 1"
    if: type IN (push, api, cron)
    env: JOB=toxcore ENV=windows ARCH=x86_64
    group: deprecated-2017Q4
    services:
    - docker
  - stage: "Stage 1"
    if: type IN (push, api, cron)
    env: JOB=toxcore ENV=freebsd
    dist: trusty
    sudo: required
    install:       other/travis/phase $JOB $ENV install       stage1
    script:        other/travis/phase $JOB $ENV script        stage1
  - stage: "Stage 1"
    if: type IN (push, api, cron)
    env: JOB=tox-bootstrapd-docker ENV=linux
    services:
    - docker
    sudo: required
  - stage: "Stage 2"
    if: type IN (push, api, cron)
    env: JOB=toxcore ENV=freebsd
    dist: trusty
    sudo: required
    install:       other/travis/phase $JOB $ENV install       stage2
  - stage: "Stage 2"
    if: type IN (push, api, cron)
    env: JOB=toxcore ENV=osx RUN_TESTS=true
    os: osx
  fast_finish: true

cache:
  directories:
  # Although Travis documentation says not to rely on the value of $HOME, we
  # rely on it here because cabal installs its packages there by default. If
  # that ever changes, these values need to be updated.
  # Note that we can't use shell expressions in these paths, so we can't ask
  # cabal where its data is stored.
  - $HOME/.cabal
  - $HOME/.ghc
  - $HOME/cache
  - /opt/freebsd/cache

install:       other/travis/phase $JOB $ENV install
script:        other/travis/phase $JOB $ENV script
after_script:  other/travis/phase $JOB $ENV after_script
after_failure: other/travis/phase $JOB $ENV after_failure

notifications:
  irc:
    channels:
    - "chat.freenode.net#toktok-status"
    template:
    - "%{result} %{repository_name} %{build_url}"
    - "#%{build_number} changes: %{compare_url}"

branches:
  only:
  - master