File: .travis.yml

package info (click to toggle)
boost1.74 1.74.0-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 464,084 kB
  • sloc: cpp: 3,338,324; xml: 131,293; python: 33,088; ansic: 14,336; asm: 4,034; sh: 3,351; makefile: 1,193; perl: 1,036; yacc: 478; php: 212; ruby: 102; lisp: 24; sql: 13; csh: 6
file content (147 lines) | stat: -rw-r--r-- 4,185 bytes parent folder | download
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
# Copyright (C) 2019 T. Zachary Laine
#
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
sudo: required
dist: trusty
language: cpp
script: cmake

matrix:
    include:
        # OSX
        - env: ASAN=on MAC_OSX=true
          os: osx
          osx_image: xcode8.3
          compiler: clang

        - env: ASAN=on MAC_OSX=true
          os: osx
          osx_image: xcode9.4
          compiler: clang

        - env: ASAN=on MAC_OSX=true
          os: osx
          osx_image: xcode10.3
          compiler: clang

        - env: ASAN=on MAC_OSX=true
          os: osx
          osx_image: xcode11.4
          compiler: clang


        # Gcc
        - env: GCC_VERSION=6 ASAN=off
          os: linux
          compiler: gcc-6
          addons: &gcc6
            apt:
              packages:
                - g++-6
                - valgrind
              sources:
                - ubuntu-toolchain-r-test

        - env: GCC_VERSION=7 ASAN=off
          os: linux
          compiler: gcc-7
          addons: &gcc7
            apt:
              packages:
                - g++-7
                - valgrind
              sources:
                - ubuntu-toolchain-r-test

        - env: GCC_VERSION=8 ASAN=off
          os: linux
          compiler: gcc-8
          addons: &gcc8
            apt:
              packages:
                - g++-8
                - valgrind
              sources:
                - ubuntu-toolchain-r-test

        - env: GCC_VERSION=9 ASAN=off
          os: linux
          compiler: gcc-9
          addons: &gcc9
            apt:
              packages:
                - g++-9
                - valgrind
              sources:
                - ubuntu-toolchain-r-test

       # - env: GCC_VERSION=10 ASAN=off
       #   os: linux
       #   compiler: gcc-10
       #   addons: &gcc10
       #     apt:
       #       packages:
       #         - g++-10
       #         - valgrind
       #       sources:
       #         - ubuntu-toolchain-r-test

install:
    - export CHECKOUT_PATH=`pwd`;
    - if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
    - if [ -n "$CLANG_VERSION" ]; then export CXXFLAGS="${CXXFLAGS} -stdlib=libstdc++" CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
    # - if [[ "$CLANG_VERSION" == "3.4" ]]; then export CXX="/usr/local/clang-3.4/bin/clang++" CC="/usr/local/clang-3.4/bin/clang"; fi

    # Setup deps directory
    - export DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
    - mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
    - mkdir usr
    - export PATH=${DEPS_DIR}/usr/bin:${PATH}

    # Install cmake
    - |
      if [[ "$MAC_OSX" == "true" ]]; then
        export CMAKE_URL="http://www.cmake.org/files/v3.17/cmake-3.17.0-Darwin-x86_64.tar.gz"
      else
        export CMAKE_URL="http://www.cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.tar.gz"
      fi
      travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=3 -xz -C usr
    - echo $PATH

    # Show compiler info
    - $CXX --version
    - which $CXX
    - $CC --version
    - which $CC
    - which cmake
    - cmake --version

    # Add warnings
    - export CXXFLAGS="${CXXFLAGS} -Wall"

script:
    - cd $CHECKOUT_PATH
    - export ASANVARIANT="false"
    - if [[ "$ASAN" == "on" ]]; then export ASANVARIANT="true"; fi
    - |
      for build_type in Debug Release; do
        for asan_type in $ASANVARIANT; do
          build_dir="build-$build_type-asan-$asan_type"
          mkdir $build_dir
          cd $build_dir
          if [[ "$asan_type" == "true" ]]; then 
            CXXFLAGS="$CXXFLAGS" cmake -DUSE_ASAN=true -DBOOST_BRANCH=$TRAVIS_BRANCH -DCMAKE_BUILD_TYPE=$build_type ..
          else
            cmake -DBOOST_BRANCH=$TRAVIS_BRANCH -DCMAKE_BUILD_TYPE=$build_type ..
          fi
          VERBOSE=1 make -j4 && CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=4 ASAN_OPTIONS=alloc_dealloc_mismatch=0 make check
          if [ $? -ne 0 ]
          then
            exit 1
          fi
          cd ..
          rm -rf $build_dir
        done
      done