|
1 | 1 | language: cpp
|
| 2 | +sudo: false |
| 3 | +cache: |
| 4 | + - ccache |
2 | 5 |
|
3 |
| -compiler: |
4 |
| - - clang |
5 |
| - - gcc |
| 6 | +addons: |
| 7 | + apt: |
| 8 | + packages: &default_packages |
| 9 | + - cmake |
| 10 | + - valgrind |
6 | 11 |
|
7 | 12 | env:
|
8 |
| - matrix: |
9 |
| - - CONF=debug ARCH=x86_64 CXX11=ON |
10 |
| - - CONF=release ARCH=x86_64 CXX11=ON |
11 |
| - - CONF=debug ARCH=x86 CXX11=ON |
12 |
| - - CONF=release ARCH=x86 CXX11=ON |
13 |
| - - CONF=debug ARCH=x86_64 CXX11=OFF |
14 |
| - - CONF=debug ARCH=x86 CXX11=OFF |
15 |
| - global: |
| 13 | +global: |
| 14 | + - USE_CCACHE=1 |
| 15 | + - CCACHE_SLOPPINESS=pch_defines,time_macros |
| 16 | + - CCACHE_COMPRESS=1 |
| 17 | + - CCACHE_MAXSIZE=100M |
16 | 18 | - ARCH_FLAGS_x86='-m32' # #266: don't use SSE on 32-bit
|
17 | 19 | - ARCH_FLAGS_x86_64='-msse4.2' # use SSE4.2 on 64-bit
|
18 | 20 | - GITHUB_REPO='miloyip/rapidjson'
|
19 | 21 | - secure: "HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
|
20 | 22 |
|
21 |
| -before_install: |
22 |
| - - sudo apt-get update -qq |
23 |
| - - sudo apt-get install -qq cmake valgrind |
24 |
| - - sudo apt-get --no-install-recommends install doxygen # Don't install LaTeX stuffs |
25 |
| - - if [ "$ARCH" = "x86" ]; then sudo apt-get install -qq g++-multilib libc6-dbg:i386; fi |
26 |
| - - if [ "$CC" = "gcc" ] && [ "$CONF" = "debug" ]; then sudo pip install cpp-coveralls; export GCOV_FLAGS='--coverage'; fi |
27 |
| - |
28 |
| -install: true |
| 23 | +matrix: |
| 24 | + include: |
| 25 | + - env: CONF=release ARCH=x86 |
| 26 | + compiler: gcc |
| 27 | + addons: |
| 28 | + apt: |
| 29 | + packages: |
| 30 | + - *default_packages |
| 31 | + - g++-multilib |
| 32 | + - libc6-dbg:i386 |
| 33 | + - env: CONF=release ARCH=x86_64 |
| 34 | + compiler: gcc |
| 35 | + - env: CONF=debug ARCH=x86 CCACHE_CPP2=yes |
| 36 | + compiler: clang |
| 37 | + addons: |
| 38 | + apt: |
| 39 | + packages: |
| 40 | + - *default_packages |
| 41 | + - g++-multilib |
| 42 | + - libc6-dbg:i386 |
| 43 | + - env: CONF=debug ARCH=x86_64 CCACHE_CPP2=yes |
| 44 | + compiler: clang |
| 45 | + - env: CONF=release ARCH=x86 CCACHE_CPP2=yes |
| 46 | + compiler: clang |
| 47 | + addons: |
| 48 | + apt: |
| 49 | + packages: |
| 50 | + - *default_packages |
| 51 | + - g++-multilib |
| 52 | + - libc6-dbg:i386 |
| 53 | + - env: CONF=release ARCH=x86_64 CCACHE_CPP2=yes |
| 54 | + compiler: clang |
| 55 | + # coverage report |
| 56 | + - env: CONF=debug ARCH=x86 GCOV_FLAGS='--coverage' |
| 57 | + compiler: gcc |
| 58 | + cache: |
| 59 | + - ccache |
| 60 | + - pip |
| 61 | + addons: |
| 62 | + apt: |
| 63 | + packages: |
| 64 | + - *default_packages |
| 65 | + - g++-multilib |
| 66 | + - libc6-dbg:i386 |
| 67 | + after_success: |
| 68 | + - pip install --user cpp-coveralls |
| 69 | + - coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h |
| 70 | + - env: CONF=debug ARCH=x86_64 GCOV_FLAGS='--coverage' |
| 71 | + compiler: gcc |
| 72 | + cache: |
| 73 | + - ccache |
| 74 | + - pip |
| 75 | + addons: |
| 76 | + apt: |
| 77 | + packages: |
| 78 | + - *default_packages |
| 79 | + - g++-multilib |
| 80 | + - libc6-dbg:i386 |
| 81 | + after_success: |
| 82 | + - pip install --user cpp-coveralls |
| 83 | + - coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h |
| 84 | + - script: # Documentation task |
| 85 | + - cd build |
| 86 | + - cmake .. -DRAPIDJSON_HAS_STDSTRING=ON -DCMAKE_VERBOSE_MAKEFILE=ON |
| 87 | + - make travis_doc |
| 88 | + cache: false |
| 89 | + addons: |
| 90 | + apt: |
| 91 | + packages: |
| 92 | + - doxygen |
29 | 93 |
|
30 | 94 | before_script:
|
31 |
| -# hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469), |
32 |
| -# exposed by merging PR#163 (using -march=native) |
| 95 | + - ccache -s |
| 96 | + # hack to avoid Valgrind bug (https://bugs.kde.org/show_bug.cgi?id=326469), |
| 97 | + # exposed by merging PR#163 (using -march=native) |
| 98 | + # TODO: Since this bug is already fixed. Remove this when valgrind can be upgraded. |
33 | 99 | - sed -i "s/-march=native//" CMakeLists.txt
|
34 |
| - - mkdir build |
35 |
| - - > |
36 |
| - eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ; |
37 |
| - (cd build && cmake |
38 |
| - -DRAPIDJSON_HAS_STDSTRING=ON |
39 |
| - -DRAPIDJSON_BUILD_CXX11=$CXX11 |
40 |
| - -DCMAKE_VERBOSE_MAKEFILE=ON |
41 |
| - -DCMAKE_BUILD_TYPE=$CONF |
42 |
| - -DCMAKE_CXX_FLAGS="$ARCH_FLAGS $GCOV_FLAGS" |
43 |
| - -DCMAKE_EXE_LINKER_FLAGS=$GCOV_FLAGS |
44 |
| - ..) |
| 100 | + - mkdir build |
45 | 101 |
|
46 | 102 | script:
|
| 103 | + - > |
| 104 | + eval "ARCH_FLAGS=\${ARCH_FLAGS_${ARCH}}" ; |
| 105 | + (cd build && cmake |
| 106 | + -DRAPIDJSON_HAS_STDSTRING=ON |
| 107 | + -DCMAKE_VERBOSE_MAKEFILE=ON |
| 108 | + -DCMAKE_BUILD_TYPE=$CONF |
| 109 | + -DCMAKE_CXX_FLAGS="$ARCH_FLAGS $GCOV_FLAGS" |
| 110 | + -DCMAKE_EXE_LINKER_FLAGS=$GCOV_FLAGS |
| 111 | + ..) |
47 | 112 | - cd build
|
48 |
| - - make tests |
49 |
| - - make examples |
50 |
| - - ctest -V `[ "$CONF" = "release" ] || echo "-E perftest"` |
51 |
| - - make travis_doc |
52 |
| - |
53 |
| -after_success: |
54 |
| - - coveralls -r .. --gcov-options '\-lp' -e thirdparty -e example -e test -e build/CMakeFiles -e include/rapidjson/msinttypes -e include/rapidjson/internal/meta.h -e include/rapidjson/error/en.h |
| 113 | + - make tests -j 2 |
| 114 | + - make examples -j 2 |
| 115 | + - ctest -j 2 -V `[ "$CONF" = "release" ] || echo "-E perftest"` |
0 commit comments