.travis.yml 4.68 KB
Newer Older
1
language: cpp
2 3 4

matrix:
  include:
5
# OSX
6 7 8
    - os: osx
      compiler: clang
      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release OPJ_CI_INCLUDE_IF_DEPLOY=1
9 10

# Test code style
11
    - os: linux
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
      compiler: clang-3.8
      env: OPJ_CI_CC=clang-3.8 OPJ_CI_CXX=clang-3.8 OPJ_CI_CHECK_STYLE=1 OPJ_CI_SKIP_TESTS=1
      addons:
        apt:
          sources:
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
          packages:
            - clang-3.8
            - flip

# Performance test with GCC
    - os: linux
      compiler: g++
      dist: precise
      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release OPJ_CI_INCLUDE_IF_DEPLOY=1 OPJ_CI_PERF_TESTS=1

# Test compilation with AVX2
    - os: linux
      # "sudo: yes" and "dist: trusty" give us a worker with the AVX2 instruction set
      sudo: yes
      dist: trusty
      compiler: clang-3.8
      env: OPJ_CI_CC=clang-3.8 OPJ_CI_CXX=clang-3.8 OPJ_CI_INSTRUCTION_SETS="-mavx2" OPJ_CI_BUILD_CONFIGURATION=Release
      addons:
        apt:
          sources:
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
          packages:
            - clang-3.8

# Test multi-threading
    - os: linux
      compiler: g++
      dist: precise
      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release OPJ_NUM_THREADS=2

# Test 32-bit compilation
51
    - os: linux
52
      compiler: g++
53 54 55 56 57
      env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
      addons:
        apt:
          packages:
            - gcc-multilib
58 59 60
            - g++-multilib

# Profile code (gcc -pg)
61
    - os: linux
62 63 64 65 66 67 68 69
      compiler: g++
      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_PROFILE=1
      addons:
        apt:
          packages:
            - valgrind

# Test under ASAN
70 71 72
    - os: linux
      compiler: clang
      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
73 74

# Test with CLang 3.8
75 76
    - os: linux
      compiler: clang-3.8
77
      env: OPJ_CI_CC=clang-3.8 OPJ_CI_CXX=clang-3.8 OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release OPJ_CI_PERF_TESTS=1 OPJ_CI_BUILD_FUZZERS=1
78 79 80 81 82 83 84
      addons:
        apt:
          sources:
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
          packages:
            - clang-3.8
85 86

# Test with mingw 32 bit
87
    - os: linux
88 89
      compiler: x86_64-w64-mingw32-g++
      env: OPJ_CI_CC=x86_64-w64-mingw32-gcc OPJ_CI_CXX=x86_64-w64-mingw32-g++ OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
90 91 92 93
      addons:
        apt:
          packages:
            - gcc-mingw-w64-base
94 95 96 97 98 99 100 101
            - binutils-mingw-w64-i686
            - gcc-mingw-w64-i686
            - gcc-mingw-w64      
            - g++-mingw-w64-i686
            - gcc-multilib
            - g++-multilib

# Test with mingw 64 bit
102
    - os: linux
103 104
      compiler: x86_64-w64-mingw32-g++
      env: OPJ_CI_CC=x86_64-w64-mingw32-gcc OPJ_CI_CXX=x86_64-w64-mingw32-g++ OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
105 106 107 108
      addons:
        apt:
          packages:
            - gcc-mingw-w64-base
109 110 111 112 113 114
            - binutils-mingw-w64-x86-64
            - gcc-mingw-w64-x86-64
            - gcc-mingw-w64
            - g++-mingw-w64-x86-64

# Test with gcc 4.8
115
    - os: linux
116 117 118
      compiler: g++-4.8
      env: OPJ_CI_CC=gcc-4.8 OPJ_CI_CXX=g++-4.8 OPJ_CI_ABI_CHECK=1
      dist: precise
119 120 121 122 123 124
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-4.8
125
            - g++-4.8
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
            - libelf-dev
            - elfutils
            - texinfo
            - exuberant-ctags

install:
  - ./tools/travis-ci/install.sh

script:
  - ./tools/travis-ci/run.sh
  - ./tools/travis-ci/abi-check.sh

before_deploy:
  - export OPJ_RELEASE_PKG_FILE=$(ls build/openjpeg-${TRAVIS_TAG}*)
  - echo "deploying $OPJ_RELEASE_PKG_FILE to GitHub releases"

deploy:
  provider: releases
  api_key:
    secure: Npi13uOffALCVNwea4p4q8v85Lo/WsRqaeZQcWrAkt8MxRnfvWQtmnuwmHnVB6Cig+T1lVUHrklOaJIApIb6nkGq3CS/9bD8+SCS2NEdAAP/QYWnBi0ubWXVMRyDLypmwRpzLNSZ0xLYGFUl2PjieZYKRcz1dd/J7S+FnXhPtdjXweq0FS63zTcMe7ggjfmzSOWUCEFmMjZPaM0Be+3PweieCO1dxlHuy7ugCkx2S7d+5hNsicIhQmTADjqtJAkHoMhYqu6/yLFxhjO/+f938PATFULdODTvjCsUwdN/ySWi1Oj4uPAntfytZP7H6YrzLh8dS73QCsdkhhDJIgJskHIBSbRyyEVUnOvQgD9VaBVGHtc1KtZQTwc41OUO3BGPHl97s3oX6bqWqo/L53dB3TPHGx+1+2HL/F0zaDZuHhAKMkPwe8LFPMPB/ur65zXMHjnWb2ZTVVdoIvkbQ7nu8ApI60ejxocYBsEyAuC2CPXU2ki4jdEhm0E1hIziWNE9/LTuM17ziQuJ6WpXOSMrfP4o5aVDmLp5ZGBSocrspOksgyI9XogHaO/r+Y6N3exy+giObFfMHkZVUpsKrKmtOJ7TC1Vg5HsYGlWW8RN8dkJV47bUXm9K4sMos9eYMUt/czykPAs+132cogpII3QxXpFZQqZg6SEPVfOiyqQzTUI=
  file_glob: true
  file: "${OPJ_RELEASE_PKG_FILE}"
  skip_cleanup: true
  on:
    repo: uclouvain/openjpeg
    tags: true
    condition: "$OPJ_CI_INCLUDE_IF_DEPLOY = 1"