From 363dafcba57f5ac44a19021efb9313ac8f2d0f97 Mon Sep 17 00:00:00 2001 From: lixing Date: Wed, 23 Apr 2025 09:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=AE=E5=BC=82=E5=90=8C=E6=AD=A5=20Signed-o?= =?UTF-8?q?ff-by:lixing=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lixing --- .lgtm.yml | 144 +++++----------------------------------------------- .travis.yml | 144 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 144 insertions(+), 144 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index 6a3b304..02774fe 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,130 +1,14 @@ -sudo: required -language: bash -dist: focal -services: - - docker - -env: - global: - - PROJECT_NAME='libbpf' - - AUTHOR_EMAIL="$(git log -1 --pretty=\"%aE\")" - - REPO_ROOT="$TRAVIS_BUILD_DIR" - - CI_ROOT="$REPO_ROOT/travis-ci" - - VMTEST_ROOT="$CI_ROOT/vmtest" - -addons: - apt: - packages: - - qemu-kvm - - zstd - - binutils-dev - - elfutils - - libcap-dev - - libelf-dev - - libdw-dev - -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 - -jobs: - include: - - stage: Builds & Tests - name: Kernel 5.5.0 + selftests - language: bash - env: KERNEL=5.5.0 - script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 - - - name: Kernel LATEST + selftests - language: bash - env: KERNEL=LATEST - script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 - - - name: Kernel 4.9.0 + selftests - language: bash - env: KERNEL=4.9.0 - script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 - - - name: Debian Build - language: bash - install: $CI_ROOT/managers/debian.sh SETUP - script: $CI_ROOT/managers/debian.sh RUN || travis_terminate 1 - after_script: $CI_ROOT/managers/debian.sh CLEANUP - - - name: Debian Build (ASan+UBSan) - language: bash - install: $CI_ROOT/managers/debian.sh SETUP - script: $CI_ROOT/managers/debian.sh RUN_ASAN || travis_terminate 1 - after_script: $CI_ROOT/managers/debian.sh CLEANUP - - - name: Debian Build (clang) - language: bash - install: $CI_ROOT/managers/debian.sh SETUP - script: $CI_ROOT/managers/debian.sh RUN_CLANG || travis_terminate 1 - after_script: $CI_ROOT/managers/debian.sh CLEANUP - - - name: Debian Build (clang ASan+UBSan) - language: bash - install: $CI_ROOT/managers/debian.sh SETUP - script: $CI_ROOT/managers/debian.sh RUN_CLANG_ASAN || travis_terminate 1 - after_script: $CI_ROOT/managers/debian.sh CLEANUP - - - name: Debian Build (gcc-10) - language: bash - install: $CI_ROOT/managers/debian.sh SETUP - script: $CI_ROOT/managers/debian.sh RUN_GCC10 || travis_terminate 1 - after_script: $CI_ROOT/managers/debian.sh CLEANUP - - - name: Debian Build (gcc-10 ASan+UBSan) - language: bash - install: $CI_ROOT/managers/debian.sh SETUP - script: $CI_ROOT/managers/debian.sh RUN_GCC10_ASAN || travis_terminate 1 - after_script: $CI_ROOT/managers/debian.sh CLEANUP - - - name: Ubuntu Focal Build - language: bash - script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 - - - name: Ubuntu Focal Build (arm) - arch: arm64 - language: bash - script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 - - - name: Ubuntu Focal Build (s390x) - arch: s390x - language: bash - script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 - - - name: Ubuntu Focal Build (ppc64le) - arch: ppc64le - language: bash - script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 - - - 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: - - sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' >>/etc/apt/sources.list - - sudo apt-get update - - sudo apt-get -y build-dep libelf-dev - - sudo apt-get install -y libelf-dev pkg-config - script: - - scripts/coverity.sh || travis_terminate 1 - allow_failures: - - env: KERNEL=x.x.x \ No newline at end of file +# vi: set ts=2 sw=2: +extraction: + cpp: + prepare: + packages: + - libelf-dev + - pkg-config + after_prepare: + # As the buildsystem detection by LGTM is performed _only_ during the + # 'configure' phase, we need to trick LGTM we use a supported build + # system (configure, meson, cmake, etc.). This way LGTM correctly detects + # that our sources are in the src/ subfolder. + - touch src/configure + - chmod +x src/configure \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 02774fe..6a3b304 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,130 @@ -# vi: set ts=2 sw=2: -extraction: - cpp: - prepare: - packages: - - libelf-dev - - pkg-config - after_prepare: - # As the buildsystem detection by LGTM is performed _only_ during the - # 'configure' phase, we need to trick LGTM we use a supported build - # system (configure, meson, cmake, etc.). This way LGTM correctly detects - # that our sources are in the src/ subfolder. - - touch src/configure - - chmod +x src/configure \ No newline at end of file +sudo: required +language: bash +dist: focal +services: + - docker + +env: + global: + - PROJECT_NAME='libbpf' + - AUTHOR_EMAIL="$(git log -1 --pretty=\"%aE\")" + - REPO_ROOT="$TRAVIS_BUILD_DIR" + - CI_ROOT="$REPO_ROOT/travis-ci" + - VMTEST_ROOT="$CI_ROOT/vmtest" + +addons: + apt: + packages: + - qemu-kvm + - zstd + - binutils-dev + - elfutils + - libcap-dev + - libelf-dev + - libdw-dev + +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 + +jobs: + include: + - stage: Builds & Tests + name: Kernel 5.5.0 + selftests + language: bash + env: KERNEL=5.5.0 + script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 + + - name: Kernel LATEST + selftests + language: bash + env: KERNEL=LATEST + script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 + + - name: Kernel 4.9.0 + selftests + language: bash + env: KERNEL=4.9.0 + script: $CI_ROOT/vmtest/run_vmtest.sh || travis_terminate 1 + + - name: Debian Build + language: bash + install: $CI_ROOT/managers/debian.sh SETUP + script: $CI_ROOT/managers/debian.sh RUN || travis_terminate 1 + after_script: $CI_ROOT/managers/debian.sh CLEANUP + + - name: Debian Build (ASan+UBSan) + language: bash + install: $CI_ROOT/managers/debian.sh SETUP + script: $CI_ROOT/managers/debian.sh RUN_ASAN || travis_terminate 1 + after_script: $CI_ROOT/managers/debian.sh CLEANUP + + - name: Debian Build (clang) + language: bash + install: $CI_ROOT/managers/debian.sh SETUP + script: $CI_ROOT/managers/debian.sh RUN_CLANG || travis_terminate 1 + after_script: $CI_ROOT/managers/debian.sh CLEANUP + + - name: Debian Build (clang ASan+UBSan) + language: bash + install: $CI_ROOT/managers/debian.sh SETUP + script: $CI_ROOT/managers/debian.sh RUN_CLANG_ASAN || travis_terminate 1 + after_script: $CI_ROOT/managers/debian.sh CLEANUP + + - name: Debian Build (gcc-10) + language: bash + install: $CI_ROOT/managers/debian.sh SETUP + script: $CI_ROOT/managers/debian.sh RUN_GCC10 || travis_terminate 1 + after_script: $CI_ROOT/managers/debian.sh CLEANUP + + - name: Debian Build (gcc-10 ASan+UBSan) + language: bash + install: $CI_ROOT/managers/debian.sh SETUP + script: $CI_ROOT/managers/debian.sh RUN_GCC10_ASAN || travis_terminate 1 + after_script: $CI_ROOT/managers/debian.sh CLEANUP + + - name: Ubuntu Focal Build + language: bash + script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 + + - name: Ubuntu Focal Build (arm) + arch: arm64 + language: bash + script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 + + - name: Ubuntu Focal Build (s390x) + arch: s390x + language: bash + script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 + + - name: Ubuntu Focal Build (ppc64le) + arch: ppc64le + language: bash + script: sudo $CI_ROOT/managers/ubuntu.sh || travis_terminate 1 + + - 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: + - sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' >>/etc/apt/sources.list + - sudo apt-get update + - sudo apt-get -y build-dep libelf-dev + - sudo apt-get install -y libelf-dev pkg-config + script: + - scripts/coverity.sh || travis_terminate 1 + allow_failures: + - env: KERNEL=x.x.x \ No newline at end of file -- Gitee