Move coveralls to after_success in Travis CI

So it won't affect the build result
This commit is contained in:
wangqr 2020-07-28 16:43:53 -04:00
parent 533716c6c0
commit 3bde4dd751
3 changed files with 24 additions and 14 deletions

View File

@ -33,6 +33,8 @@ addons:
- libgtest-dev
- gcc-10
- g++-10
- python3-pip
- python3-setuptools
homebrew:
packages:
- autoconf
@ -55,7 +57,7 @@ addons:
env:
- ''
- BUILD_SUIT=autotools
- BUILD_SUIT=autotools WITH_COVERALLS=y
- CC=gcc-10 CXX=g++-10
- BUILD_SUIT=autotools CC=gcc-10 CXX=g++-10
@ -69,7 +71,7 @@ install:
- ./.travis/install.sh
script:
- if [ $TRAVIS_OS_NAME = 'osx' ]; then
- if [ "$TRAVIS_OS_NAME" = 'osx' ]; then
export PATH="/usr/local/opt/gettext/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:$PATH";
export CPPFLAGS="-I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include";
export LDFLAGS="-L/usr/local/opt/gettext/lib -L/usr/local/opt/icu4c/lib";
@ -79,14 +81,15 @@ script:
./configure --enable-debug || cat config.log;
make -j2 || travis_terminate 1;
make test || travis_terminate 1;
elif [ "$BUILD_SUIT" = "autotools" ]; then
export CPPFLAGS="-fprofile-arcs -ftest-coverage";
export LIBS="-lgcov";
elif [ "$BUILD_SUIT" = 'autotools' ]; then
if [ ! -z "$WITH_COVERALLS" ]; then
export CPPFLAGS="--coverage";
export LIBS="-lgcov";
fi;
./autogen.sh;
./configure --enable-debug || cat config.log;
make -j2 || travis_terminate 1;
make test || travis_terminate 1;
coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null;
else
mkdir build-dir;
cd build-dir;
@ -94,3 +97,8 @@ script:
make -j2 || travis_terminate 1;
make test || travis_terminate 1;
fi
after_success:
- if [ ! -z "$WITH_COVERALLS" ]; then
coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null;
fi

View File

@ -6,14 +6,16 @@ if [ "$TRAVIS_OS_NAME" = 'linux' ]; then
# Remove the CMake provided by travis
sudo rm -rf /usr/local/cmake*
if [ "$BUILD_SUIT" = 'autotools' ]; then
sudo pip install -U cpp-coveralls;
git submodule --quiet init;
git submodule --quiet update vendor/googletest;
if [ ! -z "$WITH_COVERALLS" ]; then
sudo pip3 install -U cpp-coveralls
fi
git submodule --quiet init
git submodule --quiet update vendor/googletest
else
pushd /usr/src/googletest;
sudo cmake .;
sudo make install -j2;
popd;
pushd /usr/src/googletest
sudo cmake .
sudo make install -j2
popd
fi
fi
sudo luarocks install busted > /dev/null

View File

@ -38,7 +38,7 @@ and optional dependencies:
You can use the package manager provided by your distro to install these dependencies. Package name varies by distro. Some useful references are:
* For ArchLinux, refer to [AUR](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=aegisub-git).
* For Ubuntu, refer to [Travis](.travis.yml#L14-L35).
* For Ubuntu, refer to [Travis](.travis.yml#L14-L32).
* For macOS, see [Special notice for macOS](https://github.com/wangqr/Aegisub/wiki/Special-notice-for-macOS) on project Wiki.
After installing the dependencies, you can clone and build Aegisub with: