| language: c |
| |
| # |
| # Try building on these 4 architectures; all are 64-bit, and all but |
| # "s390x", a/k/a z/Architecture, are little-endian. |
| # |
| arch: |
| - amd64 |
| - ppc64le |
| - s390x |
| - arm64 |
| |
| os: |
| - linux |
| - osx |
| |
| dist: focal |
| |
| # |
| # Linux runs on all of the architectures listed above; macOS runs on |
| # 64-bit x86 and 64-bit ARM, but Travis doesn't currently have a 64-bit |
| # ARM macOS build environment. Suppress the macOS builds that don't work. |
| # |
| # In addition, with newer versions of macOS, Apple ships a "gcc" that's |
| # just another front end to Clang, presumably for backwards |
| # compatibility with build scripts etc. that expect the compiler to be |
| # "gcc", so don't bother doing "gcc" builds on macOS. |
| # |
| jobs: |
| exclude: |
| - arch: ppc64le |
| os: osx |
| - arch: s390x |
| os: osx |
| - arch: arm64 |
| os: osx |
| - compiler: gcc |
| os: osx |
| |
| cache: ccache |
| |
| env: |
| global: |
| # encrypted COVERITY_SCAN_TOKEN from |
| # https://scan.coverity.com/projects/<project_id>/submit_build?tab=travis_ci |
| - secure: "SwNcek+I4lMVcnb5EGGmNm6ljWN6C/mnXzBr82a5rEQNKxAoJfdvvPpKIp0iEfg5j0PtYlcRHoIDyVZ/6QM/WEw0wrio9Z0cio9hkOS6kV8g2QouXfnoNtKJ5nNso7UD2GPJ9+M0GIR1GZ0Edvxr81sHlNAkpVKydYGBwCIMGyg=" |
| # Coverity run condition (avoid matrix multiple runs), need customized |
| # build script. Need an update if new matrix cases. |
| - coverity_scan_run_condition='"$TRAVIS_CPU_ARCH" = amd64 -a "$TRAVIS_OS_NAME" = linux -a "$CC" = gcc -a "$REMOTE" = enable -a "$CMAKE" = no' |
| # Coverity script test mode (if true no uploading, avoid reaching the quota) |
| # usual processing: false. |
| - coverity_scan_script_test_mode=false |
| - MAKEFLAGS='-j 2' # Travis CI VMs come with 2 cores |
| |
| matrix: |
| fast_finish: true |
| |
| addons: |
| coverity_scan: |
| # customized build script URL |
| # TRAVIS_REPO_SLUG: owner_name/repo_name of repository currently being built |
| # TRAVIS_BRANCH: name of the branch currently being built |
| build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis-coverity-scan-build.sh |
| # project metadata |
| project: |
| name: $TRAVIS_REPO_SLUG |
| # Where email notification of build analysis results will be sent |
| #notification_email: tcpdump-workers@lists.tcpdump.org |
| # Commands to prepare for build_command |
| build_command_prepend: ./configure --enable-remote |
| # This command will be added as an argument to "cov-build" to compile |
| # the project for analysis |
| build_command: make |
| # Pattern to match selecting branches that will run analysis |
| branch_pattern: coverity_scan |
| apt: |
| packages: |
| - libdbus-1-dev |
| - libbluetooth-dev |
| - libnl-genl-3-dev |
| - libibverbs-dev |
| |
| git: |
| quiet: true |
| depth: 3 |
| |
| before_install: |
| - uname -a |
| - date |
| - if [ "$TRAVIS_OS_NAME" = linux ]; then apt list --installed 'lib*-dev'; fi |
| |
| install: |
| |
| before_script: |
| |
| script: |
| # |
| # XXX - on Linux with ppc64le, s390x, and arm64, Travis gets etuck |
| # after executing the next line; testing by exiting if |
| # COVERITY_SCAN_BRANCH was equal to 0 indicates that the premature |
| # exit causes the hang. |
| # |
| # Why that happens is as yet unknown. The Travis maintainers |
| # recommended using travis_terminate instead, so that's what |
| # we're doing. |
| # |
| # On the other hand, using travis_terminate on macOS appears to |
| # *cause* the problem, so we do so only on Linux. |
| # |
| - if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then if [ "$TRAVIS_OS_NAME" = linux ]; then travis_terminate 0; else exit 0; fi; fi |
| - ./build_matrix.sh |
| - if [ "$TRAVIS_OS_NAME" = osx ]; then sleep 10; fi |