Skip to content

Commit ee5d88c

Browse files
committed
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.
1 parent 3a4bd6b commit ee5d88c

File tree

4 files changed

+74
-5
lines changed

4 files changed

+74
-5
lines changed

.gitlab-ci.yml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,66 @@ variables:
88
SLEEP_A_BIT: "sleep 0.2"
99
VERBOSE: "1"
1010

11-
gcc-x86_64:
11+
gcc-x86_64-libdw:
1212
stage: test
1313
script: ci/run-build-and-tests.sh
1414
variables:
1515
CC: "gcc"
1616
TARGET: "x86_64"
17+
STACKTRACE: "libdw"
1718

18-
gcc-x86:
19+
gcc-x86_64-libunwind:
20+
stage: test
21+
script: ci/run-build-and-tests.sh
22+
variables:
23+
CC: "gcc"
24+
TARGET: "x86_64"
25+
STACKTRACE: "libunwind"
26+
27+
gcc-x86_64-nounwind:
28+
stage: test
29+
script: ci/run-build-and-tests.sh
30+
variables:
31+
CC: "gcc"
32+
TARGET: "x86_64"
33+
STACKTRACE: "no"
34+
35+
gcc-x86-nounwind:
1936
stage: test
2037
script: ci/run-build-and-tests.sh
2138
variables:
2239
CC: "gcc"
2340
TARGET: "x86"
41+
STACKTRACE: "no"
42+
43+
clang-x86_64-libdw:
44+
stage: test
45+
script: ci/run-build-and-tests.sh
46+
variables:
47+
CC: "clang"
48+
TARGET: "x86_64"
49+
STACKTRACE: "libdw"
50+
51+
clang-x86_64-libunwind:
52+
stage: test
53+
script: ci/run-build-and-tests.sh
54+
variables:
55+
CC: "clang"
56+
TARGET: "x86_64"
57+
STACKTRACE: "libunwind"
2458

25-
clang-x86_64:
59+
clang-x86_64-nounwind:
2660
stage: test
2761
script: ci/run-build-and-tests.sh
2862
variables:
2963
CC: "clang"
3064
TARGET: "x86_64"
65+
STACKTRACE: "no"
3166

32-
clang-x86:
67+
clang-x86-nounwind:
3368
stage: test
3469
script: ci/run-build-and-tests.sh
3570
variables:
3671
CC: "clang"
3772
TARGET: "x86"
73+
STACKTRACE: "no"

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,50 @@ matrix:
2121
- compiler: gcc
2222
env:
2323
- TARGET=x86_64
24+
- STACKTRACE=libunwind
2425
- CHECK=coverage
2526
- KHEADERS=torvalds/linux
2627
- compiler: gcc
2728
env:
2829
- TARGET=x86_64
30+
- STACKTRACE=libunwind
2931
- compiler: gcc
3032
env:
3133
- TARGET=x32
34+
- STACKTRACE=no
3235
- compiler: gcc
3336
env:
3437
- TARGET=x86
38+
- STACKTRACE=no
3539
- compiler: clang
3640
env:
3741
- TARGET=x86_64
42+
- STACKTRACE=libunwind
3843
- compiler: musl-gcc
3944
env:
4045
- TARGET=x86_64
46+
- STACKTRACE=no
4147
- compiler: clang
4248
env:
4349
- TARGET=x86
50+
- STACKTRACE=no
4451
- compiler: musl-gcc
4552
env:
4653
- TARGET=x86
54+
- STACKTRACE=no
4755
- compiler: gcc-7
4856
env:
4957
- TARGET=x86_64
58+
- STACKTRACE=libunwind
5059
- compiler: gcc-7
5160
env:
5261
- TARGET=x32
62+
- STACKTRACE=no
5363
- compiler: gcc-7
5464
env:
5565
- TARGET=x86
66+
- STACKTRACE=no
67+
- compiler: gcc
68+
env:
69+
- TARGET=x86_64
70+
- STACKTRACE=no

ci/install-dependencies.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh -ex
22

33
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
4-
common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libdw-dev make pkg-config xz-utils'
4+
common_packages='autoconf automake faketime file gawk gcc-multilib git gzip make pkg-config xz-utils'
55

66
updated=
77
apt_get_install()
@@ -90,6 +90,15 @@ case "$CC" in
9090
;;
9191
esac
9292

93+
case "${STACKTRACE-}" in
94+
libdw)
95+
apt_get_install libdw-dev libz-dev liblzma-dev
96+
;;
97+
libunwind)
98+
apt_get_install libunwind8-dev
99+
;;
100+
esac
101+
93102
case "${CHECK-}" in
94103
coverage)
95104
apt_get_install lcov

ci/run-build-and-tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ case "${TARGET-}" in
2424
;;
2525
esac
2626

27+
case "${STACKTRACE-}" in
28+
libdw|libunwind)
29+
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-$STACKTRACE"
30+
;;
31+
no)
32+
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --disable-stacktrace"
33+
;;
34+
esac
35+
2736
case "$KHEADERS" in
2837
*/*)
2938
CPPFLAGS='-isystem /opt/kernel/include'

0 commit comments

Comments
 (0)