[PATCH v3] ci: support Travis CI's aarch64 builds
Paul Chaignon
paul.chaignon at gmail.com
Thu Nov 14 17:37:10 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. I've also noticed a
smaller performance gain in filter_seccomp-perf.test for some builds.
Some tests occasionally take more than 10 minutes, hitting Travis CI's
limit on output inactivity. Using "travis_wait 40" removes that limit for
40 minutes (I've not seen any build last more 40 minutes).
* .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.
* tests/filter_seccomp-perf.test (min_ratio): Decrease.
Signed-off-by: Paul Chaignon <paul.chaignon at gmail.com>
---
.travis.yml | 52 +++++++++++++++++++++++++++++++++-
ci/install-dependencies.sh | 26 +++++++++++++----
ci/run-build-and-tests.sh | 3 ++
tests/filter_seccomp-perf.test | 2 +-
4 files changed, 76 insertions(+), 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 8c156874..8ffb5e41 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@ dist: trusty
before_install: ci/install-dependencies.sh
-script: ci/run-build-and-tests.sh
+script: travis_wait 40 ci/run-build-and-tests.sh
sudo: required
@@ -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.5"
+ - STACKTRACE=no
+ - TIMEOUT_DURATION=1500
+ - compiler: gcc
+ arch: arm64
+ env:
+ - TARGET=aarch64
+ - SLEEP_A_BIT="sleep 0.5"
+ - STACKTRACE=no
+ - KHEADERS=torvalds/linux
+ - TIMEOUT_DURATION=1500
+ - compiler: gcc-8
+ arch: arm64
+ env:
+ - TARGET=aarch64
+ - SLEEP_A_BIT="sleep 0.5"
+ - STACKTRACE=no
+ - KHEADERS=torvalds/linux
+ - TIMEOUT_DURATION=1500
+ - compiler: clang
+ arch: arm64
+ env:
+ - TARGET=aarch64
+ - SLEEP_A_BIT="sleep 0.5"
+ - STACKTRACE=no
+ - TIMEOUT_DURATION=1500
+ - compiler: gcc-8
+ arch: arm64
+ env:
+ - TARGET=aarch64
+ - SLEEP_A_BIT="sleep 0.5"
+ - 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/filter_seccomp-perf.test b/tests/filter_seccomp-perf.test
index f04bf552..3f0020b4 100755
--- a/tests/filter_seccomp-perf.test
+++ b/tests/filter_seccomp-perf.test
@@ -18,7 +18,7 @@ num_seccomp="$(run_strace --seccomp-bpf $args)"
mv "$LOG" "$LOG.seccomp"
match_diff "$LOG.regular" "$LOG.seccomp"
-min_ratio=8
+min_ratio=6
# With seccomp filter enabled, we should be able to complete
# at least $min_ratio times more chdir system calls.
ratio="$((num_seccomp / num_regular))"
--
2.17.1
More information about the Strace-devel
mailing list