]> git.proxmox.com Git - mirror_ovs.git/commitdiff
travis: Enable OvS Travis CI for arm
authorLance Yang <Lance.Yang@arm.com>
Tue, 24 Mar 2020 07:00:37 +0000 (15:00 +0800)
committerIlya Maximets <i.maximets@ovn.org>
Tue, 24 Mar 2020 23:37:23 +0000 (00:37 +0100)
Enable part of travis jobs with gcc compiler for arm64 architecture

1. Add arm jobs into the matrix in .travis.yml configuration file
2. To enable OVS-DPDK jobs, set the build target according to
different CPU architectures
3. Temporarily disable sparse checker because of static code checking
failure on arm64

Considering the balance of the CI coverage and running time, some kernel
and DPDK jobs are removed from Arm CI.

Successful travis build jobs report:
https://travis-ci.org/github/yzyuestc/ovs/builds/666129448

Reviewed-by: Yanqin Wei <Yanqin.Wei@arm.com>
Reviewed-by: Ruifeng Wang <Ruifeng.Wang@arm.com>
Reviewed-by: JingZhao Ni <JingZhao.Ni@arm.com>
Reviewed-by: Gavin Hu <Gavin.Hu@arm.com>
Signed-off-by: Lance Yang <Lance.Yang@arm.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
.travis.yml
.travis/linux-build.sh

index ef9f8675578ce23c0bb5e2910f1a9410593f5e0a..11497588b3b5246189c709aab2091443c1402315 100644 (file)
@@ -51,6 +51,21 @@ matrix:
     - os: osx
       compiler: clang
       env: OPTS="--disable-ssl"
+    - arch: arm64
+      compiler: gcc
+      env: OPTS="--disable-ssl"
+    - arch: arm64
+      compiler: gcc
+      env: KERNEL_LIST="5.5 4.19"
+    - arch: arm64
+      compiler: gcc
+      env: KERNEL_LIST="4.9 3.16"
+    - arch: arm64
+      compiler: gcc
+      env: DPDK=1 OPTS="--enable-shared"
+    - arch: arm64
+      compiler: gcc
+      env: DPDK_SHARED=1
 
 script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS
 
index 359f7773baeb2d393a764f8ffe9a00a8a81787e2..02615a8ec87c3b8d2b64d3a63456cce65fcd9dec 100755 (executable)
@@ -6,7 +6,6 @@ set -x
 CFLAGS_FOR_OVS="-g -O2"
 SPARSE_FLAGS=""
 EXTRA_OPTS="--enable-Werror"
-TARGET="x86_64-native-linuxapp-gcc"
 
 function install_kernel()
 {
@@ -87,6 +86,16 @@ function install_dpdk()
     local DPDK_VER=$1
     local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
 
+    if [ -z "$TRAVIS_ARCH" ] ||
+       [ "$TRAVIS_ARCH" == "amd64" ]; then
+        TARGET="x86_64-native-linuxapp-gcc"
+    elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
+        TARGET="arm64-armv8a-linuxapp-gcc"
+    else
+        echo "Target is unknown"
+        exit 1
+    fi
+
     if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
         # Avoid using cache for git tree build.
         rm -rf dpdk-dir
@@ -177,7 +186,7 @@ elif [ "$M32" ]; then
     # Adding m32 flag directly to CC to avoid any posiible issues with API/ABI
     # difference on 'configure' and 'make' stages.
     export CC="$CC -m32"
-else
+elif [ "$TRAVIS_ARCH" != "aarch64" ]; then
     OPTS="--enable-sparse"
     if [ "$AFXDP" ]; then
         # netdev-afxdp uses memset for 64M for umem initialization.