Skip to content

Commit

Permalink
Upgrade CI containers to debian:bookworm
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Aponte <[email protected]>
  • Loading branch information
federico-sysdig committed Feb 19, 2024
1 parent d5245e4 commit cb06364
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 32 deletions.
55 changes: 25 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ jobs:
cmake_opts: -DCMAKE_C_FLAGS="-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=undefined" -DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=undefined" -DUSE_BUNDLED_DEPS=False
ldflags: -lpthread
container:
image: debian:buster
image: debian:bookworm
steps:
- name: Install deps ⛓️
run: |
apt update && apt install -y --no-install-recommends ca-certificates cmake build-essential git clang llvm pkg-config autoconf automake libtool libelf-dev wget libc-ares-dev libcurl4-openssl-dev libssl-dev libtbb-dev libjq-dev libjsoncpp-dev libgrpc++-dev protobuf-compiler-grpc libgtest-dev libprotobuf-dev liblua5.2-dev linux-headers-${{ matrix.arch }}
apt update
apt install -y --no-install-recommends ca-certificates cmake build-essential git clang llvm pkg-config autoconf automake libtool libelf-dev wget libc-ares-dev libcurl4-openssl-dev libssl-dev libtbb-dev libjq-dev libjsoncpp-dev libgrpc++-dev protobuf-compiler-grpc libgtest-dev libprotobuf-dev liblua5.2-dev linux-headers-${{ matrix.arch }}
- name: Checkout Libs ⤵️
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -58,10 +59,9 @@ jobs:
env:
UBSAN_OPTIONS: print_stacktrace=1
run: |
mkdir -p build
cd build && LDFLAGS="${{ matrix.ldflags }}" cmake ${{ matrix.cmake_opts }} ../
KERNELDIR=/lib/modules/$(ls /lib/modules)/build make -j4
make run-unit-tests
LDFLAGS="${{ matrix.ldflags }}" cmake -B build -S . ${{ matrix.cmake_opts }}
KERNELDIR=/lib/modules/$(ls /lib/modules)/build cmake --build build -j4
cmake --build build --target run-unit-tests
build-libs-linux-amd64-static:
name: build-libs-linux-amd64-static 🎃
Expand All @@ -84,9 +84,8 @@ jobs:
- name: Build and test 🏗️🧪
run: |
mkdir -p build
cd build && cmake -DBUILD_BPF=On -DBUILD_DRIVER=Off -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DUSE_SHARED_LIBELF=Off -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On ../
make run-unit-tests -j4
cmake -B build -S . -DBUILD_BPF=On -DBUILD_DRIVER=Off -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DUSE_SHARED_LIBELF=Off -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On
cmake --build build -j4 --target run-unit-tests
build-shared-libs-linux-amd64:
name: build-shared-libs-linux-amd64 🧐
Expand All @@ -110,14 +109,13 @@ jobs:
- name: Build and test 🏗️🧪
run: |
mkdir -p build
cd build && cmake -DBUILD_SHARED_LIBS=True -DUSE_BUNDLED_DEPS=False -DMINIMAL_BUILD=True -DCMAKE_INSTALL_PREFIX=/tmp/libs-test ../
make -j4
make run-unit-tests
cmake -B build -S . -DBUILD_SHARED_LIBS=True -DUSE_BUNDLED_DEPS=False -DMINIMAL_BUILD=True -DCMAKE_INSTALL_PREFIX=/tmp/libs-test
cmake --build build -j4
cmake --build build --target run-unit-tests
- name: Install
run: |
cd build
make install
cmake --build build --target install
- name: Test sinsp-example build with pkg-config
run: |
Expand Down Expand Up @@ -149,9 +147,9 @@ jobs:

- name: Build and test 🏗️🧪
run: |
mkdir -p build
cd build && cmake -DUSE_BUNDLED_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.crt }} -DCREATE_TEST_TARGETS=ON -DMINIMAL_BUILD=ON ..
cmake --build . --config Release && make run-unit-tests || libsinsp\test\Release\unit-test-libsinsp.exe
cmake -B build -S . -DUSE_BUNDLED_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.crt }} -DCREATE_TEST_TARGETS=ON -DMINIMAL_BUILD=ON
cmake --build build --config Release
cmake --build build --target run-unit-tests || libsinsp\test\Release\unit-test-libsinsp.exe
build-shared-libs-macos-amd64:
name: build-shared-libs-macos-amd64 😨
Expand All @@ -171,13 +169,12 @@ jobs:
- name: Build 🏗️
run: |
mkdir -p build
cd build && cmake -DBUILD_SHARED_LIBS=True -DUSE_BUNDLED_DEPS=False -DUSE_BUNDLED_VALIJSON=ON -DCMAKE_BUILD_TYPE=Release -DCREATE_TEST_TARGETS=OFF -DMINIMAL_BUILD=ON -DCMAKE_INSTALL_PREFIX=/tmp/libs-test ..
cmake -B build -S . -DBUILD_SHARED_LIBS=True -DUSE_BUNDLED_DEPS=False -DUSE_BUNDLED_VALIJSON=ON -DCMAKE_BUILD_TYPE=Release -DCREATE_TEST_TARGETS=OFF -DMINIMAL_BUILD=ON -DCMAKE_INSTALL_PREFIX=/tmp/libs-test
cmake --build . --config Release
- name: Install
run: |
cd build
make install
cmake --build build --target install
- name: Test sinsp-example build with pkg-config 🧪
run: |
Expand Down Expand Up @@ -211,9 +208,8 @@ jobs:
- name: Build sinsp-example
run: |
mkdir -p build
cd build && cmake -DUSE_BUNDLED_DEPS=On -DBUILD_DRIVER=ON -DBUILD_LIBSCAP_MODERN_BPF=ON -DBUILD_BPF=On -DBUILD_LIBSCAP_GVISOR=On -DCREATE_TEST_TARGETS=Off -DENABLE_LIBSCAP_TESTS=Off ../
make -j$(nproc) sinsp-example
cmake -B build -S . -DUSE_BUNDLED_DEPS=On -DBUILD_DRIVER=ON -DBUILD_LIBSCAP_MODERN_BPF=ON -DBUILD_BPF=On -DBUILD_LIBSCAP_GVISOR=On -DCREATE_TEST_TARGETS=Off -DENABLE_LIBSCAP_TESTS=Off
cmake --build build -j$(nproc) --target sinsp-example
- name: Ensure that sinsp-example with bundled deps is as static as possible
run: |
Expand Down Expand Up @@ -294,16 +290,15 @@ jobs:
- name: Build and test 🏗️🧪
run: |
mkdir -p build && cd build
cmake -DBUILD_BPF=ON \
cmake -B build -S . \
-DBUILD_BPF=ON \
-DBUILD_LIBSCAP_MODERN_BPF=ON \
-DBUILD_LIBSCAP_GVISOR=OFF \
${{ matrix.cmake_opts }} \
-DUSE_BUNDLED_LIBBPF=ON \
..
make -j$(nproc) sinsp-example driver bpf
sudo make e2e-install-deps
sudo ../test/e2e/scripts/run_tests.sh
-DUSE_BUNDLED_LIBBPF=ON
cmake --build build -j$(nproc) --target sinsp-example driver bpf
sudo cmake --build build --target e2e-install-deps
sudo ./test/e2e/scripts/run_tests.sh
- name: Archive test reports
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/containers/sinsp.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:buster
FROM debian:bookworm

ENV HOST_ROOT /host

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/containers/tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:buster
FROM debian:bookworm

WORKDIR /tests
ENV CONTAINERIZED=1
Expand Down

0 comments on commit cb06364

Please sign in to comment.