2019-04-17 18:02:45 +00:00
|
|
|
sudo: required
|
2019-11-15 19:04:51 +00:00
|
|
|
language: bash
|
2021-02-02 05:01:22 +00:00
|
|
|
dist: focal
|
2019-04-17 18:02:45 +00:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
2019-11-15 19:04:51 +00:00
|
|
|
- PROJECT_NAME='libbpf'
|
2019-10-31 12:15:15 +00:00
|
|
|
- AUTHOR_EMAIL="$(git log -1 --pretty=\"%aE\")"
|
2019-04-17 18:02:45 +00:00
|
|
|
- REPO_ROOT="$TRAVIS_BUILD_DIR"
|
2020-02-20 20:28:46 +00:00
|
|
|
- CI_ROOT="$REPO_ROOT/travis-ci"
|
|
|
|
- VMTEST_ROOT="$CI_ROOT/vmtest"
|
2019-11-15 19:04:51 +00:00
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- qemu-kvm
|
|
|
|
- zstd
|
2020-02-12 20:20:53 +00:00
|
|
|
- binutils-dev
|
|
|
|
- elfutils
|
|
|
|
- libcap-dev
|
|
|
|
- libelf-dev
|
2020-02-21 23:11:54 +00:00
|
|
|
- libdw-dev
|
2019-04-17 18:02:45 +00:00
|
|
|
|
2019-10-31 12:15:15 +00:00
|
|
|
stages:
|
|
|
|
# Run Coverity periodically instead of for each PR for following reasons:
|
|
|
|
# 1) Coverity jobs are heavily rate-limited
|
|
|
|
# 2) Due to security restrictions of encrypted environment variables
|
|
|
|
# in Travis CI, pull requests made from forks can't access encrypted
|
|
|
|
# env variables, making Coverity unusable
|
|
|
|
# See: https://docs.travis-ci.com/user/pull-requests#pull-requests-and-security-restrictions
|
|
|
|
- name: Coverity
|
|
|
|
if: type = cron
|
|
|
|
|
2019-04-17 18:02:45 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
2020-08-11 05:12:02 +00:00
|
|
|
- stage: Builds & Tests
|
2021-04-29 19:57:54 +00:00
|
|
|
name: Kernel 5.5.0 + selftests
|
2020-07-08 23:25:18 +00:00
|
|
|
language: bash
|
2021-04-29 19:57:54 +00:00
|
|
|
env: KERNEL=5.5.0
|
2020-07-08 23:25:18 +00:00
|
|
|
script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1
|
|
|
|
|
2021-04-29 19:57:54 +00:00
|
|
|
- name: Kernel LATEST + selftests
|
2020-07-08 23:25:18 +00:00
|
|
|
language: bash
|
2021-04-29 19:57:54 +00:00
|
|
|
env: KERNEL=LATEST
|
2020-07-08 23:25:18 +00:00
|
|
|
script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1
|
|
|
|
|
2021-04-29 19:57:54 +00:00
|
|
|
- name: Kernel 4.9.0 + selftests
|
2020-07-08 23:25:18 +00:00
|
|
|
language: bash
|
2021-04-29 19:57:54 +00:00
|
|
|
env: KERNEL=4.9.0
|
2020-07-08 23:25:18 +00:00
|
|
|
script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1
|
|
|
|
|
2020-08-11 05:12:02 +00:00
|
|
|
- name: Debian Build
|
2019-04-17 18:02:45 +00:00
|
|
|
language: bash
|
2020-02-20 20:28:46 +00:00
|
|
|
install: $CI_ROOT/managers/debian.sh SETUP
|
2020-06-10 18:55:38 +00:00
|
|
|
script: $CI_ROOT/managers/debian.sh RUN || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
after_script: $CI_ROOT/managers/debian.sh CLEANUP
|
2019-04-17 18:02:45 +00:00
|
|
|
|
2020-02-20 20:28:46 +00:00
|
|
|
- name: Debian Build (ASan+UBSan)
|
2019-04-17 18:02:45 +00:00
|
|
|
language: bash
|
2020-02-20 20:28:46 +00:00
|
|
|
install: $CI_ROOT/managers/debian.sh SETUP
|
2020-06-10 18:55:38 +00:00
|
|
|
script: $CI_ROOT/managers/debian.sh RUN_ASAN || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
after_script: $CI_ROOT/managers/debian.sh CLEANUP
|
2019-04-17 18:02:45 +00:00
|
|
|
|
2020-02-20 20:28:46 +00:00
|
|
|
- name: Debian Build (clang)
|
2019-04-17 18:02:45 +00:00
|
|
|
language: bash
|
2020-02-20 20:28:46 +00:00
|
|
|
install: $CI_ROOT/managers/debian.sh SETUP
|
2020-06-10 18:55:38 +00:00
|
|
|
script: $CI_ROOT/managers/debian.sh RUN_CLANG || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
after_script: $CI_ROOT/managers/debian.sh CLEANUP
|
2019-04-17 18:02:45 +00:00
|
|
|
|
2020-02-20 20:28:46 +00:00
|
|
|
- name: Debian Build (clang ASan+UBSan)
|
2019-04-17 18:02:45 +00:00
|
|
|
language: bash
|
2020-02-20 20:28:46 +00:00
|
|
|
install: $CI_ROOT/managers/debian.sh SETUP
|
2020-06-10 18:55:38 +00:00
|
|
|
script: $CI_ROOT/managers/debian.sh RUN_CLANG_ASAN || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
after_script: $CI_ROOT/managers/debian.sh CLEANUP
|
2019-04-19 18:36:09 +00:00
|
|
|
|
2021-02-22 19:42:57 +00:00
|
|
|
- name: Debian Build (gcc-10)
|
2019-04-29 21:06:46 +00:00
|
|
|
language: bash
|
2020-02-20 20:28:46 +00:00
|
|
|
install: $CI_ROOT/managers/debian.sh SETUP
|
2021-02-22 19:42:57 +00:00
|
|
|
script: $CI_ROOT/managers/debian.sh RUN_GCC10 || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
after_script: $CI_ROOT/managers/debian.sh CLEANUP
|
2019-04-29 21:06:46 +00:00
|
|
|
|
2021-02-22 19:42:57 +00:00
|
|
|
- name: Debian Build (gcc-10 ASan+UBSan)
|
2019-04-29 21:06:46 +00:00
|
|
|
language: bash
|
2020-02-20 20:28:46 +00:00
|
|
|
install: $CI_ROOT/managers/debian.sh SETUP
|
2021-02-22 19:42:57 +00:00
|
|
|
script: $CI_ROOT/managers/debian.sh RUN_GCC10_ASAN || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
after_script: $CI_ROOT/managers/debian.sh CLEANUP
|
2019-04-29 21:06:46 +00:00
|
|
|
|
2021-02-02 05:01:22 +00:00
|
|
|
- name: Ubuntu Focal Build
|
2019-04-17 18:02:45 +00:00
|
|
|
language: bash
|
2020-06-10 18:55:38 +00:00
|
|
|
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1
|
2019-10-23 08:42:21 +00:00
|
|
|
|
2021-02-02 05:01:22 +00:00
|
|
|
- name: Ubuntu Focal Build (arm)
|
2019-10-23 08:42:21 +00:00
|
|
|
arch: arm64
|
|
|
|
language: bash
|
2020-06-10 18:55:38 +00:00
|
|
|
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1
|
2019-10-31 12:15:15 +00:00
|
|
|
|
2021-02-02 05:01:22 +00:00
|
|
|
- name: Ubuntu Focal Build (s390x)
|
2020-08-11 05:12:02 +00:00
|
|
|
arch: s390x
|
|
|
|
language: bash
|
|
|
|
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1
|
2019-11-14 12:32:35 +00:00
|
|
|
|
2021-02-02 05:01:22 +00:00
|
|
|
- name: Ubuntu Focal Build (ppc64le)
|
2019-12-10 10:35:24 +00:00
|
|
|
arch: ppc64le
|
|
|
|
language: bash
|
2020-06-10 18:55:38 +00:00
|
|
|
script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1
|
2020-02-20 20:28:46 +00:00
|
|
|
|
2019-10-31 12:15:15 +00:00
|
|
|
- stage: Coverity
|
|
|
|
language: bash
|
|
|
|
env:
|
|
|
|
# Coverity configuration
|
|
|
|
# COVERITY_SCAN_TOKEN=xxx
|
|
|
|
# Encrypted using `travis encrypt --repo libbpf/libbpf COVERITY_SCAN_TOKEN=xxx`
|
|
|
|
- secure: "I9OsMRHbb82IUivDp+I+w/jEQFOJgBDAqYqf1ollqCM1QhocxMcS9bwIAgfPhdXi2hohV7sRrVMZstahY67FAvJLGxNopi4tAPDIAaIFxgO0yDxMhaTMx5xDfMwlIm2FOP/9gB9BQsd6M7CmoQZgXYwBIv7xd1ooxoQrh2rOK1YrRl7UQu3+c3zPTjDfIYZzR3bFttMqZ9/c4U0v8Ry5IFXrel3hCshndHA1TtttJrUSrILlZcmVc1ch7JIy6zCbCU/2lGv0B/7rWXfF8MT7O9jPtFOhJ1DEcd2zhw2n4j9YT3a8OhtnM61LA6ask632mwCOsxpFLTun7AzuR1Cb5mdPHsxhxnCHcXXARa2mJjem0QG1NhwxwJE8sbRDapojexxCvweYlEN40ofwMDSnj/qNt95XIcrk0tiIhGFx0gVNWvAdmZwx+N4mwGPMTAN0AEOFjpgI+ZdB89m+tL/CbEgE1flc8QxUxJhcp5OhH6yR0z9qYOp0nXIbHsIaCiRvt/7LqFRQfheifztWVz4mdQlCdKS9gcOQ09oKicPevKO1L0Ue3cb7Ug7jOpMs+cdh3XokJtUeYEr1NijMHT9+CTAhhO5RToWXIZRon719z3fwoUBNDREATwVFMlVxqSO/pbYgaKminigYbl785S89YYaZ6E5UvaKRHM6KHKMDszs="
|
|
|
|
- COVERITY_SCAN_PROJECT_NAME="libbpf"
|
|
|
|
- COVERITY_SCAN_NOTIFICATION_EMAIL="${AUTHOR_EMAIL}"
|
|
|
|
- COVERITY_SCAN_BRANCH_PATTERN="$TRAVIS_BRANCH"
|
|
|
|
# Note: `make -C src/` as a BUILD_COMMAND will not work here
|
|
|
|
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="cd src/"
|
|
|
|
- COVERITY_SCAN_BUILD_COMMAND="make"
|
|
|
|
install:
|
2021-02-02 05:01:22 +00:00
|
|
|
- sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' >>/etc/apt/sources.list
|
2019-11-02 22:23:19 +00:00
|
|
|
- sudo apt-get update
|
|
|
|
- sudo apt-get -y build-dep libelf-dev
|
|
|
|
- sudo apt-get install -y libelf-dev pkg-config
|
2019-10-31 12:15:15 +00:00
|
|
|
script:
|
2020-06-10 18:55:38 +00:00
|
|
|
- scripts/coverity.sh || travis_terminate 1
|
2020-07-01 18:51:46 +00:00
|
|
|
allow_failures:
|
2020-07-08 23:25:18 +00:00
|
|
|
- env: KERNEL=x.x.x
|