summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/covscan.yml60
-rw-r--r--.github/workflows/release.yml29
-rw-r--r--.github/workflows/selftests.yml63
3 files changed, 152 insertions, 0 deletions
diff --git a/.github/workflows/covscan.yml b/.github/workflows/covscan.yml
new file mode 100644
index 0000000..28dc46f
--- /dev/null
+++ b/.github/workflows/covscan.yml
@@ -0,0 +1,60 @@
+name: coverity-scan
+on:
+ schedule:
+ - cron: '0 18 * * 0' # Sundays at 18:00 UTC
+ push:
+ branches: [ "coverity_scan" ]
+
+jobs:
+ latest:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
+ - name: Prepare packages
+ run: |
+ sudo apt-get update
+ sudo apt-get install zstd binutils-dev elfutils libpcap-dev libelf-dev gcc-multilib pkg-config wireshark tshark bpfcc-tools python3 python3-pip python3-setuptools qemu-kvm rpm2cpio libdw-dev libdwarf-dev
+
+ - name: Prepare Clang
+ run: |
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" | sudo tee -a /etc/apt/sources.list
+ sudo apt-get -qq update
+ sudo apt-get -qq -y install clang-11 lld-11 llvm-11
+
+ - name: Download Coverity Build Tool
+ run: |
+ wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=xdp-project%2Fxdp-tools" -O cov-analysis-linux64.tar.gz
+ mkdir cov-analysis-linux64
+ tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
+ env:
+ TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
+
+ - name: Configure
+ run: ./configure
+ env:
+ CLANG: clang-11
+ LLC: llc-11
+
+ - name: Build with cov-build
+ run: |
+ export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
+ cov-build --dir cov-int make
+
+ - name: Submit the result to Coverity Scan
+ run: |
+ tar czvf xdp-tools.tgz cov-int
+ curl \
+ --form project=xdp-project/xdp-tools \
+ --form token=$TOKEN \
+ --form email=toke@redhat.com \
+ --form file=@xdp-tools.tgz \
+ --form version=trunk \
+ --form description="xdp-tools" \
+ https://scan.coverity.com/builds?project=xdp-project%2Fxdp-tools
+ env:
+ TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..8c41c61
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,29 @@
+---
+name: "tagged-release"
+
+on:
+ push:
+ tags:
+ - "v*"
+
+jobs:
+ tagged-release:
+ name: "Tagged Release"
+ runs-on: "ubuntu-latest"
+
+ steps:
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
+ - name: "Create source archive"
+ run: |
+ make archive
+
+ - uses: "marvinpinto/action-automatic-releases@v1.2.1"
+ with:
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ prerelease: false
+ files: |
+ *.tar.gz
diff --git a/.github/workflows/selftests.yml b/.github/workflows/selftests.yml
new file mode 100644
index 0000000..d83f85b
--- /dev/null
+++ b/.github/workflows/selftests.yml
@@ -0,0 +1,63 @@
+name: Selftests
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ include:
+ - KERNEL_VERSION: 6.1.9
+ KERNEL_PATCH_VERSION: 200.fc37
+ DID_UNSHARE: 0
+ - KERNEL_VERSION: 5.16.8
+ KERNEL_PATCH_VERSION: 200.fc35
+ DID_UNSHARE: 0
+ - KERNEL_VERSION: 5.11.0
+ KERNEL_PATCH_VERSION: 156.fc34
+ DID_UNSHARE: 1
+ - KERNEL_VERSION: 5.6.19
+ KERNEL_PATCH_VERSION: 300.fc32
+ DID_UNSHARE: 1
+ fail-fast: false
+
+ env:
+ KERNEL_VERSION: ${{ matrix.KERNEL_VERSION }}
+ KERNEL_PATCH_VERSION: ${{ matrix.KERNEL_PATCH_VERSION }}
+ DID_UNSHARE: ${{ matrix.DID_UNSHARE }}
+ CLANG: clang-11
+ LLC: llc-11
+
+ steps:
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+ - name: Prepare packages
+ run: |
+ sudo apt-get update
+ sudo apt-get install zstd binutils-dev elfutils libpcap-dev libelf-dev gcc-multilib pkg-config wireshark tshark bpfcc-tools python3 python3-pip python3-setuptools qemu-kvm rpm2cpio libdw-dev libdwarf-dev
+ - name: Prepare Clang
+ run: |
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
+ echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" | sudo tee -a /etc/apt/sources.list
+ sudo apt-get -qq update
+ sudo apt-get -qq -y install clang-11 lld-11 llvm-11
+ - name: Install latest bpftool
+ run: |
+ git clone --depth=1 --recurse-submodules https://github.com/libbpf/bpftool bpftool
+ make LLVM_STRIP=llvm-strip-11 -C bpftool/src
+ sudo make install -C bpftool/src prefix=/usr
+ - name: Compile
+ run: make
+ - name: Prepare test tools
+ run: .github/scripts/prepare_test_tools.sh
+ - name: Prepare test kernel
+ run: .github/scripts/prepare_test_kernel.sh
+ - name: Run tests
+ run: .github/scripts/run_tests_in_vm.sh