117 lines
2.9 KiB
YAML
117 lines
2.9 KiB
YAML
dist: trusty
|
|
language: python
|
|
cache:
|
|
pip: true
|
|
directories:
|
|
- $HOME/Library/Caches/Homebrew
|
|
|
|
addons:
|
|
apt:
|
|
update: true
|
|
sources:
|
|
- sourceline: 'ppa:alex-p/tesseract-ocr'
|
|
- sourceline: 'ppa:heyarje/libav-11'
|
|
- sourceline: 'ppa:vshn/ghostscript'
|
|
packages:
|
|
- ghostscript
|
|
- libavcodec56
|
|
- libavformat56
|
|
- libavutil54
|
|
- libffi-dev
|
|
- pngquant
|
|
- poppler-utils
|
|
- qpdf
|
|
- tesseract-ocr
|
|
- tesseract-ocr-deu
|
|
- tesseract-ocr-eng
|
|
- tesseract-ocr-fra
|
|
|
|
env:
|
|
global:
|
|
- secure: "hsf6MT+n2x3OiDM2fQyJZdV0/PWYmv81LdVqC6cfnHBE/8N3DloJRqQ7WfO14TxhiK9PEC7MpyCj0lSabUHEO7gSH6Vks6I1asoSkt8S9/bSMlhT4hei+pwVpeGEiU5xHVATNjY+D919VC3IFvc3XmjT74h/2SLhaZ+jhEmDggM=" # HOMEBREW_OCRMYPDF_TOKEN
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
sudo: required
|
|
language: python
|
|
python: 3.5
|
|
env: EXTRAS=
|
|
- os: linux
|
|
sudo: required
|
|
language: python
|
|
python: 3.6
|
|
env: EXTRAS=
|
|
- os: linux
|
|
sudo: required
|
|
language: python
|
|
python: 3.6
|
|
env: EXTRAS=[fitz]
|
|
- os: osx
|
|
osx_image: xcode8
|
|
language: generic
|
|
env: EXTRAS=
|
|
- os: osx
|
|
osx_image: xcode8
|
|
language: generic
|
|
env: EXTRAS=[fitz]
|
|
|
|
before_cache:
|
|
- rm -f $HOME/.cache/pip/log/debug.log
|
|
|
|
before_install: |
|
|
mkdir -p bin
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
pip3 install --upgrade pip
|
|
pip3 install --upgrade wheel
|
|
mkdir -p packages
|
|
wget -q 'https://www.dropbox.com/s/vaq0kbwi6e6au80/unpaper_6.1-1.deb?raw=1' -O packages/unpaper_6.1-1.deb
|
|
sudo dpkg -i packages/unpaper_6.1-1.deb
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
brew update && brew bundle --file=.travis/Brewfile
|
|
pip3 install --upgrade pip
|
|
pip3 install wheel
|
|
fi
|
|
|
|
install:
|
|
- export PATH=$PWD/bin:$PATH
|
|
- pip3 install ".$EXTRAS"
|
|
- pip3 install -r test_requirements.txt
|
|
|
|
script:
|
|
- tesseract --version
|
|
- qpdf --version
|
|
- pytest -n auto
|
|
|
|
deploy:
|
|
# release for main pypi
|
|
# 3.6 w/o fitz is considered the build leader and does the deploy, otherwise there is
|
|
# a race and all versions will try to deploy
|
|
# OTOH if we ever need separate binary wheels then each version needs its
|
|
# own deploy
|
|
- provider: pypi
|
|
user: ocrmypdf-travis
|
|
password:
|
|
secure: "DTFOmmNL6olA0+yXvp4u9jXZlZeqrJsJ0526jzqf4a3gZ6jnGTq5UI6WzRsslSyoMMfXKtHQebqHM6ogSgCZinyZ3ufHJo8fn9brxbEc2gsiWkbj5o3bGwdWMT1vNNE7XW0VCpw87rZ1EEwjl4FJHFudMlPR1yfU5+uq0k0PACo="
|
|
distributions: "sdist bdist_wheel"
|
|
on:
|
|
branch: master
|
|
tags: true
|
|
condition: $TRAVIS_PYTHON_VERSION == "3.6" && $TRAVIS_OS_NAME == "linux" && $EXTRAS == ""
|
|
skip_upload_docs: true
|
|
|
|
# null deploy for osx
|
|
# we really just want to run after_deploy *after* pypi upload is done, but
|
|
# after_deploy on runs if a given box deployed
|
|
- provider: script
|
|
script: /usr/bin/true
|
|
on:
|
|
branch: master
|
|
tags: true
|
|
condition: $TRAVIS_OS_NAME == "osx"
|
|
|
|
after_deploy: |
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
bash .travis/osx_brew.sh
|
|
fi
|