mempool: introduce helpers for populate and required size
[dpdk.git] / .ci / linux-build.sh
1 #!/bin/sh -xe
2
3 on_error() {
4     if [ $? = 0 ]; then
5         exit
6     fi
7     FILES_TO_PRINT="build/meson-logs/testlog.txt build/.ninja_log build/meson-logs/meson-log.txt"
8
9     for pr_file in $FILES_TO_PRINT; do
10         if [ -e "$pr_file" ]; then
11             cat "$pr_file"
12         fi
13     done
14 }
15 trap on_error EXIT
16
17 if [ "$AARCH64" = "1" ]; then
18     # convert the arch specifier
19     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
20 fi
21
22 if [ "$BUILD_DOCS" = "1" ]; then
23     OPTS="$OPTS -Denable_docs=true"
24 fi
25
26 OPTS="$OPTS --default-library=$DEF_LIB"
27 meson build --werror -Dexamples=all $OPTS
28 ninja -C build
29
30 if [ "$RUN_TESTS" = "1" ]; then
31     sudo meson test -C build --suite fast-tests -t 3
32 fi