17c2aad20Sopenharmony_cisudo: required 27c2aad20Sopenharmony_cilanguage: bash 37c2aad20Sopenharmony_cidist: focal 47c2aad20Sopenharmony_ciservices: 57c2aad20Sopenharmony_ci - docker 67c2aad20Sopenharmony_ci 77c2aad20Sopenharmony_cienv: 87c2aad20Sopenharmony_ci global: 97c2aad20Sopenharmony_ci - PROJECT_NAME='libbpf' 107c2aad20Sopenharmony_ci - AUTHOR_EMAIL="$(git log -1 --pretty=\"%aE\")" 117c2aad20Sopenharmony_ci - REPO_ROOT="$TRAVIS_BUILD_DIR" 127c2aad20Sopenharmony_ci - CI_ROOT="$REPO_ROOT/travis-ci" 137c2aad20Sopenharmony_ci - VMTEST_ROOT="$CI_ROOT/vmtest" 147c2aad20Sopenharmony_ci 157c2aad20Sopenharmony_ciaddons: 167c2aad20Sopenharmony_ci apt: 177c2aad20Sopenharmony_ci packages: 187c2aad20Sopenharmony_ci - qemu-kvm 197c2aad20Sopenharmony_ci - zstd 207c2aad20Sopenharmony_ci - binutils-dev 217c2aad20Sopenharmony_ci - elfutils 227c2aad20Sopenharmony_ci - libcap-dev 237c2aad20Sopenharmony_ci - libelf-dev 247c2aad20Sopenharmony_ci - libdw-dev 257c2aad20Sopenharmony_ci 267c2aad20Sopenharmony_cistages: 277c2aad20Sopenharmony_ci # Run Coverity periodically instead of for each PR for following reasons: 287c2aad20Sopenharmony_ci # 1) Coverity jobs are heavily rate-limited 297c2aad20Sopenharmony_ci # 2) Due to security restrictions of encrypted environment variables 307c2aad20Sopenharmony_ci # in Travis CI, pull requests made from forks can't access encrypted 317c2aad20Sopenharmony_ci # env variables, making Coverity unusable 327c2aad20Sopenharmony_ci # See: https://docs.travis-ci.com/user/pull-requests#pull-requests-and-security-restrictions 337c2aad20Sopenharmony_ci - name: Coverity 347c2aad20Sopenharmony_ci if: type = cron 357c2aad20Sopenharmony_ci 367c2aad20Sopenharmony_cijobs: 377c2aad20Sopenharmony_ci include: 387c2aad20Sopenharmony_ci - stage: Builds & Tests 397c2aad20Sopenharmony_ci name: Kernel 5.5.0 + selftests 407c2aad20Sopenharmony_ci language: bash 417c2aad20Sopenharmony_ci env: KERNEL=5.5.0 427c2aad20Sopenharmony_ci script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 437c2aad20Sopenharmony_ci 447c2aad20Sopenharmony_ci - name: Kernel LATEST + selftests 457c2aad20Sopenharmony_ci language: bash 467c2aad20Sopenharmony_ci env: KERNEL=LATEST 477c2aad20Sopenharmony_ci script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 487c2aad20Sopenharmony_ci 497c2aad20Sopenharmony_ci - name: Kernel 4.9.0 + selftests 507c2aad20Sopenharmony_ci language: bash 517c2aad20Sopenharmony_ci env: KERNEL=4.9.0 527c2aad20Sopenharmony_ci script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 537c2aad20Sopenharmony_ci 547c2aad20Sopenharmony_ci - name: Debian Build 557c2aad20Sopenharmony_ci language: bash 567c2aad20Sopenharmony_ci install: $CI_ROOT/managers/debian.sh SETUP 577c2aad20Sopenharmony_ci script: $CI_ROOT/managers/debian.sh RUN || travis_terminate 1 587c2aad20Sopenharmony_ci after_script: $CI_ROOT/managers/debian.sh CLEANUP 597c2aad20Sopenharmony_ci 607c2aad20Sopenharmony_ci - name: Debian Build (ASan+UBSan) 617c2aad20Sopenharmony_ci language: bash 627c2aad20Sopenharmony_ci install: $CI_ROOT/managers/debian.sh SETUP 637c2aad20Sopenharmony_ci script: $CI_ROOT/managers/debian.sh RUN_ASAN || travis_terminate 1 647c2aad20Sopenharmony_ci after_script: $CI_ROOT/managers/debian.sh CLEANUP 657c2aad20Sopenharmony_ci 667c2aad20Sopenharmony_ci - name: Debian Build (clang) 677c2aad20Sopenharmony_ci language: bash 687c2aad20Sopenharmony_ci install: $CI_ROOT/managers/debian.sh SETUP 697c2aad20Sopenharmony_ci script: $CI_ROOT/managers/debian.sh RUN_CLANG || travis_terminate 1 707c2aad20Sopenharmony_ci after_script: $CI_ROOT/managers/debian.sh CLEANUP 717c2aad20Sopenharmony_ci 727c2aad20Sopenharmony_ci - name: Debian Build (clang ASan+UBSan) 737c2aad20Sopenharmony_ci language: bash 747c2aad20Sopenharmony_ci install: $CI_ROOT/managers/debian.sh SETUP 757c2aad20Sopenharmony_ci script: $CI_ROOT/managers/debian.sh RUN_CLANG_ASAN || travis_terminate 1 767c2aad20Sopenharmony_ci after_script: $CI_ROOT/managers/debian.sh CLEANUP 777c2aad20Sopenharmony_ci 787c2aad20Sopenharmony_ci - name: Debian Build (gcc-10) 797c2aad20Sopenharmony_ci language: bash 807c2aad20Sopenharmony_ci install: $CI_ROOT/managers/debian.sh SETUP 817c2aad20Sopenharmony_ci script: $CI_ROOT/managers/debian.sh RUN_GCC10 || travis_terminate 1 827c2aad20Sopenharmony_ci after_script: $CI_ROOT/managers/debian.sh CLEANUP 837c2aad20Sopenharmony_ci 847c2aad20Sopenharmony_ci - name: Debian Build (gcc-10 ASan+UBSan) 857c2aad20Sopenharmony_ci language: bash 867c2aad20Sopenharmony_ci install: $CI_ROOT/managers/debian.sh SETUP 877c2aad20Sopenharmony_ci script: $CI_ROOT/managers/debian.sh RUN_GCC10_ASAN || travis_terminate 1 887c2aad20Sopenharmony_ci after_script: $CI_ROOT/managers/debian.sh CLEANUP 897c2aad20Sopenharmony_ci 907c2aad20Sopenharmony_ci - name: Ubuntu Focal Build 917c2aad20Sopenharmony_ci language: bash 927c2aad20Sopenharmony_ci script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 937c2aad20Sopenharmony_ci 947c2aad20Sopenharmony_ci - name: Ubuntu Focal Build (arm) 957c2aad20Sopenharmony_ci arch: arm64 967c2aad20Sopenharmony_ci language: bash 977c2aad20Sopenharmony_ci script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 987c2aad20Sopenharmony_ci 997c2aad20Sopenharmony_ci - name: Ubuntu Focal Build (s390x) 1007c2aad20Sopenharmony_ci arch: s390x 1017c2aad20Sopenharmony_ci language: bash 1027c2aad20Sopenharmony_ci script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 1037c2aad20Sopenharmony_ci 1047c2aad20Sopenharmony_ci - name: Ubuntu Focal Build (ppc64le) 1057c2aad20Sopenharmony_ci arch: ppc64le 1067c2aad20Sopenharmony_ci language: bash 1077c2aad20Sopenharmony_ci script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 1087c2aad20Sopenharmony_ci 1097c2aad20Sopenharmony_ci - stage: Coverity 1107c2aad20Sopenharmony_ci language: bash 1117c2aad20Sopenharmony_ci env: 1127c2aad20Sopenharmony_ci # Coverity configuration 1137c2aad20Sopenharmony_ci # COVERITY_SCAN_TOKEN=xxx 1147c2aad20Sopenharmony_ci # Encrypted using `travis encrypt --repo libbpf/libbpf COVERITY_SCAN_TOKEN=xxx` 1157c2aad20Sopenharmony_ci - secure: "I9OsMRHbb82IUivDp+I+w/jEQFOJgBDAqYqf1ollqCM1QhocxMcS9bwIAgfPhdXi2hohV7sRrVMZstahY67FAvJLGxNopi4tAPDIAaIFxgO0yDxMhaTMx5xDfMwlIm2FOP/9gB9BQsd6M7CmoQZgXYwBIv7xd1ooxoQrh2rOK1YrRl7UQu3+c3zPTjDfIYZzR3bFttMqZ9/c4U0v8Ry5IFXrel3hCshndHA1TtttJrUSrILlZcmVc1ch7JIy6zCbCU/2lGv0B/7rWXfF8MT7O9jPtFOhJ1DEcd2zhw2n4j9YT3a8OhtnM61LA6ask632mwCOsxpFLTun7AzuR1Cb5mdPHsxhxnCHcXXARa2mJjem0QG1NhwxwJE8sbRDapojexxCvweYlEN40ofwMDSnj/qNt95XIcrk0tiIhGFx0gVNWvAdmZwx+N4mwGPMTAN0AEOFjpgI+ZdB89m+tL/CbEgE1flc8QxUxJhcp5OhH6yR0z9qYOp0nXIbHsIaCiRvt/7LqFRQfheifztWVz4mdQlCdKS9gcOQ09oKicPevKO1L0Ue3cb7Ug7jOpMs+cdh3XokJtUeYEr1NijMHT9+CTAhhO5RToWXIZRon719z3fwoUBNDREATwVFMlVxqSO/pbYgaKminigYbl785S89YYaZ6E5UvaKRHM6KHKMDszs=" 1167c2aad20Sopenharmony_ci - COVERITY_SCAN_PROJECT_NAME="libbpf" 1177c2aad20Sopenharmony_ci - COVERITY_SCAN_NOTIFICATION_EMAIL="${AUTHOR_EMAIL}" 1187c2aad20Sopenharmony_ci - COVERITY_SCAN_BRANCH_PATTERN="$TRAVIS_BRANCH" 1197c2aad20Sopenharmony_ci # Note: `make -C src/` as a BUILD_COMMAND will not work here 1207c2aad20Sopenharmony_ci - COVERITY_SCAN_BUILD_COMMAND_PREPEND="cd src/" 1217c2aad20Sopenharmony_ci - COVERITY_SCAN_BUILD_COMMAND="make" 1227c2aad20Sopenharmony_ci install: 1237c2aad20Sopenharmony_ci - sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' >>/etc/apt/sources.list 1247c2aad20Sopenharmony_ci - sudo apt-get update 1257c2aad20Sopenharmony_ci - sudo apt-get -y build-dep libelf-dev 1267c2aad20Sopenharmony_ci - sudo apt-get install -y libelf-dev pkg-config 1277c2aad20Sopenharmony_ci script: 1287c2aad20Sopenharmony_ci - scripts/coverity.sh || travis_terminate 1 1297c2aad20Sopenharmony_ci allow_failures: 1307c2aad20Sopenharmony_ci - env: KERNEL=x.x.x 131