Skip to content

Commit

Permalink
feat(ci): add e2e libsinsp tests
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Jan 31, 2024
1 parent 900c19e commit 2131dda
Showing 1 changed file with 64 additions and 1 deletion.
65 changes: 64 additions & 1 deletion .github/workflows/drivers_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
strategy:
matrix:
arch: [amd64, arm64]
fail-fast: false
fail-fast: false
steps:
- name: Checkout Libs ⤵️
if: needs.paths-filter.outputs.driver_needs_rebuild
Expand Down Expand Up @@ -174,6 +174,69 @@ jobs:
cd build
sudo ./test/drivers/drivers_test -k
test-e2e:
name: test-e2e-${{ matrix.arch }} 😇 (bundled_deps)
runs-on: ${{ (matrix.arch == 'arm64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-22.04' }}
runs-on: 'ubuntu-22.04'
needs: paths-filter
strategy:
matrix:
arch: [amd64, arm64]
fail-fast: false
steps:
- name: Checkout Libs ⤵️
if: needs.paths-filter.outputs.driver_needs_rebuild
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Install deps ⛓️
if: needs.paths-filter.outputs.driver_needs_rebuild
run: |
sudo apt update
sudo apt install -y --no-install-recommends ca-certificates cmake build-essential git pkg-config autoconf automake libelf-dev libcap-dev clang-14 llvm-14 libtool quota
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
sudo update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-14 90
sudo update-alternatives --install /usr/bin/llc llc /usr/bin/llc-14 90
git clone https://github.com/libbpf/bpftool.git --branch v7.3.0 --single-branch
cd bpftool
git submodule update --init
cd src && sudo make install
- name: Install kernel headers (actuated)
uses: self-actuated/get-kernel-sources@master
if: (needs.paths-filter.outputs.driver_needs_rebuild) && matrix.arch == 'arm64'

- name: Install kernel headers and gcc
if: (needs.paths-filter.outputs.driver_needs_rebuild) && matrix.arch == 'amd64'
run: |
sudo apt install -y --no-install-recommends linux-headers-$(uname -r) gcc-multilib g++-multilib
- name: Build drivers tests 🏗️
if: needs.paths-filter.outputs.driver_needs_rebuild
run: |
mkdir -p build
cd build && cmake -DUSE_BUNDLED_DEPS=ON -DENABLE_LIBSINSP_TESTS=ON -DBUILD_LIBSCAP_MODERN_BPF=ON -DBUILD_BPF=True -DBUILD_LIBSCAP_GVISOR=OFF ../
make -j6
- name: Run drivers_test with modern bpf 🏎️
if: needs.paths-filter.outputs.driver_needs_rebuild
run: |
cd build/test/libsinsp/
sudo ./tests -m
- name: Run drivers_test with bpf 🏎️
if: needs.paths-filter.outputs.driver_needs_rebuild
run: |
cd build/test/libsinsp/
sudo ./tests -b
- name: Run drivers_test with kmod 🏎️
if: needs.paths-filter.outputs.driver_needs_rebuild
run: |
cd build/test/libsinsp/
sudo ./tests -k
build-drivers-s390x-ppc64le:
name: build-drivers-${{ matrix.arch }} 😁 (system_deps)
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 2131dda

Please sign in to comment.