Check x86_64 builds with libdw, with libunwind, and without stacktrace.
As Travis CI doesn't provide a suitable libdw, do not test libdw there.
* ci/install-dependencies.sh (common_packages): Remove libdw-dev.
Install libdw-dev or libunwind8-dev depending on $STACKTRACE.
* ci/run-build-and-tests.sh: Specify --with-libdw=yes,
--with-libunwind=yes, or --without-stacktrace depending on $STACKTRACE.
* .gitlab-ci.yml (gcc-x86_64): Rename to gcc-x86_64-libdw,
add STACKTRACE=libdw.
(gcc-x86): Rename to gcc-x86-nounwind, add STACKTRACE=no.
(clang-x86_64): Rename to clang-x86_64-libdw, add STACKTRACE=libdw.
(clang-x86): Rename to clang-x86-nounwind, add STACKTRACE=no.
(gcc-x86_64-libunwind, gcc-x86_64-nounwind, gcc-x86-nounwind,
clang-x86_64-libunwind, clang-x86_64-nounwind, clang-x86-nounwind):
New test matrix entries.
* .travis.yml: Add STACKTRACE=libunwind to all x86_64 test matrix
entries except musl-gcc, add STACKTRACE=no to other matrix entries,
add test matrix entries with STACKTRACE=no variants on x86_64.
SLEEP_A_BIT: "sleep 0.2"
VERBOSE: "1"
-gcc-x86_64:
+gcc-x86_64-libdw:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "gcc"
TARGET: "x86_64"
+ STACKTRACE: "libdw"
-gcc-x86:
+gcc-x86_64-libunwind:
+ stage: test
+ script: ci/run-build-and-tests.sh
+ variables:
+ CC: "gcc"
+ TARGET: "x86_64"
+ STACKTRACE: "libunwind"
+
+gcc-x86_64-nounwind:
+ stage: test
+ script: ci/run-build-and-tests.sh
+ variables:
+ CC: "gcc"
+ TARGET: "x86_64"
+ STACKTRACE: "no"
+
+gcc-x86-nounwind:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "gcc"
TARGET: "x86"
+ STACKTRACE: "no"
+
+clang-x86_64-libdw:
+ stage: test
+ script: ci/run-build-and-tests.sh
+ variables:
+ CC: "clang"
+ TARGET: "x86_64"
+ STACKTRACE: "libdw"
+
+clang-x86_64-libunwind:
+ stage: test
+ script: ci/run-build-and-tests.sh
+ variables:
+ CC: "clang"
+ TARGET: "x86_64"
+ STACKTRACE: "libunwind"
-clang-x86_64:
+clang-x86_64-nounwind:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "clang"
TARGET: "x86_64"
+ STACKTRACE: "no"
-clang-x86:
+clang-x86-nounwind:
stage: test
script: ci/run-build-and-tests.sh
variables:
CC: "clang"
TARGET: "x86"
+ STACKTRACE: "no"
- compiler: gcc
env:
- TARGET=x86_64
+ - STACKTRACE=libunwind
- CHECK=coverage
- KHEADERS=torvalds/linux
- compiler: gcc
env:
- TARGET=x86_64
+ - STACKTRACE=libunwind
- compiler: gcc
env:
- TARGET=x32
+ - STACKTRACE=no
- compiler: gcc
env:
- TARGET=x86
+ - STACKTRACE=no
- compiler: clang
env:
- TARGET=x86_64
+ - STACKTRACE=libunwind
- compiler: musl-gcc
env:
- TARGET=x86_64
+ - STACKTRACE=no
- compiler: clang
env:
- TARGET=x86
+ - STACKTRACE=no
- compiler: musl-gcc
env:
- TARGET=x86
+ - STACKTRACE=no
- compiler: gcc-7
env:
- TARGET=x86_64
+ - STACKTRACE=libunwind
- compiler: gcc-7
env:
- TARGET=x32
+ - STACKTRACE=no
- compiler: gcc-7
env:
- TARGET=x86
+ - STACKTRACE=no
+ - compiler: gcc
+ env:
+ - TARGET=x86_64
+ - STACKTRACE=no
#!/bin/sh -ex
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
-common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libdw-dev make pkg-config xz-utils'
+common_packages='autoconf automake faketime file gawk gcc-multilib git gzip make pkg-config xz-utils'
updated=
apt_get_install()
;;
esac
+case "${STACKTRACE-}" in
+ libdw)
+ apt_get_install libdw-dev libz-dev liblzma-dev
+ ;;
+ libunwind)
+ apt_get_install libunwind8-dev
+ ;;
+esac
+
case "${CHECK-}" in
coverage)
apt_get_install lcov
;;
esac
+case "${STACKTRACE-}" in
+ libdw|libunwind)
+ DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-$STACKTRACE"
+ ;;
+ no)
+ DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --disable-stacktrace"
+ ;;
+esac
+
case "$KHEADERS" in
*/*)
CPPFLAGS='-isystem /opt/kernel/include'