From: Sitsofe Wheeler Date: Sun, 26 Jul 2020 04:21:34 +0000 (+0100) Subject: travis: enable libiscsi and cuda ioengines X-Git-Tag: fio-3.22~22^2~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=cf6d8924684125b927e55471e58bad5a246e859d;p=fio.git travis: enable libiscsi and cuda ioengines ...but only specific Linux setups. We have to avoid enabling cuda on i386/arm64 as we don't have the dependency in those environments so introduce a CI_TARGET_ARCH variable and do some refactoring. Signed-off-by: Sitsofe Wheeler --- diff --git a/ci/travis-build.sh b/ci/travis-build.sh index 06012e89..231417e2 100755 --- a/ci/travis-build.sh +++ b/ci/travis-build.sh @@ -1,16 +1,29 @@ #!/bin/bash +CI_TARGET_ARCH="${BUILD_ARCH:-$TRAVIS_CPU_ARCH}" EXTRA_CFLAGS="-Werror" PYTHONUNBUFFERED=TRUE +CONFIGURE_FLAGS=() -if [[ "$BUILD_ARCH" == "x86" ]]; then - EXTRA_CFLAGS="${EXTRA_CFLAGS} -m32" -fi +case "$TRAVIS_OS_NAME" in + "linux") + CONFIGURE_FLAGS+=(--enable-libiscsi) + case "$CI_TARGET_ARCH" in + "x86") + EXTRA_CFLAGS="${EXTRA_CFLAGS} -m32" + ;; + "amd64") + CONFIGURE_FLAGS+=(--enable-cuda) + ;; + esac + ;; +esac +CONFIGURE_FLAGS+=(--extra-cflags="${EXTRA_CFLAGS}") -./configure --extra-cflags="${EXTRA_CFLAGS}" && +./configure "${CONFIGURE_FLAGS[@]}" && make && make test && - if [[ "$TRAVIS_CPU_ARCH" == "arm64" ]]; then + if [[ "$CI_TARGET_ARCH" == "arm64" ]]; then sudo python3 t/run-fio-tests.py --skip 6 1007 1008 --debug -p 1010:"--skip 15 16 17 18 19 20" else sudo python3 t/run-fio-tests.py --skip 6 1007 1008 --debug diff --git a/ci/travis-install.sh b/ci/travis-install.sh index 1bb1063f..36661ddd 100755 --- a/ci/travis-install.sh +++ b/ci/travis-install.sh @@ -1,5 +1,6 @@ #!/bin/bash +CI_TARGET_ARCH="${BUILD_ARCH:-$TRAVIS_CPU_ARCH}" case "$TRAVIS_OS_NAME" in "linux") # Architecture-dependent packages. @@ -16,14 +17,17 @@ case "$TRAVIS_OS_NAME" in librdmacm-dev libz-dev ) - if [[ "$BUILD_ARCH" == "x86" ]]; then - pkgs=("${pkgs[@]/%/:i386}") - pkgs+=(gcc-multilib) - else - pkgs+=( - glusterfs-common - nvidia-cuda-dev - ) + case "$CI_TARGET_ARCH" in + "x86") + pkgs=("${pkgs[@]/%/:i386}") + pkgs+=(gcc-multilib) + ;; + "amd64") + pkgs+=(nvidia-cuda-dev) + ;; + esac + if [[ $CI_TARGET_ARCH != "x86" ]]; then + pkgs+=(glusterfs-common) fi # Architecture-independent packages and packages for which we don't # care about the architecture.