[ovs-dev] [PATCH] travis: Fix using DPDK build from master branch cache.

Ilya Maximets i.maximets at ovn.org
Mon Mar 9 14:40:07 UTC 2020

If no cache available for current branch, Travis CI uses cache from
the default (master) branch.  This causes build failures on older
OVS branches if cache was cleared because DPDK builds from master
branch are not compatible.

For example, we removed pdump support on master, but branch 2.13
explicitly requests pdump being enabled and fails while using
cached DPDK from the master branch.

Adding the branch name to the version file to avoid using incompatible
DPDK builds.

Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
 .travis/linux-build.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 359f7773b..dbaabaa60 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -98,7 +98,7 @@ function install_dpdk()
         if [ -f "${VERSION_FILE}" ]; then
             VER=$(cat ${VERSION_FILE})
-            if [ "${VER}" = "${DPDK_VER}" ]; then
+            if [ "${VER}" = "${DPDK_VER}-${TRAVIS_BRANCH}" ]; then
                 EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
                 echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
@@ -128,7 +128,7 @@ function install_dpdk()
     EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=$(pwd)/build"
     echo "Installed DPDK source in $(pwd)"
-    echo "${DPDK_VER}" > ${VERSION_FILE}
 function configure_ovs()

More information about the dev mailing list