aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/ci/travis.yml
blob: f8d640ef3192909fe832fb1c88351444b53cd74c (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
language: cpp

os:
  - osx
  - linux

dist: xenial
sudo: required

compiler:
  - clang
  - gcc

services:
  - docker

env:
  global:
    - CCACHE_MAXSIZE=800M
    - ANDROID_SDK_VER=21

  matrix:
    - BUILD_MODE="shared"
    - BUILD_MODE="coverage"
    - BUILD_MODE="fuzzers"
    - BUILD_MODE="valgrind"
    - ANDROID_ARCH=arm ANDROID_TOOLCHAIN_SUF=eabi BUILD_MODE="docker-android"
    - ANDROID_ARCH=arm64 BUILD_MODE="docker-android"
    - BUILD_MODE="cross-i386"
    - BUILD_MODE="cross-ppc32"
    - BUILD_MODE="cross-ppc64"
    - BUILD_MODE="cross-arm32"
    - BUILD_MODE="cross-arm64"
    - BUILD_MODE="cross-mips64"
    - BUILD_MODE="cross-win64"
    - BUILD_MODE="gcc4.8"
    - BUILD_MODE="static"
    - BUILD_MODE="mini-shared"
    - BUILD_MODE="bsi"
    - BUILD_MODE="nist"
    - BUILD_MODE="docs"
    - BUILD_MODE="lint"

matrix:
  exclude:
    # Skip GCC on OS X entirely
    - os: osx
      compiler: gcc

    # XCode 9.4 ICEs on 32-bit ARM builds
    - os: osx
      env: BUILD_MODE="cross-arm32"

    # Run static, docs, lint, bsi, nist, fuzzers, coverage, valgrind,
    # sanitizer, minimized and non-ARM cross builds only on Linux/gcc.
    # The sanitizer builds under Clang run the tests very slowly and
    # cause CI timeouts.

    - compiler: clang
      env: BUILD_MODE="static"
    - compiler: clang
      env: BUILD_MODE="bsi"
    - compiler: clang
      env: BUILD_MODE="nist"
    - compiler: clang
      env: BUILD_MODE="lint"
    - compiler: clang
      env: BUILD_MODE="docs"
    - compiler: clang
      env: BUILD_MODE="coverage"
    - compiler: clang
      env: BUILD_MODE="fuzzers"
    - compiler: clang
      env: BUILD_MODE="valgrind"
    - compiler: clang
      env: BUILD_MODE="mini-shared"
    - compiler: clang
      env: BUILD_MODE="cross-win64"
    - compiler: clang
      env: BUILD_MODE="cross-ppc32"
    - compiler: clang
      env: BUILD_MODE="cross-ppc64"
    - compiler: clang
      env: BUILD_MODE="cross-mips64"
    - compiler: clang
      env: BUILD_MODE="cross-i386"
    - compiler: clang
      env: BUILD_MODE="gcc4.8"

   # No ARM Clang compiler on Linux
    - os: linux
      compiler: clang
      env: BUILD_MODE="cross-arm32"
    - os: linux
      compiler: clang
      env: BUILD_MODE="cross-arm64"
    # No docker build on osx
    - os: osx
      env: BUILD_MODE="docker-android"
    # Nor for gcc's
    - compiler: gcc
      env: BUILD_MODE="docker-android"

install:
  - ./src/scripts/ci/setup_travis.sh

script:
  - ./src/scripts/ci_build.py --os=$TRAVIS_OS_NAME --cc=$CC --cc-bin=$CXX --without-pylint3 --pkcs11-lib=/tmp/softhsm/lib/softhsm/libsofthsm2.so $BUILD_MODE

# whitelist branches to avoid testing feature branches twice (as branch and as pull request)
branches:
  only:
    - master
    - release-2
    - coverity_scan

git:
  depth: 10

cache:
  ccache: true

addons:
  coverity_scan:
    project:
      name: "randombit/botan"
    notification_email: jack@randombit.net
    build_command_prepend: "./configure.py --no-optimizations --with-zlib --with-openssl"
    build_command: "make -j2"
    branch_pattern: coverity_scan