PyCIRCLean/.travis.yml

105 lines
3.5 KiB
YAML

language: python
python:
- "2.7_with_system_site_packages"
- "3.3"
- "3.4"
- "3.5"
- "nightly"
sudo: required
dist: trusty
addons:
apt:
packages:
# General dependencies
- p7zip-full
# generic.py dependencies
- ghostscript
# Testing dependencies
- mercurial
install:
# General dependencies
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse"
- sudo apt-get update -qq
- sudo apt-get install -y p7zip-rar
# generic.py: pdf2htmlEX + dependencies
- sudo add-apt-repository ppa:fontforge/fontforge --yes
# to get a working 0.26 poppler
- sudo add-apt-repository ppa:delayargentina/delayx --yes
- sudo apt-get update -qq
- sudo apt-get install -y libpoppler-dev libpoppler-private-dev libspiro-dev libcairo-dev libpango1.0-dev libfreetype6-dev libltdl-dev libfontforge-dev python-imaging python-pip firefox xvfb
- git clone https://github.com/coolwanglu/pdf2htmlEX.git
- pushd pdf2htmlEX
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_SVG=ON .
- make
- sudo make install
- popd
# generic.py: Other dependencies
- sudo apt-get install -y libreoffice libreoffice-script-provider-python unoconv
# filecheck.py dependencies
- sudo apt-get install libxml2-dev libxslt1-dev
- wget https://didierstevens.com/files/software/pdfid_v0_2_1.zip
- unzip pdfid_v0_2_1.zip
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7_with_system_site_packages" ]]; then
sudo pip install -U pip lxml exifread pillow
sudo pip install -U git+https://github.com/Rafiot/officedissector.git
sudo pip install -U oletools olefile coveralls codecov
else
pip install -U pip lxml exifread pillow
pip install -U git+https://github.com/Rafiot/officedissector.git
pip install -U coveralls codecov
fi
- python setup.py -q install
# Testing dependencies
- sudo apt-get install rar
# Prepare testings
# Zoo
- git clone https://github.com/Rafiot/theZoo.git
- pushd theZoo/malwares/Binaries
- python unpackall.py
- popd
- mv theZoo/malwares/Binaries/out tests/src/
# path transversal
- hg clone https://bitbucket.org/jwilk/path-traversal-samples
- pushd path-traversal-samples
- pushd zip
- make
- popd
- pushd rar
- make
- popd
- popd
- mv path-traversal-samples/zip/*.zip tests/src/
- mv path-traversal-samples/rar/*.rar tests/src/
# Office docs
- git clone https://github.com/eea/odfpy.git
- mv odfpy/tests/examples/* tests/src/
- pushd tests/src/
- wget https://bitbucket.org/decalage/olefileio_pl/raw/3073963b640935134ed0da34906fea8e506460be/Tests/images/test-ole-file.doc
- wget http://www.officedissector.com/corpus/fraunhoferlibrary.zip
- unzip -o fraunhoferlibrary.zip
- rm fraunhoferlibrary.zip
- 7z x 42.zip -p42
- wget http://www.sample-videos.com/audio/mp3/india-national-anthem.mp3
- wget http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
- wget http://thewalter.net/stef/software/rtfx/sample.rtf
- echo "blah" > test.obj
- popd
script:
- travis_wait 60 coverage run --source=bin,kittengroomer setup.py test
notifications:
email:
on_success: change
on_failure: change
after_success:
- coveralls
- codecov