]> granicus.if.org Git - strace/blob - travis-ci.sh
Introduce HAVE_STRUCT_TCB_EXT_ARG macro
[strace] / travis-ci.sh
1 #!/bin/sh -ex
2
3 case "$CC" in
4   gcc)
5     ENABLE_GCC_WERROR=--enable-gcc-Werror
6     ;;
7   clang-*)
8     sudo apt-get -qq update
9     sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \
10       "$CC"
11     # clang -mx32 fails with the following error:
12     # clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
13     export st_cv_mx32_runtime=no
14     ;;
15   musl-gcc)
16     sudo add-apt-repository ppa:bortis/musl -y
17     sudo apt-get -qq update
18     sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \
19       musl-tools linux-musl-dev
20     ;;
21 esac
22
23 case "${TARGET-}" in
24   x32)
25     CC="$CC -mx32"
26     ;;
27   x86)
28     export DISTCHECK_CONFIGURE_FLAGS='--build=i686-pc-linux-gnu'
29     CC="$CC -m32"
30     ;;
31 esac
32 export CC_FOR_BUILD="$CC"
33
34 $CC --version
35
36 git fetch --unshallow
37 ./git-set-file-times
38 ./bootstrap
39 ./configure --enable-maintainer-mode ${ENABLE_GCC_WERROR-} ${DISTCHECK_CONFIGURE_FLAGS-}
40 j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j=
41 make -k $j distcheck VERBOSE=${VERBOSE-}
42
43 if [ "$CC:${TARGET-}" = 'gcc:x86_64' ]; then
44         set -- strace-*.tar.xz
45         tar -xf "$1"
46         dir="${1%.tar.xz}"
47         cd "$dir"
48         ./configure --enable-code-coverage ${ENABLE_GCC_WERROR-} ${DISTCHECK_CONFIGURE_FLAGS-}
49         make -k $j
50         make -k $j check VERBOSE=${VERBOSE-}
51         codecov --gcov-args=-abcp ||:
52 fi