Files
libbpf/.travis.yml

195 lines
7.5 KiB
YAML
Raw Normal View History

sudo: required
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
language: bash
dist: bionic
services:
- docker
env:
global:
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
- PROJECT_NAME='libbpf'
2019-10-31 13:15:15 +01:00
- AUTHOR_EMAIL="$(git log -1 --pretty=\"%aE\")"
- CI_MANAGERS="$TRAVIS_BUILD_DIR/travis-ci/managers"
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
- VMTEST_DIR="$TRAVIS_BUILD_DIR/travis-ci/vmtest"
- REPO_ROOT="$TRAVIS_BUILD_DIR"
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
# Default setup command run on VM boot.
- VMTEST_SETUPCMD='echo 42'
jobs:
# Setup command override.
- KERNEL=5.4 VMTEST_SETUPCMD="PROJECT_NAME=${PROJECT_NAME} ./${PROJECT_NAME}/travis-ci/vmtest/setup_example.sh"
- KERNEL=5.3
- KERNEL=4.19.88
addons:
apt:
packages:
- qemu-kvm
- zstd
install: sudo adduser "${USER}" kvm
before_script:
# Escape whitespace characters.
- setup_cmd=$(sed 's/\([[:space:]]\)/\\\1/g' <<< "${VMTEST_SETUPCMD}")
- sudo -E sudo -E -u "${USER}" "${VMTEST_DIR}/run.sh" -k "${KERNEL}"'*' -o -d ~ -s "${setup_cmd}" ~/root.img; exitstatus=$?
- test $exitstatus -le 1
script:
- test $exitstatus -eq 0
2019-10-31 13:15:15 +01: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
jobs:
include:
- stage: Build & test
name: Debian Testing
language: bash
env:
- DEBIAN_RELEASE="testing"
- CONT_NAME="libbpf-debian-$DEBIAN_RELEASE"
before_install:
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- $CI_MANAGERS/debian.sh SETUP
# Override before_script: so VMTEST before_install commands are not executed.
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- $CI_MANAGERS/debian.sh RUN || travis_terminate
after_script:
- $CI_MANAGERS/debian.sh CLEANUP
- name: Debian Testing (ASan+UBSan)
language: bash
env:
- DEBIAN_RELEASE="testing"
- CONT_NAME="libbpf-debian-$DEBIAN_RELEASE"
before_install:
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- $CI_MANAGERS/debian.sh SETUP
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- $CI_MANAGERS/debian.sh RUN_ASAN || travis_terminate
after_script:
- $CI_MANAGERS/debian.sh CLEANUP
- name: Debian Testing (clang)
language: bash
env:
- DEBIAN_RELEASE="testing"
- CONT_NAME="libbpf-debian-$DEBIAN_RELEASE"
before_install:
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- $CI_MANAGERS/debian.sh SETUP
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- $CI_MANAGERS/debian.sh RUN_CLANG || travis_terminate
after_script:
- $CI_MANAGERS/debian.sh CLEANUP
- name: Debian Testing (clang ASan+UBSan)
language: bash
env:
- DEBIAN_RELEASE="testing"
- CONT_NAME="libbpf-debian-$DEBIAN_RELEASE"
before_install:
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- $CI_MANAGERS/debian.sh SETUP
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- $CI_MANAGERS/debian.sh RUN_CLANG_ASAN || travis_terminate
after_script:
- $CI_MANAGERS/debian.sh CLEANUP
- name: Debian Testing (gcc-8)
language: bash
env:
- DEBIAN_RELEASE="testing"
- CONT_NAME="libbpf-debian-$DEBIAN_RELEASE"
before_install:
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- $CI_MANAGERS/debian.sh SETUP
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- $CI_MANAGERS/debian.sh RUN_GCC8 || travis_terminate
after_script:
- $CI_MANAGERS/debian.sh CLEANUP
- name: Debian Testing (gcc-8 ASan+UBSan)
language: bash
env:
- DEBIAN_RELEASE="testing"
- CONT_NAME="libbpf-debian-$DEBIAN_RELEASE"
before_install:
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- $CI_MANAGERS/debian.sh SETUP
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- $CI_MANAGERS/debian.sh RUN_GCC8_ASAN || travis_terminate
after_script:
- $CI_MANAGERS/debian.sh CLEANUP
- name: Ubuntu Bionic
language: bash
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- sudo $CI_MANAGERS/ubuntu.sh || travis_terminate
2019-10-23 10:42:21 +02:00
- name: Ubuntu Bionic (arm)
2019-10-23 10:42:21 +02:00
arch: arm64
language: bash
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
2019-10-23 10:42:21 +02:00
script:
- sudo $CI_MANAGERS/ubuntu.sh || travis_terminate
2019-10-31 13:15:15 +01:00
- name: Ubuntu Bionic (s390x)
arch: s390x
language: bash
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
script:
- sudo $CI_MANAGERS/ubuntu.sh || travis_terminate
2019-12-10 11:35:24 +01:00
- name: Ubuntu Bionic (ppc64le)
arch: ppc64le
language: bash
libbpf: Add VMTEST to CI Extend continuous integration tests by adding testing against various kernel versions. The code is based on vmtest CI scripts implemented by osandov@ for drgn [1] with the following modifications: - The downloadables are stored in Amazon S3 cloud indexed in [2] - `--setup-cmd` command line option is added to vmtest/run.sh so setup commands run on VM boot can be set in e.g. `.travis.yml` - Travis build matrix [2] is introduced for VM tests so VM tests are followed by the existing CI tests. The matrix has `KERNEL` and `VMTEST_SETUPCMD` dimensions. - Minor style fixes. The vmtest extention code is located in travis-ci/vmtest and contains `run.sh` and `setup_example.sh` - `run.sh` is responsible for the vmtest workflow: downloading vmlinux and rootfs image from the cloud, fs mounting, syncing libbpf sources to the image, setting up scripts run on VM boot, starting VM using QEMU. `run.sh` covers more use cases than a script for a job run in TravisCI, e.g. int can build a kernel w/ `--build` option. - `setup_example.sh` is an example of a script run in VM which can be modified to e.g. run actual libbpf tests. A setup script should have executable permission. To set up a new kernel version for a test: 1) upload vmlinuz.* and vmlinux.*\.zst to Amazon S3 store located at [4]; 2) modify INDEX [2] file. [1] https://github.com/osandov/drgn [2] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/x86_64/INDEX [3] https://docs.travis-ci.com/user/build-matrix [4] https://libbpf-vmtest.s3-us-west-1.amazonaws.com/
2019-11-15 11:04:51 -08:00
before_script:
2019-12-10 11:35:24 +01:00
script:
- sudo $CI_MANAGERS/ubuntu.sh || travis_terminate
2019-10-31 13:15:15 +01: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:
- sudo echo 'deb-src http://archive.ubuntu.com/ubuntu/ bionic 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
# Override before_script: so VMTEST before_script commands are not executed.
before_script:
2019-10-31 13:15:15 +01:00
script:
- scripts/coverity.sh || travis_terminate