summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 30f9cc355f4e95f7734f0b68f7a9fd64ccddb18b (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
sudo: false
dist: trusty
language: perl
perl:
    # ~stretch
    - "5.24-shrplib"
    # ~xenial
    # - "5.22-shrplib"
    # ~jessie
    # - "5.20-shrplib"
    # ~trusty
    # - "5.18-shrplib"
    - "system-perl"
env:
    - CC=clang UNITTESTS=false
    - CC=gcc   UNITTESTS=false
    - CC=clang UNITTESTS=true
matrix:
    exclude:
        - env: CC=clang UNITTESTS=true
          perl: "system-perl"
    allow_failures:
        - env: CC=clang UNITTESTS=true

addons:
    apt:
        packages:
            - libperl-dev
            - elinks
            - libgcrypt11-dev

before_install:
    - perl -V
    - wget https://github.com/irssi-import/libotr/releases/download/4.1.1/travis-trusty-libotr-4.1.1.tar.gz
    - tar zxf travis-trusty-libotr*.tar.gz -C $HOME
    - ./autogen.sh --with-proxy --with-bot --with-perl=module --with-otr=yes --with-libotr-prefix=$HOME/otr-build/lib --with-libotr-inc-prefix=$HOME/otr-build/include
    - make dist
    - cd ..
    - tar xaf */irssi-*.tar.*
    - cd irssi-*

install:
    - ./configure --with-proxy --with-bot --with-perl=module --with-otr=yes --with-libotr-prefix=$HOME/otr-build/lib --with-libotr-inc-prefix=$HOME/otr-build/include --prefix=$HOME/irssi-build
      $( $UNITTESTS && echo --enable-always-build-tests )
    - make CFLAGS="-Wall -Werror -Werror=declaration-after-statement"
    - make install

before_script:
    - pushd ~
    - mkdir irssi-test
    - echo echo automated irssi launch test > irssi-test/startup;
      echo ^set settings_autosave off >> irssi-test/startup;
      echo ^set -clear log_close_string >> irssi-test/startup;
      echo ^set -clear log_day_changed >> irssi-test/startup;
      echo ^set -clear log_open_string >> irssi-test/startup;
      echo ^set log_timestamp '* ' >> irssi-test/startup;
      echo ^window log on >> irssi-test/startup
    - echo load perl >> irssi-test/startup
    - echo load proxy >> irssi-test/startup
    - echo ^quit >> irssi-test/startup

script:
    - irssi-build/bin/irssi --home irssi-test
    - popd
    - if $UNITTESTS; then make -C tests -sk check; fi

after_script:
    - cat ~/irc.log.*
    - find -name test-suite.log -exec cat {} +