Commit bd2f9d3 1 parent 1a6ab9f commit bd2f9d3 Copy full SHA for bd2f9d3
File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,43 @@ jobs:
298
298
KERNELDIR=/lib/modules/$(ls /lib/modules)/build make scap-open driver bpf unit-test-libsinsp -j6
299
299
./libsinsp/test/unit-test-libsinsp
300
300
301
+ # This job checks that a bundled deps of libs is as static as possible
302
+ test-libs-static :
303
+ name : test-libs-static (bundled_deps)
304
+ runs-on : ubuntu-22.04
305
+ steps :
306
+ - name : Checkout Libs ⤵️
307
+ uses : actions/checkout@v4
308
+ with :
309
+ fetch-depth : 0
310
+
311
+ - name : Install deps ⛓️
312
+ run : |
313
+ sudo apt update
314
+ sudo apt install -y --no-install-recommends ca-certificates cmake build-essential clang-14 llvm-14 git pkg-config autoconf automake libtool libelf-dev libcap-dev linux-headers-$(uname -r)
315
+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
316
+ sudo update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-14 90
317
+ sudo update-alternatives --install /usr/bin/llc llc /usr/bin/llc-14 90
318
+
319
+ - name : Build sinsp-example
320
+ run : |
321
+ mkdir -p build
322
+ 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 ../
323
+ make -j$(nproc) sinsp-example
324
+
325
+ - name : Ensure that sinsp-example with bundled deps is as static as possible
326
+ run : |
327
+ ldd "build/libsinsp/examples/sinsp-example" | cut --fields=2 | cut --delimiter=' ' --fields=1 | rev | cut --delimiter='/' --fields=1 | rev | sort --unique --version-sort > ldd_out.txt
328
+ cat > expected_ldd_out.txt <<EOF
329
+ ld-linux-x86-64.so.2
330
+ libc.so.6
331
+ libgcc_s.so.1
332
+ libm.so.6
333
+ libstdc++.so.6
334
+ linux-vdso.so.1
335
+ EOF
336
+ diff -u expected_ldd_out.txt ldd_out.txt
337
+
301
338
run-e2e-tests-amd64 :
302
339
name : run-e2e-tests-amd64
303
340
strategy :
You can’t perform that action at this time.
0 commit comments