summaryrefslogtreecommitdiff
path: root/3rdparty/plibsys/.travis.yml
blob: 55641b14757da5c927149d390020e7a94ddedf00 (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
env:
        global:
                # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
                #   via the "travis encrypt" command using the project repo's public key
                - secure: "Jw8Q8kFOfP4kiicGpZX496H0Hhi2+PzQ5wSpSJ/+e4rdQ/PnQuCvJfyAJ/k6+7BmgeS80T4sfK5xB5nX3yZG1FA4VE4kXuppJlVSwTZer0dlbbK3rvdSChBf5/Nnfjsj/Ch2SjjwhOt8zhjVutWuT2wz9RwOO39heQf3KFb4qbaVbnaBRTiGYJ+6D/28dX5foMehTohtcN1WKUZULum4cP8tqdn2+0cH+afwDwODap4v8brEW8HifS4QGDejAE7zR9fr3BaJl2m9s8art5lGzoK6Qaf2SS8WBW0MVzv2CP6zfsLUmPm3WijGUzAIPPi5GRFSy7O0GdkhHziMof1vyE3irXLSFlhg5g76lHEI2vpE6m+/PQ4I9jp7+oBT0N4SadgiXReXxewAZRrInCOstNN/mWIF0C0r1gWvPS3uM5u4PfGRa72GJ39SWmDvQqmOHOy15ZGA2eyw8piLAVkVJKvhufNfwEULITHE9xQXCV3e0YZrNIjMofuRszz7yLHEXlhwJxG++E4h0uCKnCqLTcLas8sBcRw98H/k9s8yZR3u9v0F0qqX/wus2TvfMjsfOqMm9MyqTXexpsMiODiN0a8zpdhufDlyxgr+2S96NlER7Iu0aRPBVgfDP2COPxmVW4ZwDpZYxK6iANeiYVuQGHccDHjZRyiSCG2c47EKV14="
                - COVERITY_SCAN_PROJECT_NAME="saprykin/plibsys"
                - COVERITY_SCAN_BRANCH_PATTERN="coverity_scan"
                - COVERITY_SCAN_NOTIFICATION_EMAIL="saprykin.spb@gmail.com"
                - COVERITY_SCAN_BUILD_COMMAND="make"

language: generic
dist: xenial

matrix:
        include:
                # Code coverage build
                - os: linux
                  addons: { apt: { packages: [lcov] } }
                  env: CC=gcc CXX=g++ GCOV=gcov USE_GCOV=1
                # Linux x64 builds (GCC)
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-4.9, g++-4.9] } }
                  env: CC=gcc-4.9 CXX=g++-4.9 ARCH=64 USE_COVERITY=1
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-5, g++-5] } }
                  env: CC=gcc-5 CXX=g++-5 ARCH=64
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-6, g++-6] } }
                  env: CC=gcc-6 CXX=g++-6 ARCH=64
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-7, g++-7] } }
                  env: CC=gcc-7 CXX=g++-7 ARCH=64
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-8, g++-8] } }
                  env: CC=gcc-8 CXX=g++-8 ARCH=64
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-9, g++-9] } }
                  env: CC=gcc-9 CXX=g++-9 ARCH=64
                # IBM Power builds (GCC)
                - os: linux
                  arch: ppc64le
                  env: CC=gcc CXX=g++
                # IBM Z builds (GCC)
                - os: linux
                  arch: s390x
                  env: CC=gcc CXX=g++
                # Amazon Graviton-2 ARM
                - os: linux
                  arch: arm64
                  env: CC=gcc CXX=g++
                # Linux x86 builds (GCC)
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-4.9, g++-4.9, gcc-multilib, g++-multilib, gcc-4.9-multilib, g++-4.9-multilib, linux-libc-dev] } }
                  env: CC=gcc-4.9 CXX=g++-4.9 ARCH=32
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-5, g++-5, gcc-multilib, g++-multilib, gcc-5-multilib, g++-5-multilib, linux-libc-dev] } }
                  env: CC=gcc-5 CXX=g++-5 ARCH=32
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-6, g++-6, gcc-multilib, g++-multilib, gcc-6-multilib, g++-6-multilib, linux-libc-dev] } }
                  env: CC=gcc-6 CXX=g++-6 ARCH=32
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-7, g++-7, gcc-multilib, g++-multilib, gcc-7-multilib, g++-7-multilib, linux-libc-dev] } }
                  env: CC=gcc-7 CXX=g++-7 ARCH=32
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-8, g++-8, gcc-multilib, g++-multilib, gcc-8-multilib, g++-8-multilib, linux-libc-dev] } }
                  env: CC=gcc-8 CXX=g++-8 ARCH=32
                - os: linux
                  addons: { apt: { sources: ubuntu-toolchain-r-test, packages: [gcc-9, g++-9, gcc-multilib, g++-multilib, gcc-9-multilib, g++-9-multilib, linux-libc-dev] } }
                  env: CC=gcc-9 CXX=g++-9 ARCH=32
                # Linux x64 builds (Clang)
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-trusty-3.6], packages: [clang-3.6, libc++-dev] } }
                  env: CC=clang-3.6 CXX=clang++-3.6
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-trusty-3.7], packages: [clang-3.7, libc++-dev] } }
                  env: CC=clang-3.7 CXX=clang++-3.7
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-3.8], packages: [clang-3.8, libc++-dev] } }
                  env: CC=clang-3.8 CXX=clang++-3.8
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-3.9], packages: [clang-3.9, libc++-dev] } }
                  env: CC=clang-3.9 CXX=clang++-3.9
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-4.0], packages: [clang-4.0, libc++-dev] } }
                  env: CC=clang-4.0 CXX=clang++-4.0
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-5.0], packages: [clang-5.0, libc++-dev] } }
                  env: CC=clang-5.0 CXX=clang++-5.0
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-6.0], packages: [clang-6.0, libc++-dev] } }
                  env: CC=clang-6.0 CXX=clang++-6.0
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-7], packages: [clang-7, libc++-dev] } }
                  env: CC=clang-7 CXX=clang++-7
                - os: linux
                  addons: { apt: { sources: [ubuntu-toolchain-r-test, llvm-toolchain-xenial-8], packages: [clang-8, libc++-dev] } }
                  env: CC=clang-8 CXX=clang++-8
                # macOS builds (GCC)
                - os: osx
                  osx_image: xcode10.2
                  env: FORMULA=gcc@6 CC=gcc-6 CXX=g++-6
                - os: osx
                  osx_image: xcode10.2
                  env: FORMULA=gcc@7 CC=gcc-7 CXX=g++-7
                - os: osx
                  osx_image: xcode10.2
                  env: FORMULA=gcc@8 CC=gcc-8 CXX=g++-8
                - os: osx
                  osx_image: xcode10.2
                  env: FORMULA=gcc@9 CC=gcc-9 CXX=g++-9
                # macOS builds (Clang)
                - os: osx
                  osx_image: xcode6.4
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode7.3
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode8.3
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode9.2
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode9.4
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode10.3
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode11.3
                  env: CC=clang CXX=clang++
                - os: osx
                  osx_image: xcode12
                  env: CC=clang CXX=clang++

branches:
        only:
                - master
                - coverity_scan

before_install:
        - if [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]]; then export USE_GCOV="" ; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && (! [[ -z ${FORMULA+x} ]] || ! [[ -z ${USE_GCOV} ]]) ; then brew update ; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && [[ "${USE_GCOV}" == "1" ]]; then brew install lcov ; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && ! [[ -z ${FORMULA+x} ]]; then brew cask uninstall oclint || true; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && ! [[ -z ${FORMULA+x} ]]; then brew unlink gcc || true; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && ! [[ -z ${FORMULA+x} ]]; then brew unlink ${FORMULA} || true; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && ! [[ -z ${FORMULA+x} ]]; then brew install ${FORMULA}; fi
        - if [[ "${TRAVIS_OS_NAME}" == "osx" ]] && ! [[ -z ${FORMULA+x} ]]; then brew link ${FORMULA}; fi

before_script:
        - mkdir ./plibsys-build
        - cd ./plibsys-build
        - ${CC} --version
        - ${CC} -dM -E - < /dev/null
        - ${CXX} --version
        - ${CXX} -dM -E -x c++ - < /dev/null
        - if ! [[ -z ${ARCH+x} ]]; then export CMAKE_ARCH_PARAM=-m${ARCH} ; fi
        - if [[ "${USE_GCOV}" == "1" ]]; then cmake -DPLIBSYS_COVERAGE=ON -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_C_FLAGS=${CMAKE_ARCH_PARAM} -DCMAKE_CXX_FLAGS=${CMAKE_ARCH_PARAM} .. ; fi
        - if ! [[ "${USE_GCOV}" == "1" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_C_FLAGS=${CMAKE_ARCH_PARAM} -DCMAKE_CXX_FLAGS=${CMAKE_ARCH_PARAM} .. ; fi
        - if [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]] && [[ "${USE_COVERITY}" == "1" ]]; then export COVERITY_SCAN_BUILD_COMMAND_PREPEND="cov-configure --comptype gcc --compiler ${CC} --template" ; fi
        - if [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]] && [[ "${USE_COVERITY}" == "1" ]]; then curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true ; fi

script:
        - make -j 2
        - if [[ "${TRAVIS_BRANCH}" != "coverity_scan" ]]; then ctest --output-on-failure -V -C Release; fi

after_success:
        - if [[ "${USE_GCOV}" == "1" ]]; then lcov --gcov-tool ${GCOV} --directory . --capture --output-file coverage.info ; fi
        - if [[ "${USE_GCOV}" == "1" ]]; then bash <(curl -s https://codecov.io/bash) -x ${GCOV} ; fi