forked from mia/Aegisub
Add back original travis tests
This commit is contained in:
parent
3225ae39f4
commit
fbca222295
47
.travis.yml
47
.travis.yml
|
@ -1,5 +1,5 @@
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: xenial
|
dist: bionic
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
git:
|
git:
|
||||||
|
@ -23,24 +23,45 @@ addons:
|
||||||
- libboost-all-dev
|
- libboost-all-dev
|
||||||
- libffms2-dev
|
- libffms2-dev
|
||||||
- libfontconfig1-dev
|
- libfontconfig1-dev
|
||||||
- libopenal-dev
|
- libalut-dev
|
||||||
- libuchardet-dev
|
- libuchardet-dev
|
||||||
- libwxgtk3.0-dev
|
- libwxgtk3.0-dev
|
||||||
|
- portaudio19-dev
|
||||||
|
- libpulse-dev
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {}
|
||||||
|
- env: BUILD_SUIT=autotools
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- sudo luarocks install busted > /dev/null
|
- sudo luarocks install busted > /dev/null
|
||||||
- sudo luarocks install moonscript > /dev/null
|
- sudo luarocks install moonscript > /dev/null
|
||||||
- sudo luarocks install uuid > /dev/null
|
- sudo luarocks install uuid > /dev/null
|
||||||
|
# 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;
|
||||||
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Remove the CMake provided by travis
|
- if [ "$BUILD_SUIT" = "autotools" ]; then
|
||||||
- sudo rm -rf /usr/local/cmake*
|
export CPPFLAGS="-fprofile-arcs -ftest-coverage";
|
||||||
|
export LIBS="-lgcov";
|
||||||
- ./build/version.sh .
|
./autogen.sh;
|
||||||
- mkdir build-dir
|
./configure --enable-debug || cat config.log;
|
||||||
- cd build-dir
|
make -j2;
|
||||||
- cmake -DCMAKE_CXX_FLAGS='-std=gnu++11' ..
|
make test || travis_terminate 1;
|
||||||
- make -j2
|
coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null;
|
||||||
|
else
|
||||||
|
./build/version.sh .;
|
||||||
|
mkdir build-dir;
|
||||||
|
cd build-dir;
|
||||||
|
cmake -DCMAKE_CXX_FLAGS='-Wall -Wextra -pedantic -std=gnu++11' ..;
|
||||||
|
make -j2;
|
||||||
|
fi
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|
|
@ -29,6 +29,9 @@ namespace agi { namespace charset {
|
||||||
std::string Detect(agi::fs::path const& file) {
|
std::string Detect(agi::fs::path const& file) {
|
||||||
agi::read_file_mapping fp(file);
|
agi::read_file_mapping fp(file);
|
||||||
|
|
||||||
|
// FIXME: It is an empty file. Treat as ascii
|
||||||
|
if (fp.size() == 0) return "ascii";
|
||||||
|
|
||||||
// FIXME: Dirty hack for Matroska. These 4 bytes are the magic
|
// FIXME: Dirty hack for Matroska. These 4 bytes are the magic
|
||||||
// number of EBML which is used by mkv and webm
|
// number of EBML which is used by mkv and webm
|
||||||
if (fp.size() >= 4) {
|
if (fp.size() >= 4) {
|
||||||
|
|
Loading…
Reference in a new issue