1language: c 2 3# 4# Try building on these 4 architectures; all are 64-bit, and all but 5# "s390x", a/k/a z/Architecture, are little-endian. 6# 7arch: 8 - amd64 9 - ppc64le 10 - s390x 11 - arm64 12 13os: 14 - linux 15 - osx 16 17dist: bionic 18 19compiler: 20 - gcc 21 - clang 22 23# 24# Linux runs on all of the architectures listed above; macOS currently 25# runs only on 64-bit x86, although the Spaceshipologists are all in a 26# tizzy about the possibility of Arm-based Macs. Suppress the macOS 27# builds that don't work. 28# 29# In addition, with newer versions of macOS, Apple ships a "gcc" that's 30# just another front end to Clang, presumably for backwards 31# compatibility with build scripts etc. that expect the compiler to be 32# "gcc", so don't bother doing "gcc" builds on macOS. 33# 34jobs: 35 exclude: 36 - arch: ppc64le 37 os: osx 38 - arch: s390x 39 os: osx 40 - arch: arm64 41 os: osx 42 - compiler: gcc 43 os: osx 44 45cache: ccache 46 47env: 48 global: 49 # encrypted COVERITY_SCAN_TOKEN from 50 # https://scan.coverity.com/projects/<project_id>/submit_build?tab=travis_ci 51 - secure: "SwNcek+I4lMVcnb5EGGmNm6ljWN6C/mnXzBr82a5rEQNKxAoJfdvvPpKIp0iEfg5j0PtYlcRHoIDyVZ/6QM/WEw0wrio9Z0cio9hkOS6kV8g2QouXfnoNtKJ5nNso7UD2GPJ9+M0GIR1GZ0Edvxr81sHlNAkpVKydYGBwCIMGyg=" 52 # Coverity run condition (avoid matrix multiple runs), need customized 53 # build script. Need an update if new matrix cases. 54 - coverity_scan_run_condition='"$TRAVIS_CPU_ARCH" = amd64 -a "$TRAVIS_OS_NAME" = linux -a "$CC" = gcc -a "$REMOTE" = enable -a "$CMAKE" = no' 55 # Coverity script test mode (if true no uploading, avoid reaching the quota) 56 # usual processing: false. 57 - coverity_scan_script_test_mode=false 58 - MAKEFLAGS='-j 2' # Travis CI VMs come with 2 cores 59 matrix: 60 - REMOTE=disable CMAKE=no 61 - ENABLE_REMOTE="" CMAKE=yes 62 - REMOTE=enable CMAKE=no 63 - ENABLE_REMOTE="-DENABLE_REMOTE=ON" CMAKE=yes 64 65matrix: 66 fast_finish: true 67 68addons: 69 coverity_scan: 70 # customized build script URL 71 # TRAVIS_REPO_SLUG: owner_name/repo_name of repository currently being built 72 # TRAVIS_BRANCH: name of the branch currently being built 73 build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis-coverity-scan-build.sh 74 # project metadata 75 project: 76 name: $TRAVIS_REPO_SLUG 77 # Where email notification of build analysis results will be sent 78 #notification_email: tcpdump-workers@lists.tcpdump.org 79 # Commands to prepare for build_command 80 build_command_prepend: ./configure --enable-remote 81 # This command will be added as an argument to "cov-build" to compile 82 # the project for analysis 83 build_command: make 84 # Pattern to match selecting branches that will run analysis 85 branch_pattern: coverity_scan 86 apt: 87 packages: 88 - libdbus-1-dev 89 - libbluetooth-dev 90 - libnl-genl-3-dev 91 - libibverbs-dev 92 93git: 94 quiet: true 95 depth: 3 96 97before_install: 98 - uname -a 99 - date 100 - if [ "$TRAVIS_OS_NAME" = linux ]; then apt list --installed 'lib*-dev'; fi 101 102install: 103 104before_script: 105 106script: 107 - if [ "$COVERITY_SCAN_BRANCH" = 1 ]; then echo "Coverity build - nothing more to do"; exit 0; fi 108 - touch .devel configure 109 - if [ "$CMAKE" = no ]; then echo '$ ./configure [...]' && echo travis_fold:start:script.configure; fi 110 - if [ "$CMAKE" = no ]; then ./configure --prefix=/tmp "--${REMOTE}-remote"; fi 111 - if [ "$CMAKE" = no ]; then echo -n travis_fold:end:script.configure; fi 112 - if [ "$CMAKE" = yes ]; then mkdir build; fi 113 - if [ "$CMAKE" = yes ]; then cd build; fi 114 - if [ "$CMAKE" = yes ]; then echo travis_fold:start:script.cmake; fi 115 - if [ "$CMAKE" = yes ]; then cmake -DCMAKE_INSTALL_PREFIX=/tmp $ENABLE_REMOTE ..; fi 116 - if [ "$CMAKE" = yes ]; then echo -n travis_fold:end:script.cmake; fi 117 - make -s 118 - make -s testprogs 119 - echo '$ make install [...]' && echo travis_fold:start:script.make_install 120 - PATH=$PATH make install 121 - echo -n travis_fold:end:script.make_install 122 - if [ "$CMAKE" = no ]; then testprogs/findalldevstest; fi 123 - if [ "$CMAKE" = yes ]; then run/findalldevstest; fi 124 - if [ "$CMAKE" = no ]; then make releasetar; fi 125 - echo '$ cat Makefile [...]'; echo travis_fold:start:script.cat_makefile 126 - if [ "$CMAKE" = no ]; then cat Makefile | sed -n '1,/DO NOT DELETE THIS LINE -- mkdep uses it/p'; fi 127 - if [ "$CMAKE" = yes ]; then cat Makefile; fi 128 - echo -n travis_fold:end:script.cat_makefile 129 - echo '$ cat config.h'; echo travis_fold:start:script.cat_config_h 130 - cat config.h 131 - echo -n travis_fold:end:script.cat_config_h 132 - if [ "$CMAKE" = no ]; then echo '$ cat config.log'; echo travis_fold:start:script.cat_config_log; fi 133 - if [ "$CMAKE" = no ]; then cat config.log; fi 134 - if [ "$CMAKE" = no ]; then echo -n travis_fold:end:script.cat_config_log; fi 135 - if [ "$TRAVIS_OS_NAME" = osx ]; then sleep 10; fi 136