summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitsofe Wheeler <sitsofe@yahoo.com>2020-07-26 05:21:34 +0100
committerSitsofe Wheeler <sitsofe@yahoo.com>2020-07-26 11:55:10 +0100
commitcf6d8924684125b927e55471e58bad5a246e859d (patch)
tree30d5f5a608c60d15222039cee6db13c4d5fa31e5
parent22e6f04deb16bc71dace49c30c68f9f8dbd08320 (diff)
downloadfio-cf6d8924684125b927e55471e58bad5a246e859d.tar.gz
fio-cf6d8924684125b927e55471e58bad5a246e859d.tar.bz2
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 <sitsofe@yahoo.com>
-rwxr-xr-xci/travis-build.sh23
-rwxr-xr-xci/travis-install.sh20
2 files changed, 30 insertions, 13 deletions
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.