7 FILES_TO_PRINT="build/meson-logs/testlog.txt"
8 FILES_TO_PRINT="$FILES_TO_PRINT build/.ninja_log"
9 FILES_TO_PRINT="$FILES_TO_PRINT build/meson-logs/meson-log.txt"
10 FILES_TO_PRINT="$FILES_TO_PRINT build/gdb.log"
12 for pr_file in $FILES_TO_PRINT; do
13 if [ -e "$pr_file" ]; then
18 # We capture the error logs as artifacts in Github Actions, no need to dump
19 # them via a EXIT handler.
20 [ -n "$GITHUB_WORKFLOW" ] || trap on_error EXIT
22 install_libabigail() {
26 wget -q "http://mirrors.kernel.org/sourceware/libabigail/${version}.tar.gz"
27 tar -xf ${version}.tar.gz
28 cd $version && autoreconf -vfi && cd -
30 cd $version/build && ../configure --prefix=$instdir && cd -
31 make -C $version/build all install
36 configure_coredump() {
37 # No point in configuring coredump without gdb
38 which gdb >/dev/null || return 0
40 sudo sysctl -w kernel.core_pattern=/tmp/dpdk-core.%e.%p
44 ls /tmp/dpdk-core.*.* 2>/dev/null || return 0
45 for core in /tmp/dpdk-core.*.*; do
46 binary=$(sudo readelf -n $core |grep $(pwd)/build/ 2>/dev/null |head -n1)
47 [ -x $binary ] || binary=
48 sudo gdb $binary -c $core \
50 -ex 'thread apply all bt full' \
52 done |tee -a build/gdb.log
56 if [ "$AARCH64" = "true" ]; then
57 # convert the arch specifier
58 if [ "$CC_FOR_BUILD" = "gcc" ]; then
59 OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
60 elif [ "$CC_FOR_BUILD" = "clang" ]; then
61 OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
65 if [ "$BUILD_DOCS" = "true" ]; then
66 OPTS="$OPTS -Denable_docs=true"
69 if [ "$BUILD_32BIT" = "true" ]; then
70 OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"
71 export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
74 if [ "$DEF_LIB" = "static" ]; then
75 OPTS="$OPTS -Dexamples=l2fwd,l3fwd"
77 OPTS="$OPTS -Dexamples=all"
80 OPTS="$OPTS -Dmachine=default"
81 OPTS="$OPTS --default-library=$DEF_LIB"
82 OPTS="$OPTS --buildtype=debugoptimized"
83 OPTS="$OPTS -Dcheck_includes=true"
84 meson build --werror $OPTS
87 if [ "$AARCH64" != "true" ]; then
90 devtools/test-null.sh || failed="true"
92 [ "$failed" != "true" ]
95 if [ "$ABI_CHECKS" = "true" ]; then
96 LIBABIGAIL_VERSION=${LIBABIGAIL_VERSION:-libabigail-1.6}
98 if [ "$(cat libabigail/VERSION 2>/dev/null)" != "$LIBABIGAIL_VERSION" ]; then
100 # if we change libabigail, invalidate existing abi cache
104 if [ ! -d libabigail ]; then
105 install_libabigail $LIBABIGAIL_VERSION $(pwd)/libabigail
106 echo $LIBABIGAIL_VERSION > libabigail/VERSION
109 export PATH=$(pwd)/libabigail/bin:$PATH
111 REF_GIT_REPO=${REF_GIT_REPO:-https://dpdk.org/git/dpdk}
112 REF_GIT_TAG=${REF_GIT_TAG:-v19.11}
114 if [ "$(cat reference/VERSION 2>/dev/null)" != "$REF_GIT_TAG" ]; then
118 if [ ! -d reference ]; then
119 refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG)
120 git clone --single-branch -b $REF_GIT_TAG $REF_GIT_REPO $refsrcdir
121 meson $OPTS -Dexamples= $refsrcdir $refsrcdir/build
122 ninja -C $refsrcdir/build
123 DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
124 devtools/gen-abi.sh reference
125 find reference/usr/local -name '*.a' -delete
126 rm -rf reference/usr/local/bin
127 rm -rf reference/usr/local/share
128 echo $REF_GIT_TAG > reference/VERSION
131 DESTDIR=$(pwd)/install ninja -C build install
132 devtools/gen-abi.sh install
133 devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
136 if [ "$RUN_TESTS" = "true" ]; then
139 sudo meson test -C build --suite fast-tests -t 3 || failed="true"
141 [ "$failed" != "true" ]