diff options
author | Matias Elo <matias.elo@nokia.com> | 2023-03-23 14:59:28 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2023-03-27 17:14:40 +0300 |
commit | 16e684e4630a0e6feeb3a3a7bfbfb453a9d00f42 (patch) | |
tree | 27faec4184ffe0ee906b3d8cd90b2d3c9dbacd0b /scripts | |
parent | 8b169a24627ab012717fb05aeab17a04c046b7ab (diff) |
ci: mount huge pages before odp build
Mounting huge pages fails randomly in GitHub Actions if VM disk is close to
full. Maximize probability that mounting succeeds by mounting huge pages
before ODP build.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/build.sh | 8 | ||||
-rwxr-xr-x | scripts/ci/build_static.sh | 8 | ||||
-rwxr-xr-x | scripts/ci/check_inline_timer.sh | 8 | ||||
-rwxr-xr-x | scripts/ci/check_pktio.sh | 8 | ||||
-rwxr-xr-x | scripts/ci/coverage.sh | 6 |
5 files changed, 22 insertions, 16 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 2f333bccb..e7249e957 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -1,6 +1,10 @@ #!/bin/bash set -e +echo 1000 | tee /proc/sys/vm/nr_hugepages +mkdir -p /mnt/huge +mount -t hugetlbfs nodev /mnt/huge + cd "$(dirname "$0")"/../.. ./bootstrap ./configure \ @@ -14,10 +18,6 @@ make -j $(nproc) make install -echo 1000 | tee /proc/sys/vm/nr_hugepages -mkdir -p /mnt/huge -mount -t hugetlbfs nodev /mnt/huge - make installcheck umount /mnt/huge diff --git a/scripts/ci/build_static.sh b/scripts/ci/build_static.sh index 50a056396..53c09679c 100755 --- a/scripts/ci/build_static.sh +++ b/scripts/ci/build_static.sh @@ -3,6 +3,10 @@ set -e CONFIG_OPT="--prefix=/opt/odp ${CONF}" +echo 1000 | tee /proc/sys/vm/nr_hugepages +mkdir -p /mnt/huge +mount -t hugetlbfs nodev /mnt/huge + cd "$(dirname "$0")"/../.. ./bootstrap echo "./configure $CONFIG_OPT" @@ -14,10 +18,6 @@ make -j $(nproc) make install -echo 1000 | tee /proc/sys/vm/nr_hugepages -mkdir -p /mnt/huge -mount -t hugetlbfs nodev /mnt/huge - make installcheck umount /mnt/huge diff --git a/scripts/ci/check_inline_timer.sh b/scripts/ci/check_inline_timer.sh index 1fa9c21f5..48800be35 100755 --- a/scripts/ci/check_inline_timer.sh +++ b/scripts/ci/check_inline_timer.sh @@ -1,14 +1,14 @@ #!/bin/bash set -e -"`dirname "$0"`"/build_${ARCH}.sh - -cd "$(dirname "$0")"/../.. - echo 1000 | tee /proc/sys/vm/nr_hugepages mkdir -p /mnt/huge mount -t hugetlbfs nodev /mnt/huge +"`dirname "$0"`"/build_${ARCH}.sh + +cd "$(dirname "$0")"/../.. + ODP_SCHEDULER=basic ./test/validation/api/timer/timer_main ODP_SCHEDULER=sp ./test/validation/api/timer/timer_main ODP_SCHEDULER=scalable ./test/validation/api/timer/timer_main diff --git a/scripts/ci/check_pktio.sh b/scripts/ci/check_pktio.sh index e61bacc98..3c6fd8c86 100755 --- a/scripts/ci/check_pktio.sh +++ b/scripts/ci/check_pktio.sh @@ -1,14 +1,14 @@ #!/bin/bash set -e -"`dirname "$0"`"/build_${ARCH}.sh - -cd "$(dirname "$0")"/../.. - echo 1000 | tee /proc/sys/vm/nr_hugepages mkdir -p /mnt/huge mount -t hugetlbfs nodev /mnt/huge +"`dirname "$0"`"/build_${ARCH}.sh + +cd "$(dirname "$0")"/../.. + ./platform/linux-generic/test/validation/api/pktio/pktio_run.sh umount /mnt/huge diff --git a/scripts/ci/coverage.sh b/scripts/ci/coverage.sh index 40670b798..b88f5f11f 100755 --- a/scripts/ci/coverage.sh +++ b/scripts/ci/coverage.sh @@ -5,6 +5,10 @@ if [ "${CC#clang}" != "${CC}" ] ; then export CXX="clang++" fi +echo 1000 | tee /proc/sys/vm/nr_hugepages +mkdir -p /mnt/huge +mount -t hugetlbfs nodev /mnt/huge + cd "$(dirname "$0")"/../.. ./bootstrap ./configure \ @@ -27,3 +31,5 @@ popd # Convert gcno files into gcov (required by Codecov) find . -type f -name '*.gcno' -exec gcov -pb {} + +# Wrapper script can umount hugepages itself +umount /mnt/huge || true |