[PATCH v2] ci: support Travis CI's aarch64 builds

Paul Chaignon paul.chaignon at gmail.com
Fri Nov 8 11:30:15 UTC 2019


Travis CI now supports aarch64 builds, launched with the new "arch: arm64"
tag.  These builds are running inside LXD only for the moment.

The aarch64 builds tend to be a lot slower than their x86_64 counterparts,
so several timeout values need to be increased.

* .travis.yml (matrix): add aarch64 builds and mark previous builds as
amd64.
* ci/install-dependencies.sh: install packages for aarch64 builds
* ci/run-build-and-tests.sh: check mpers for aarch64.

Signed-off-by: Paul Chaignon <paul.chaignon at gmail.com>
---
 .travis.yml                | 50 ++++++++++++++++++++++++++++++++++++++
 ci/install-dependencies.sh | 26 ++++++++++++++++----
 ci/run-build-and-tests.sh  |  3 +++
 tests/umount2.c            |  1 +
 4 files changed, 75 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8c156874..b60fcf04 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,57 +19,107 @@ env:
 matrix:
   include:
     - compiler: gcc
+      arch: amd64
       env:
         - TARGET=x86
         - STACKTRACE=no
     - compiler: gcc
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=libunwind
         - CHECK=coverage
         - KHEADERS=torvalds/linux
     - compiler: gcc-8
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=libunwind
         - KHEADERS=torvalds/linux
     - compiler: gcc
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=libunwind
     - compiler: gcc
+      arch: amd64
       env:
         - TARGET=x32
         - STACKTRACE=no
     - compiler: clang
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=libunwind
     - compiler: musl-gcc
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=no
     - compiler: clang
+      arch: amd64
       env:
         - TARGET=x86
         - STACKTRACE=no
     - compiler: musl-gcc
+      arch: amd64
       env:
         - TARGET=x86
         - STACKTRACE=no
     - compiler: gcc-8
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=libunwind
     - compiler: gcc-8
+      arch: amd64
       env:
         - TARGET=x32
         - STACKTRACE=no
     - compiler: gcc-8
+      arch: amd64
       env:
         - TARGET=x86
         - STACKTRACE=no
     - compiler: gcc
+      arch: amd64
       env:
         - TARGET=x86_64
         - STACKTRACE=no
+    - compiler: gcc
+      arch: arm64
+      env:
+        - TARGET=aarch64
+        - SLEEP_A_BIT="sleep 0.4"
+        - STACKTRACE=no
+        - TIMEOUT_DURATION=1500
+    - compiler: gcc
+      arch: arm64
+      env:
+        - TARGET=aarch64
+        - SLEEP_A_BIT="sleep 0.4"
+        - STACKTRACE=no
+        - KHEADERS=torvalds/linux
+        - TIMEOUT_DURATION=1500
+    - compiler: gcc-8
+      arch: arm64
+      env:
+        - TARGET=aarch64
+        - SLEEP_A_BIT="sleep 0.4"
+        - STACKTRACE=no
+        - KHEADERS=torvalds/linux
+        - TIMEOUT_DURATION=1500
+    - compiler: clang
+      arch: arm64
+      env:
+        - TARGET=aarch64
+        - SLEEP_A_BIT="sleep 0.4"
+        - STACKTRACE=no
+        - TIMEOUT_DURATION=1500
+    - compiler: gcc-8
+      arch: arm64
+      env:
+        - TARGET=aarch64
+        - SLEEP_A_BIT="sleep 0.4"
+        - STACKTRACE=no
+        - TIMEOUT_DURATION=1500
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 9558eb3e..eee3ae00 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -7,7 +7,7 @@
 
 j=-j`nproc` || j=
 type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
-common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libbluetooth-dev make xz-utils'
+common_packages='autoconf automake faketime file gawk git gzip libbluetooth-dev make xz-utils'
 
 retry_if_failed()
 {
@@ -55,17 +55,33 @@ clone_repo()
 		git clone --depth=1 ${branch:+--branch $branch} "$src" "$dst"
 }
 
+case "$TARGET" in
+	aarch64)
+		packages="$common_packages gcc-multilib-arm-linux-gnueabihf"
+		;;
+	*)
+		packages="$common_packages gcc-multilib"
+		;;
+esac
+
 case "$CC" in
 	gcc-*)
 		retry_if_failed \
 			$sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
-		apt_get_install $common_packages "$CC"-multilib
+		case "$TARGET" in
+			aarch64)
+				apt_get_install $packages "$CC"-multilib-arm-linux-gnueabihf "$CC"
+				;;
+			*)
+				apt_get_install $packages "$CC"-multilib
+				;;
+		esac
 		;;
 	clang*)
-		apt_get_install $common_packages "$CC"
+		apt_get_install $packages "$CC"
 		;;
 	*)
-		apt_get_install $common_packages
+		apt_get_install $packages
 		;;
 esac
 
@@ -121,7 +137,7 @@ esac
 
 case "${CHECK-}" in
 	coverage)
-		apt_get_install lcov
+		apt_get_install lcov python-pip python-setuptools
 		retry_if_failed \
 			pip install --user codecov
 		;;
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index f52bf5cd..63dfe8f8 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -27,6 +27,9 @@ case "${TARGET-}" in
 		CC="$CC -m32"
 		DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
 		;;
+	aarch64)
+		DISTCHECK_CONFIGURE_FLAGS="--enable-mpers=check"
+		;;
 esac
 
 case "${STACKTRACE-}" in
diff --git a/tests/umount2.c b/tests/umount2.c
index cf1fc129..bf219970 100644
--- a/tests/umount2.c
+++ b/tests/umount2.c
@@ -6,6 +6,7 @@
  */
 
 #include "tests.h"
+#include <errno.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/stat.h>
-- 
2.17.1



More information about the Strace-devel mailing list