1sudo: required 2language: bash 3dist: focal 4services: 5 - docker 6 7env: 8 global: 9 - PROJECT_NAME='libbpf' 10 - AUTHOR_EMAIL="$(git log -1 --pretty=\"%aE\")" 11 - REPO_ROOT="$TRAVIS_BUILD_DIR" 12 - CI_ROOT="$REPO_ROOT/travis-ci" 13 - VMTEST_ROOT="$CI_ROOT/vmtest" 14 15addons: 16 apt: 17 packages: 18 - qemu-kvm 19 - zstd 20 - binutils-dev 21 - elfutils 22 - libcap-dev 23 - libelf-dev 24 - libdw-dev 25 26stages: 27 # Run Coverity periodically instead of for each PR for following reasons: 28 # 1) Coverity jobs are heavily rate-limited 29 # 2) Due to security restrictions of encrypted environment variables 30 # in Travis CI, pull requests made from forks can't access encrypted 31 # env variables, making Coverity unusable 32 # See: https://docs.travis-ci.com/user/pull-requests#pull-requests-and-security-restrictions 33 - name: Coverity 34 if: type = cron 35 36jobs: 37 include: 38 - stage: Builds & Tests 39 name: Kernel 5.5.0 + selftests 40 language: bash 41 env: KERNEL=5.5.0 42 script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 43 44 - name: Kernel LATEST + selftests 45 language: bash 46 env: KERNEL=LATEST 47 script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 48 49 - name: Kernel 4.9.0 + selftests 50 language: bash 51 env: KERNEL=4.9.0 52 script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 53 54 - name: Debian Build 55 language: bash 56 install: $CI_ROOT/managers/debian.sh SETUP 57 script: $CI_ROOT/managers/debian.sh RUN || travis_terminate 1 58 after_script: $CI_ROOT/managers/debian.sh CLEANUP 59 60 - name: Debian Build (ASan+UBSan) 61 language: bash 62 install: $CI_ROOT/managers/debian.sh SETUP 63 script: $CI_ROOT/managers/debian.sh RUN_ASAN || travis_terminate 1 64 after_script: $CI_ROOT/managers/debian.sh CLEANUP 65 66 - name: Debian Build (clang) 67 language: bash 68 install: $CI_ROOT/managers/debian.sh SETUP 69 script: $CI_ROOT/managers/debian.sh RUN_CLANG || travis_terminate 1 70 after_script: $CI_ROOT/managers/debian.sh CLEANUP 71 72 - name: Debian Build (clang ASan+UBSan) 73 language: bash 74 install: $CI_ROOT/managers/debian.sh SETUP 75 script: $CI_ROOT/managers/debian.sh RUN_CLANG_ASAN || travis_terminate 1 76 after_script: $CI_ROOT/managers/debian.sh CLEANUP 77 78 - name: Debian Build (gcc-10) 79 language: bash 80 install: $CI_ROOT/managers/debian.sh SETUP 81 script: $CI_ROOT/managers/debian.sh RUN_GCC10 || travis_terminate 1 82 after_script: $CI_ROOT/managers/debian.sh CLEANUP 83 84 - name: Debian Build (gcc-10 ASan+UBSan) 85 language: bash 86 install: $CI_ROOT/managers/debian.sh SETUP 87 script: $CI_ROOT/managers/debian.sh RUN_GCC10_ASAN || travis_terminate 1 88 after_script: $CI_ROOT/managers/debian.sh CLEANUP 89 90 - name: Ubuntu Focal Build 91 language: bash 92 script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 93 94 - name: Ubuntu Focal Build (arm) 95 arch: arm64 96 language: bash 97 script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 98 99 - name: Ubuntu Focal Build (s390x) 100 arch: s390x 101 language: bash 102 script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 103 104 - name: Ubuntu Focal Build (ppc64le) 105 arch: ppc64le 106 language: bash 107 script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 108 109 - stage: Coverity 110 language: bash 111 env: 112 # Coverity configuration 113 # COVERITY_SCAN_TOKEN=xxx 114 # Encrypted using `travis encrypt --repo libbpf/libbpf COVERITY_SCAN_TOKEN=xxx` 115 - secure: "I9OsMRHbb82IUivDp+I+w/jEQFOJgBDAqYqf1ollqCM1QhocxMcS9bwIAgfPhdXi2hohV7sRrVMZstahY67FAvJLGxNopi4tAPDIAaIFxgO0yDxMhaTMx5xDfMwlIm2FOP/9gB9BQsd6M7CmoQZgXYwBIv7xd1ooxoQrh2rOK1YrRl7UQu3+c3zPTjDfIYZzR3bFttMqZ9/c4U0v8Ry5IFXrel3hCshndHA1TtttJrUSrILlZcmVc1ch7JIy6zCbCU/2lGv0B/7rWXfF8MT7O9jPtFOhJ1DEcd2zhw2n4j9YT3a8OhtnM61LA6ask632mwCOsxpFLTun7AzuR1Cb5mdPHsxhxnCHcXXARa2mJjem0QG1NhwxwJE8sbRDapojexxCvweYlEN40ofwMDSnj/qNt95XIcrk0tiIhGFx0gVNWvAdmZwx+N4mwGPMTAN0AEOFjpgI+ZdB89m+tL/CbEgE1flc8QxUxJhcp5OhH6yR0z9qYOp0nXIbHsIaCiRvt/7LqFRQfheifztWVz4mdQlCdKS9gcOQ09oKicPevKO1L0Ue3cb7Ug7jOpMs+cdh3XokJtUeYEr1NijMHT9+CTAhhO5RToWXIZRon719z3fwoUBNDREATwVFMlVxqSO/pbYgaKminigYbl785S89YYaZ6E5UvaKRHM6KHKMDszs=" 116 - COVERITY_SCAN_PROJECT_NAME="libbpf" 117 - COVERITY_SCAN_NOTIFICATION_EMAIL="${AUTHOR_EMAIL}" 118 - COVERITY_SCAN_BRANCH_PATTERN="$TRAVIS_BRANCH" 119 # Note: `make -C src/` as a BUILD_COMMAND will not work here 120 - COVERITY_SCAN_BUILD_COMMAND_PREPEND="cd src/" 121 - COVERITY_SCAN_BUILD_COMMAND="make" 122 install: 123 - sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' >>/etc/apt/sources.list 124 - sudo apt-get update 125 - sudo apt-get -y build-dep libelf-dev 126 - sudo apt-get install -y libelf-dev pkg-config 127 script: 128 - scripts/coverity.sh || travis_terminate 1 129 allow_failures: 130 - env: KERNEL=x.x.x 131