Skip to content

Commit

Permalink
Merge pull request #2031 from masatake/ci-out-of-tree-building
Browse files Browse the repository at this point in the history
travis-ci: do out-of-tree build
  • Loading branch information
masatake committed Mar 10, 2019
2 parents 506fc4e + b9f11b4 commit 1208e45
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ after_success:
sed -i -e 's/severity.capitalize!/severity = severity.capitalize/' $f
done
) || :
lcov -c -b . -d . -o coverage.info && lcoveralls --root . --retry-count 5 coverage.info
(cd linux-gcc-gcov; lcov -c -b . -d . -o coverage.info && lcoveralls --root . --retry-count 5 coverage.info)
fi
# Build Matrix configuration
Expand Down
18 changes: 17 additions & 1 deletion misc/travis-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,47 @@ SANDBOX_CASES=sandbox,sandbox-crash,sandbox-default-req,sandbox-unknown-submode
if [ "$TARGET" = "Unix" ]; then

./autogen.sh
CONFIGURE_CMDLINE="./configure --enable-debugging --enable-iconv "
CONFIGURE_CMDLINE="../configure --enable-debugging --enable-iconv "

BUILDDIR0="$TRAVIS_OS_NAME"-"$CC"
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "gcc" ]; then

BUILDDIR=${BUILDDIR0}
mkdir -p ${BUILDDIR}
(
cd ${BUILDDIR}
${CONFIGURE_CMDLINE}
make -j2
echo 'Run "make tmain (sandbox only)" without gcov'
make -j2 tmain TRAVIS=1 UNITS=${SANDBOX_CASES}

make clean
)

BUILDDIR=${BUILDDIR0}-gcov
mkdir -p ${BUILDDIR}
(
cd ${BUILDDIR}
${CONFIGURE_CMDLINE} --enable-coverage-gcov
make -j2 COVERAGE=1
echo 'List features'
./ctags --list-features
echo 'Run "make check" with gcov'
make -j2 check roundtrip TRAVIS=1
)

else
BUILDDIR=${BUILDDIR0}
mkdir -p ${BUILDDIR}
(
cd ${BUILDDIR}
${CONFIGURE_CMDLINE}
make -j2
echo 'List features'
./ctags --list-features
echo 'Run "make check" (without gcov)'
make -j2 check roundtrip TRAVIS=1
)
fi
elif [ "$TARGET" = "Mingw32" ]; then
make -j2 CC=i686-w64-mingw32-gcc CC_FOR_PACKCC=gcc -f mk_mingw.mak
Expand Down
2 changes: 1 addition & 1 deletion misc/units
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ prepare_bundles ()
;;
*)
dist="${to}/$(basename ${src})"
if ! cp -ar "${src}" "${to}"; then
if ! cp -a "${src}" "${to}"; then
ERROR 1 "failure in copying bundle file \"${src}\" to \"${to}\""
else
echo ${dist} >> ${obundles}
Expand Down

0 comments on commit 1208e45

Please sign in to comment.