ci: add more variants of unwinder to test matrices

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.
This commit is contained in:
Дмитрий Левин 2018-05-04 23:13:45 +00:00
parent 3a4bd6b9a7
commit ee5d88c5b6
4 changed files with 74 additions and 5 deletions

View File

@ -8,30 +8,66 @@ variables:
SLEEP_A_BIT: "sleep 0.2" SLEEP_A_BIT: "sleep 0.2"
VERBOSE: "1" VERBOSE: "1"
gcc-x86_64: gcc-x86_64-libdw:
stage: test stage: test
script: ci/run-build-and-tests.sh script: ci/run-build-and-tests.sh
variables: variables:
CC: "gcc" CC: "gcc"
TARGET: "x86_64" 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 stage: test
script: ci/run-build-and-tests.sh script: ci/run-build-and-tests.sh
variables: variables:
CC: "gcc" CC: "gcc"
TARGET: "x86" TARGET: "x86"
STACKTRACE: "no"
clang-x86_64: clang-x86_64-libdw:
stage: test stage: test
script: ci/run-build-and-tests.sh script: ci/run-build-and-tests.sh
variables: variables:
CC: "clang" CC: "clang"
TARGET: "x86_64" 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 stage: test
script: ci/run-build-and-tests.sh script: ci/run-build-and-tests.sh
variables: variables:
CC: "clang" CC: "clang"
TARGET: "x86" TARGET: "x86"
STACKTRACE: "no"

View File

@ -21,35 +21,50 @@ matrix:
- compiler: gcc - compiler: gcc
env: env:
- TARGET=x86_64 - TARGET=x86_64
- STACKTRACE=libunwind
- CHECK=coverage - CHECK=coverage
- KHEADERS=torvalds/linux - KHEADERS=torvalds/linux
- compiler: gcc - compiler: gcc
env: env:
- TARGET=x86_64 - TARGET=x86_64
- STACKTRACE=libunwind
- compiler: gcc - compiler: gcc
env: env:
- TARGET=x32 - TARGET=x32
- STACKTRACE=no
- compiler: gcc - compiler: gcc
env: env:
- TARGET=x86 - TARGET=x86
- STACKTRACE=no
- compiler: clang - compiler: clang
env: env:
- TARGET=x86_64 - TARGET=x86_64
- STACKTRACE=libunwind
- compiler: musl-gcc - compiler: musl-gcc
env: env:
- TARGET=x86_64 - TARGET=x86_64
- STACKTRACE=no
- compiler: clang - compiler: clang
env: env:
- TARGET=x86 - TARGET=x86
- STACKTRACE=no
- compiler: musl-gcc - compiler: musl-gcc
env: env:
- TARGET=x86 - TARGET=x86
- STACKTRACE=no
- compiler: gcc-7 - compiler: gcc-7
env: env:
- TARGET=x86_64 - TARGET=x86_64
- STACKTRACE=libunwind
- compiler: gcc-7 - compiler: gcc-7
env: env:
- TARGET=x32 - TARGET=x32
- STACKTRACE=no
- compiler: gcc-7 - compiler: gcc-7
env: env:
- TARGET=x86 - TARGET=x86
- STACKTRACE=no
- compiler: gcc
env:
- TARGET=x86_64
- STACKTRACE=no

View File

@ -1,7 +1,7 @@
#!/bin/sh -ex #!/bin/sh -ex
type sudo >/dev/null 2>&1 && sudo=sudo || sudo= 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= updated=
apt_get_install() apt_get_install()
@ -90,6 +90,15 @@ case "$CC" in
;; ;;
esac esac
case "${STACKTRACE-}" in
libdw)
apt_get_install libdw-dev libz-dev liblzma-dev
;;
libunwind)
apt_get_install libunwind8-dev
;;
esac
case "${CHECK-}" in case "${CHECK-}" in
coverage) coverage)
apt_get_install lcov apt_get_install lcov

View File

@ -24,6 +24,15 @@ case "${TARGET-}" in
;; ;;
esac 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 case "$KHEADERS" in
*/*) */*)
CPPFLAGS='-isystem /opt/kernel/include' CPPFLAGS='-isystem /opt/kernel/include'