[v8,4/5] ci: add aarch64 -> aarch32 cross compiling jobs
Checks
Commit Message
Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
.ci/linux-build.sh | 7 ++++++-
.travis.yml | 19 +++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
Comments
Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> Add two jobs (static and shared libs), both building on aarch64 and
> producing 32-bit arm binaries executable on armv8-a, but not armv7.
> Do not run tests in these jobs.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
> .ci/linux-build.sh | 7 ++++++-
> .travis.yml | 19 +++++++++++++++++++
> 2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index d079801d7..c042b065c 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
> OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> fi
>
> +if [ "$AARCH32" = "1" ]; then
> + # convert the arch specifier
> + OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
> +fi
> +
> if [ "$BUILD_DOCS" = "1" ]; then
> OPTS="$OPTS -Denable_docs=true"
> fi
> @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
> meson build --werror $OPTS
> ninja -C build
>
> -if [ "$AARCH64" != "1" ]; then
> +if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then
I'm not sure about this. This will degrade the 32-bit x86 build, since it
will no longer execute the test-null.sh script.
Maybe we should re-use that flag for this series. BUILD_32BIT ??
> devtools/test-null.sh
> fi
>
> diff --git a/.travis.yml b/.travis.yml
> index d6eeab371..850faaac1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
> - *required_packages
> - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
>
> +_arm_32b_packages: &arm_32b_packages
> + - *required_packages
> + - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
> +
> _build_32b_packages: &build_32b_packages
> - *required_packages
> - [gcc-multilib]
> @@ -98,6 +102,21 @@ jobs:
> packages:
> - *required_packages
> - *doc_packages
> + # aarch64 cross-compiling aarch32 jobs
> + - env: DEF_LIB="shared" AARCH32=1
> + arch: arm64
> + compiler: gcc
> + addons:
> + apt:
> + packages:
> + - *arm_32b_packages
> + - env: DEF_LIB="static" AARCH32=1
> + arch: arm64
> + compiler: gcc
> + addons:
> + apt:
> + packages:
> + - *arm_32b_packages
> # aarch64 clang jobs
> - env: DEF_LIB="static"
> arch: arm64
> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Tuesday, August 25, 2020 4:16 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: bruce.richardson@intel.com; maicolgabriel@hotmail.com; dev@dpdk.org
> Subject: Re: [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
>
> Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
>
> > Add two jobs (static and shared libs), both building on aarch64 and
> > producing 32-bit arm binaries executable on armv8-a, but not armv7.
> > Do not run tests in these jobs.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> > .ci/linux-build.sh | 7 ++++++-
> > .travis.yml | 19 +++++++++++++++++++
> > 2 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > d079801d7..c042b065c 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
> > OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> > fi
> >
> > +if [ "$AARCH32" = "1" ]; then
> > + # convert the arch specifier
> > + OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
> > +fi
> > +
> > if [ "$BUILD_DOCS" = "1" ]; then
> > OPTS="$OPTS -Denable_docs=true"
> > fi
> > @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
> > meson build --werror $OPTS
> > ninja -C build
> >
> > -if [ "$AARCH64" != "1" ]; then
> > +if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname
> > +-m)"; then
>
> I'm not sure about this. This will degrade the 32-bit x86 build, since it will no
> longer execute the test-null.sh script.
>
> Maybe we should re-use that flag for this series. BUILD_32BIT ??
>
So this omits running test-null.sh with 32-bit builds on 64bit systems and we want to run that? Then it's probably the easiest to just disable the check for x86_64 -> aarch64 and x86_64 -> aarch32 builds. I wanted something more elegant here but it's a bit more complicated.
> > devtools/test-null.sh
> > fi
> >
> > diff --git a/.travis.yml b/.travis.yml index d6eeab371..850faaac1
> > 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
> > - *required_packages
> > - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross,
> > pkg-config-aarch64-linux-gnu]
> >
> > +_arm_32b_packages: &arm_32b_packages
> > + - *required_packages
> > + - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross,
> > +pkg-config-arm-linux-gnueabihf]
> > +
> > _build_32b_packages: &build_32b_packages
> > - *required_packages
> > - [gcc-multilib]
> > @@ -98,6 +102,21 @@ jobs:
> > packages:
> > - *required_packages
> > - *doc_packages
> > + # aarch64 cross-compiling aarch32 jobs
> > + - env: DEF_LIB="shared" AARCH32=1
> > + arch: arm64
> > + compiler: gcc
> > + addons:
> > + apt:
> > + packages:
> > + - *arm_32b_packages
> > + - env: DEF_LIB="static" AARCH32=1
> > + arch: arm64
> > + compiler: gcc
> > + addons:
> > + apt:
> > + packages:
> > + - *arm_32b_packages
> > # aarch64 clang jobs
> > - env: DEF_LIB="static"
> > arch: arm64
>
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
fi
+if [ "$AARCH32" = "1" ]; then
+ # convert the arch specifier
+ OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
if [ "$BUILD_DOCS" = "1" ]; then
OPTS="$OPTS -Denable_docs=true"
fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
meson build --werror $OPTS
ninja -C build
-if [ "$AARCH64" != "1" ]; then
+if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then
devtools/test-null.sh
fi
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
- *required_packages
- [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
+_arm_32b_packages: &arm_32b_packages
+ - *required_packages
+ - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
_build_32b_packages: &build_32b_packages
- *required_packages
- [gcc-multilib]
@@ -98,6 +102,21 @@ jobs:
packages:
- *required_packages
- *doc_packages
+ # aarch64 cross-compiling aarch32 jobs
+ - env: DEF_LIB="shared" AARCH32=1
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *arm_32b_packages
+ - env: DEF_LIB="static" AARCH32=1
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *arm_32b_packages
# aarch64 clang jobs
- env: DEF_LIB="static"
arch: arm64