7 FILES_TO_PRINT="build/meson-logs/testlog.txt build/.ninja_log build/meson-logs/meson-log.txt"
9 for pr_file in $FILES_TO_PRINT; do
10 if [ -e "$pr_file" ]; then
15 # We capture the error logs as artifacts in Github Actions, no need to dump
16 # them via a EXIT handler.
17 [ -n "$GITHUB_WORKFLOW" ] || trap on_error EXIT
19 install_libabigail() {
23 wget -q "http://mirrors.kernel.org/sourceware/libabigail/${version}.tar.gz"
24 tar -xf ${version}.tar.gz
25 cd $version && autoreconf -vfi && cd -
27 cd $version/build && ../configure --prefix=$instdir && cd -
28 make -C $version/build all install
33 if [ "$AARCH64" = "true" ]; then
34 # convert the arch specifier
35 if [ "$CC_FOR_BUILD" = "gcc" ]; then
36 OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
37 elif [ "$CC_FOR_BUILD" = "clang" ]; then
38 OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
42 if [ "$BUILD_DOCS" = "true" ]; then
43 OPTS="$OPTS -Denable_docs=true"
46 if [ "$BUILD_32BIT" = "true" ]; then
47 OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"
48 export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
51 if [ "$DEF_LIB" = "static" ]; then
52 OPTS="$OPTS -Dexamples=l2fwd,l3fwd"
54 OPTS="$OPTS -Dexamples=all"
57 OPTS="$OPTS -Dmachine=default"
58 OPTS="$OPTS --default-library=$DEF_LIB"
59 OPTS="$OPTS --buildtype=debugoptimized"
60 OPTS="$OPTS -Dcheck_includes=true"
61 meson build --werror $OPTS
64 if [ "$AARCH64" != "true" ]; then
68 if [ "$ABI_CHECKS" = "true" ]; then
69 LIBABIGAIL_VERSION=${LIBABIGAIL_VERSION:-libabigail-1.6}
71 if [ "$(cat libabigail/VERSION 2>/dev/null)" != "$LIBABIGAIL_VERSION" ]; then
73 # if we change libabigail, invalidate existing abi cache
77 if [ ! -d libabigail ]; then
78 install_libabigail $LIBABIGAIL_VERSION $(pwd)/libabigail
79 echo $LIBABIGAIL_VERSION > libabigail/VERSION
82 export PATH=$(pwd)/libabigail/bin:$PATH
84 REF_GIT_REPO=${REF_GIT_REPO:-https://dpdk.org/git/dpdk}
85 REF_GIT_TAG=${REF_GIT_TAG:-v19.11}
87 if [ "$(cat reference/VERSION 2>/dev/null)" != "$REF_GIT_TAG" ]; then
91 if [ ! -d reference ]; then
92 refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG)
93 git clone --single-branch -b $REF_GIT_TAG $REF_GIT_REPO $refsrcdir
94 meson $OPTS -Dexamples= $refsrcdir $refsrcdir/build
95 ninja -C $refsrcdir/build
96 DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
97 devtools/gen-abi.sh reference
98 find reference/usr/local -name '*.a' -delete
99 rm -rf reference/usr/local/bin
100 rm -rf reference/usr/local/share
101 echo $REF_GIT_TAG > reference/VERSION
104 DESTDIR=$(pwd)/install ninja -C build install
105 devtools/gen-abi.sh install
106 devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
109 if [ "$RUN_TESTS" = "true" ]; then
110 sudo meson test -C build --suite fast-tests -t 3