X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ci%2Ftravis-build.sh;h=923d882d57799426dec0e052bc6609819fff5495;hp=06012e8903d7ab2e8a96daab6e4dc1bf6dfdac46;hb=a9b9b1627d52137246eb3c76476f7645780a9beb;hpb=f41f4fbe3c123914c41b8166ca329f6d9d99f07a diff --git a/ci/travis-build.sh b/ci/travis-build.sh index 06012e89..923d882d 100755 --- a/ci/travis-build.sh +++ b/ci/travis-build.sh @@ -1,17 +1,32 @@ #!/bin/bash +set -eu +CI_TARGET_ARCH="${BUILD_ARCH:-$TRAVIS_CPU_ARCH}" EXTRA_CFLAGS="-Werror" -PYTHONUNBUFFERED=TRUE +export 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" + export LDFLAGS="-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 - sudo python3 t/run-fio-tests.py --skip 6 1007 1008 --debug -p 1010:"--skip 15 16 17 18 19 20" + 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 + sudo python3 t/run-fio-tests.py --skip 6 1007 1008 --debug fi