File: .travis.yml

package info (click to toggle)
grantlee5 5.1.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,152 kB
  • sloc: cpp: 24,299; python: 413; sh: 108; ruby: 24; makefile: 20
file content (149 lines) | stat: -rw-r--r-- 5,214 bytes parent folder | download | duplicates (2)
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
148
149
sudo: required
dist: trusty

language: cpp
branches:
  only:
    - master
    - next

matrix:
  include:
    - os: osx
      env: CONFIGS="Debug Release" GENERATORS="Makefiles Ninja" COMPILERS="Clang"
    - os: osx
      env: CONFIGS="Debug_And_Release" GENERATORS="Xcode" COMPILERS="Clang"
    - os: linux
      env: CONFIGS="Debug Release" GENERATORS="Makefiles Ninja" COMPILERS="GNU Clang"
      addons:
        apt:
          packages: clang
    - os: linux
      env: CONFIGS="RelWithDebInfo" GENERATORS="Ninja" COMPILERS="Clang" MEMCHECK=true
      addons:
        apt:
          packages: valgrind clang
    - os: linux
      env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" QT_VERSION_MM=54 QT_VERSION_FULL=542
    - os: linux
      env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" QT_VERSION_MM=53 QT_VERSION_FULL=532 CMAKE_VERSION_MM=3.1 CMAKE_VERSION_FULL=3.1.3
    - os: linux
      env: CONFIGS="Coverage" GENERATORS="Makefiles" COMPILERS="GNU"

before_install:
  - if [ -z "$CMAKE_VERSION_MM" ]; then export CMAKE_VERSION_MM=3.4; fi
  - if [ -z "$CMAKE_VERSION_FULL" ]; then export CMAKE_VERSION_FULL=3.4.0; fi
  - if [ -z "$QT_VERSION_FULL" ]; then export QT_VERSION_FULL=551; fi
  - if [ -z "$QT_VERSION_MM" ]; then export QT_VERSION_MM=55; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
    sudo apt-add-repository --yes ppa:beineri/opt-qt${QT_VERSION_FULL}-trusty
      && sudo apt-get update -qq
      && sudo apt-get install -qq qt${QT_VERSION_MM}base qt${QT_VERSION_MM}script qt${QT_VERSION_MM}tools
      && sudo apt-get install -qq ninja-build clang lcov
      && export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM}
      && wget --no-check-certificate http://www.cmake.org/files/v${CMAKE_VERSION_MM}/cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh
      && sudo sh cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
      && export DISPLAY=:99.0
      && sh -e /etc/init.d/xvfb start;
    fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
      brew update;
      brew outdated cmake || brew upgrade cmake;
      brew install qt5;
      brew install ninja;
      export CMAKE_PREFIX_PATH=$(brew --prefix qt5);
    fi

before_script:
   - for generator in $GENERATORS;
     do
       for compiler in $COMPILERS;
       do
         for config in $CONFIGS;
         do
           if [ "$generator" = "Makefiles" ];
           then
             export generator_name="Unix Makefiles";
           else
             export generator_name=$generator;
           fi;
           if [ "$compiler" = "GNU" ];
           then
             export compiler_name="g++";
           else
             export compiler_name="clang++";
           fi;
           if [ "$config" = "Debug_And_Release" ];
           then
             export config_arg=;
           else
             export config_arg="-DCMAKE_BUILD_TYPE=$config";
           fi;
           mkdir build-$config-$generator-$compiler;
           pushd build-$config-$generator-$compiler;
           cmake .. $config_arg -G "$generator_name" -DCMAKE_CXX_COMPILER=$compiler_name && popd && continue;
           popd;
           failure=1;
           break;
         done;
         if [ "$failure" != "" ]; then break; fi;
       done;
       if [ "$failure" != "" ]; then break; fi;
     done;
     if [ "$failure" != "" ]; then false; fi;


script:
   - if [ -n "MEMCHECK" ]; then export MEMCHECK_ARG="-DExperimentalMemCheck"; fi
   - for config in $CONFIGS;
     do
       for generator in $GENERATORS;
       do
         for compiler in $COMPILERS;
         do
           if [ "$config" = "Debug_And_Release" ];
           then
             build_configs="Debug Release";
           else
             build_configs=$config;
           fi;
           for build_config in $build_configs;
           do
             pushd build-$config-$generator-$compiler;
             cmake --build . --config $build_config;
             if [ "$config" = "Coverage" ];
             then
               cmake --build . --target coverage 2>&1 | sed '/numeric in numeric gt/d';
               pip install --user codecov;
               codecov -X gcov fix --file=test_all.info;
               popd && continue;
             else
               ctest --output-on-failure && popd && continue;
             fi;
             popd;
             failure=1;
             break;
           done;
           if [ "$failure" != "" ]; then break; fi;
         done;
         if [ "$failure" != "" ]; then break; fi;
       done;
       if [ "$failure" != "" ]; then break; fi;
     done;
     if [ "$failure" != "" ]; then false; fi;

    #cmake --build . --target ExperimentalSubmit
    #cmake --build . --config $build_config
    #ctest --output-on-failure $MEMCHECK_ARG
             #cmake --build . --target ExperimentalStart;
             #cmake --build . --target ExperimentalConfigure;
             #cmake --build . --target ExperimentalBuild;
             #cmake --build . --target install;
             #cmake --build . --target ExperimentalTest;
             #if [ "$MEMCHECK" = "true" ];
             #then
             #cmake --build . --target ExperimentalMemCheck;
             #fi;

notifications:
  email: false