[v2,1/2] ci: add travis ci support for aarch64
Checks
Commit Message
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 | 37 ++++++++++++++++++++++++++++++++++++-
2 files changed, 43 insertions(+), 5 deletions(-)
Comments
On 2019-12-20 01:37, Ruifeng Wang wrote:
> 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 | 37 ++++++++++++++++++++++++++++++++++++-
> 2 files changed, 43 insertions(+), 5 deletions(-)
>
> diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh
> index dfb9d4a20..a92978037 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
dont test for TRAVIS_ARCH here as multiple archs may need to avoid the
hugepage setup as well.
How about:
if [ "$RUN_TESTS" = "1" ]; then
# setup hugepages
If your planning to add a tests using --no-huge option could we add a
NOHUGEPAGES option to the matrix?
> +# hugepage settings are skipped on aarch64 due to environment
> limitation
> +if [ "$TRAVIS_ARCH" != "aarch64" ]; 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..048cb6ba5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -115,6 +115,41 @@ matrix:
> apt:
> packages:
> - *extra_packages
> -
> + - env: DEF_LIB="static"
> + arch: arm64
> + compiler: gcc
> + addons:
> + apt:
> + packages:
> + - *required_packages
> + - env: DEF_LIB="shared"
> + arch: arm64
> + compiler: gcc
> + addons:
> + apt:
> + packages:
> + - *required_packages
> + - env: DEF_LIB="static"
> + arch: arm64
> + compiler: clang
> + addons:
> + apt:
> + packages:
> + - *required_packages
> + - env: DEF_LIB="shared"
> + arch: arm64
> + compiler: clang
> + addons:
> + apt:
> + packages:
> + - *required_packages
> + - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1
> + arch: arm64
> + compiler: gcc
> + addons:
> + apt:
> + packages:
> + - *required_packages
> + - *doc_packages
>
> script: ./.ci/${TRAVIS_OS_NAME}-build.sh
> -----Original Message-----
> From: dwilder <dwilder@us.ibm.com>
> Sent: Tuesday, January 7, 2020 04:17
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: aconole@redhat.com; maicolgabriel@hotmail.com;
> thomas@monjalon.net; ferruh.yigit@intel.com; arybchenko@solarflare.com;
> dev@dpdk.org; Gavin Hu <Gavin.Hu@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> Subject: Re: [dpdk-dev] [PATCH v2 1/2] ci: add travis ci support for aarch64
>
> On 2019-12-20 01:37, Ruifeng Wang wrote:
> > 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 | 37 ++++++++++++++++++++++++++++++++++++-
> > 2 files changed, 43 insertions(+), 5 deletions(-)
> >
> > diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh index
> > dfb9d4a20..a92978037 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
>
>
> dont test for TRAVIS_ARCH here as multiple archs may need to avoid the
> hugepage setup as well.
>
> How about:
> if [ "$RUN_TESTS" = "1" ]; then
> # setup hugepages
This should work. I can try this approach in next version.
My concern is the name may cause confusion. 'RUN_TESTS' will mean to
run default tests (with hugepage).
>
> If your planning to add a tests using --no-huge option could we add a
> NOHUGEPAGES option to the matrix?
Yes, this will give control to choose test suite. I will take this into consideration.
>
> > +# hugepage settings are skipped on aarch64 due to environment
> > limitation
> > +if [ "$TRAVIS_ARCH" != "aarch64" ]; 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..048cb6ba5
> > 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -115,6 +115,41 @@ matrix:
> > apt:
> > packages:
> > - *extra_packages
> > -
> > + - env: DEF_LIB="static"
> > + arch: arm64
> > + compiler: gcc
> > + addons:
> > + apt:
> > + packages:
> > + - *required_packages
> > + - env: DEF_LIB="shared"
> > + arch: arm64
> > + compiler: gcc
> > + addons:
> > + apt:
> > + packages:
> > + - *required_packages
> > + - env: DEF_LIB="static"
> > + arch: arm64
> > + compiler: clang
> > + addons:
> > + apt:
> > + packages:
> > + - *required_packages
> > + - env: DEF_LIB="shared"
> > + arch: arm64
> > + compiler: clang
> > + addons:
> > + apt:
> > + packages:
> > + - *required_packages
> > + - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1
> > + arch: arm64
> > + compiler: gcc
> > + addons:
> > + apt:
> > + packages:
> > + - *required_packages
> > + - *doc_packages
> >
> > script: ./.ci/${TRAVIS_OS_NAME}-build.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
+# hugepage settings are skipped on aarch64 due to environment limitation
+if [ "$TRAVIS_ARCH" != "aarch64" ]; then
+ # setup hugepages
+ cat /proc/meminfo
+ sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages'
+ cat /proc/meminfo
+fi
@@ -115,6 +115,41 @@ matrix:
apt:
packages:
- *extra_packages
-
+ - env: DEF_LIB="static"
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *required_packages
+ - env: DEF_LIB="shared"
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *required_packages
+ - env: DEF_LIB="static"
+ arch: arm64
+ compiler: clang
+ addons:
+ apt:
+ packages:
+ - *required_packages
+ - env: DEF_LIB="shared"
+ arch: arm64
+ compiler: clang
+ addons:
+ apt:
+ packages:
+ - *required_packages
+ - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *required_packages
+ - *doc_packages
script: ./.ci/${TRAVIS_OS_NAME}-build.sh