diff mbox series

[v3,11/13] travis: purge dpdk cache on version change

Message ID 1507557617-32018-12-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v3,1/13] linux-gen: drop unused _odp_packet_cmp_data() function | expand

Commit Message

Github ODP bot Oct. 9, 2017, 2 p.m. UTC
From: Maxim Uvarov <maxim.uvarov@linaro.org>


changing dpdk version and not clearing build can lead
to reference to old cached not supported dpdk version.
Needed to remove cache if version was changed.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 188 (WonderfulVoid:master)
 ** https://github.com/Linaro/odp/pull/188
 ** Patch: https://github.com/Linaro/odp/pull/188.patch
 ** Base sha: c16af6486eea240609f334b1bdc81a11404275de
 ** Merge commit sha: 4ad1d0615a4dcd74d4e9703090149eec1a58d7d2
 **/
 .travis.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 990579202..7fcd98e2f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -149,11 +149,17 @@  install:
           fi
         - gem install asciidoctor
 
-#	DPDK pktio. Note that cache must be purged if dpdk version changes.
+        # DPDK pktio. Note that cache must be purged if dpdk version changes.
+        - DPDK_VERS="17.02"
+        - |
+          CACHED_DPDK_VERS=`fgrep Version dpdk/pkg/dpdk.spec | cut -d " " -f 2`
+          if [ "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then
+            rm -rf dpdk
+          fi
         - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
         - |
           if [ -z "$CROSS_ARCH" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ]; then
-            git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v17.02 http://dpdk.org/git/dpdk dpdk
+            git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v${DPDK_VERS} http://dpdk.org/git/dpdk dpdk
             pushd dpdk
             git log --oneline --decorate
             make config T=${TARGET} O=${TARGET}