[v4,2/2] ci: add travis ci support for aarch64

Message ID 20200110095350.80925-3-ruifeng.wang@arm.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series add travis ci support for aarch64 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Ruifeng Wang Jan. 10, 2020, 9:53 a.m. UTC
  Add Travis compilation jobs for aarch64. gcc/clang compilations for
static/shared libraries are added.

Some limitations for current aarch64 Travis support:
1. Container is used. Huge page is not available due to security reason.
2. Missing kernel header package in Xenial distribution.

Solutions to address the limitations:
1. Not to add unit test for now. And run tests with no-huge in future.
2. Use Bionic distribution for all aarch64 jobs.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 .ci/linux-setup.sh | 11 +++++++----
 .travis.yml        | 42 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 5 deletions(-)
  

Comments

Aaron Conole Jan. 10, 2020, 3:13 p.m. UTC | #1
Ruifeng Wang <ruifeng.wang@arm.com> writes:

> Add Travis compilation jobs for aarch64. gcc/clang compilations for
> static/shared libraries are added.
>
> Some limitations for current aarch64 Travis support:
> 1. Container is used. Huge page is not available due to security reason.
> 2. Missing kernel header package in Xenial distribution.
>
> Solutions to address the limitations:
> 1. Not to add unit test for now. And run tests with no-huge in future.
> 2. Use Bionic distribution for all aarch64 jobs.
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> ---

I think the above text should probably include 'native' since there are
already aarch64 builds that go (but they are cross compiled).  I also am
glad that you didn't remove them.

Acked-by: Aaron Conole <aconole@redhat.com>
  
Ruifeng Wang Jan. 13, 2020, 6:09 a.m. UTC | #2
> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Friday, January 10, 2020 23:13
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: maicolgabriel@hotmail.com; thomas@monjalon.net;
> ferruh.yigit@intel.com; arybchenko@solarflare.com; dev@dpdk.org;
> david.marchand@redhat.com; Gavin Hu <Gavin.Hu@arm.com>; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> Subject: Re: [PATCH v4 2/2] ci: add travis ci support for aarch64
> 
> Ruifeng Wang <ruifeng.wang@arm.com> writes:
> 
> > Add Travis compilation jobs for aarch64. gcc/clang compilations for
> > static/shared libraries are added.
> >
> > Some limitations for current aarch64 Travis support:
> > 1. Container is used. Huge page is not available due to security reason.
> > 2. Missing kernel header package in Xenial distribution.
> >
> > Solutions to address the limitations:
> > 1. Not to add unit test for now. And run tests with no-huge in future.
> > 2. Use Bionic distribution for all aarch64 jobs.
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > ---
> 
> I think the above text should probably include 'native' since there are already
> aarch64 builds that go (but they are cross compiled).  I also am glad that you
> didn't remove them.
> 
Agree. 
I will submit new version with commit message update, and take your Ack.
Thank you.

> Acked-by: Aaron Conole <aconole@redhat.com>
  

Patch

diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh
index dfb9d4a20..f93e67664 100755
--- a/.ci/linux-setup.sh
+++ b/.ci/linux-setup.sh
@@ -3,7 +3,10 @@ 
 # need to install as 'root' since some of the unit tests won't run without it
 sudo python3 -m pip install --upgrade meson
 
-# setup hugepages
-cat /proc/meminfo
-sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages'
-cat /proc/meminfo
+# skip hugepage settings if tests will not run
+if [ "$RUN_TESTS" = "1" ]; then
+    # setup hugepages
+    cat /proc/meminfo
+    sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages'
+    cat /proc/meminfo
+fi
diff --git a/.travis.yml b/.travis.yml
index 8f90d06f2..980c7605d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -115,6 +115,46 @@  matrix:
       apt:
         packages:
           - *extra_packages
-
+  - env: DEF_LIB="static"
+    arch: arm64
+    compiler: gcc
+    dist: bionic
+    addons:
+      apt:
+        packages:
+          - *required_packages
+  - env: DEF_LIB="shared"
+    arch: arm64
+    compiler: gcc
+    dist: bionic
+    addons:
+      apt:
+        packages:
+          - *required_packages
+  - env: DEF_LIB="static"
+    arch: arm64
+    dist: bionic
+    compiler: clang
+    addons:
+      apt:
+        packages:
+          - *required_packages
+  - env: DEF_LIB="shared"
+    arch: arm64
+    dist: bionic
+    compiler: clang
+    addons:
+      apt:
+        packages:
+          - *required_packages
+  - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1
+    arch: arm64
+    compiler: gcc
+    dist: bionic
+    addons:
+      apt:
+        packages:
+          - *required_packages
+          - *doc_packages
 
 script: ./.ci/${TRAVIS_OS_NAME}-build.sh