diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ac054a7..b283cd63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,30 +8,66 @@ variables: 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: +clang-x86_64-libdw: stage: test script: ci/run-build-and-tests.sh variables: CC: "clang" TARGET: "x86_64" + STACKTRACE: "libdw" -clang-x86: +clang-x86_64-libunwind: + stage: test + script: ci/run-build-and-tests.sh + variables: + CC: "clang" + TARGET: "x86_64" + STACKTRACE: "libunwind" + +clang-x86_64-nounwind: + stage: test + script: ci/run-build-and-tests.sh + variables: + CC: "clang" + TARGET: "x86_64" + STACKTRACE: "no" + +clang-x86-nounwind: stage: test script: ci/run-build-and-tests.sh variables: CC: "clang" TARGET: "x86" + STACKTRACE: "no" diff --git a/.travis.yml b/.travis.yml index 0091e460..5666ab5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,35 +21,50 @@ matrix: - 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 diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 75cbaf6d..e704d44e 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -1,7 +1,7 @@ #!/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() @@ -90,6 +90,15 @@ case "$CC" in ;; 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 diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index c43e374a..c3c382e9 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -24,6 +24,15 @@ case "${TARGET-}" in ;; 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'