2018-07-24 09:06:53 +02:00
|
|
|
sudo: required
|
2018-07-22 01:32:05 +02:00
|
|
|
dist: xenial
|
2017-02-15 18:10:40 +01:00
|
|
|
language: python
|
2018-07-29 06:24:38 +02:00
|
|
|
python: "3.7"
|
2017-02-15 18:10:40 +01:00
|
|
|
|
2018-07-22 01:32:05 +02:00
|
|
|
jobs:
|
|
|
|
include:
|
2017-10-25 18:26:04 +02:00
|
|
|
|
2018-07-27 01:18:48 +02:00
|
|
|
- stage: code quality
|
|
|
|
name: "pylint lbrynet"
|
|
|
|
install:
|
2018-11-26 16:47:48 +01:00
|
|
|
- pip install astroid==2.0.4
|
|
|
|
# newer astroid fails in pylint so we pre-install older version
|
2018-07-27 01:18:48 +02:00
|
|
|
- pip install pylint
|
2018-11-21 00:21:53 +01:00
|
|
|
- pip install git+https://github.com/lbryio/torba.git#egg=torba
|
|
|
|
- pip install -e .
|
2018-07-27 01:18:48 +02:00
|
|
|
script: pylint lbrynet
|
|
|
|
|
2018-07-29 06:24:38 +02:00
|
|
|
- &tests
|
|
|
|
stage: test
|
2018-11-26 22:52:27 +01:00
|
|
|
name: "Unit Tests"
|
2018-07-27 01:18:48 +02:00
|
|
|
install:
|
|
|
|
- pip install coverage
|
2018-11-21 00:21:53 +01:00
|
|
|
- pip install git+https://github.com/lbryio/torba.git#egg=torba
|
2018-07-27 01:18:48 +02:00
|
|
|
- pip install -e .[test]
|
2018-10-16 05:04:04 +02:00
|
|
|
script:
|
|
|
|
- HOME=/tmp coverage run -p --source=lbrynet -m unittest discover -v tests.unit.wallet
|
|
|
|
- HOME=/tmp coverage run -p --source=lbrynet -m twisted.trial --reactor=asyncio tests.unit.analytics tests.unit.components tests.unit.core tests.unit.cryptstream tests.unit.database tests.unit.dht tests.unit.lbryfilemanager tests.unit.lbrynet_daemon tests.unit.test_cli tests.unit.test_customLogger
|
2018-07-27 23:56:13 +02:00
|
|
|
after_success:
|
2018-10-16 05:04:04 +02:00
|
|
|
- coverage combine
|
2018-07-27 23:56:13 +02:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2018-08-22 06:12:46 +02:00
|
|
|
|
2018-07-29 06:24:38 +02:00
|
|
|
- <<: *tests
|
2018-11-26 22:52:27 +01:00
|
|
|
name: "DHT Tests"
|
2018-08-22 06:12:46 +02:00
|
|
|
script: HOME=/tmp coverage run --source=lbrynet -m twisted.trial --reactor=asyncio tests.functional
|
|
|
|
|
2018-07-27 01:18:48 +02:00
|
|
|
- name: "Integration Tests"
|
|
|
|
install:
|
|
|
|
- pip install tox-travis coverage
|
|
|
|
- pushd .. && git clone https://github.com/lbryio/torba.git && popd
|
|
|
|
script: tox
|
|
|
|
after_success:
|
|
|
|
- coverage combine tests/
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2018-07-07 00:31:35 +02:00
|
|
|
|
2018-07-24 09:06:53 +02:00
|
|
|
- stage: build
|
2018-07-27 01:18:48 +02:00
|
|
|
name: "Windows"
|
2018-07-29 16:55:30 +02:00
|
|
|
language: generic
|
2018-07-27 01:18:48 +02:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
install:
|
2018-11-26 22:17:36 +01:00
|
|
|
- docker pull lbry/pyinstaller34_32bits:py371
|
2018-07-27 01:18:48 +02:00
|
|
|
script:
|
2018-11-26 22:17:36 +01:00
|
|
|
- docker run -v "$(pwd):/src/lbry" lbry/pyinstaller34_32bits:py371 lbry/scripts/wine_build.sh
|
2018-09-27 01:18:53 +02:00
|
|
|
- sudo zip -j dist/lbrynet-windows.zip dist/lbrynet.exe
|
2018-07-27 01:18:48 +02:00
|
|
|
addons:
|
|
|
|
artifacts:
|
|
|
|
working_dir: dist
|
|
|
|
paths:
|
2018-09-26 23:52:21 +02:00
|
|
|
- lbrynet-windows.zip
|
2018-07-27 01:18:48 +02:00
|
|
|
target_paths:
|
2018-07-27 22:20:10 +02:00
|
|
|
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/win/
|
2018-07-27 01:18:48 +02:00
|
|
|
|
2018-07-29 06:16:57 +02:00
|
|
|
- &build
|
|
|
|
name: "Linux"
|
2018-07-27 00:08:26 +02:00
|
|
|
install:
|
2018-07-27 01:13:14 +02:00
|
|
|
- pip3 install pyinstaller
|
|
|
|
- pip3 install git+https://github.com/lbryio/torba.git
|
2018-11-04 08:44:47 +01:00
|
|
|
- python scripts/set_build.py
|
2018-07-27 01:13:14 +02:00
|
|
|
- pip3 install -e .
|
2018-07-24 09:06:53 +02:00
|
|
|
script:
|
2018-11-04 21:51:27 +01:00
|
|
|
- pyinstaller -F -n lbrynet lbrynet/extras/cli.py
|
2018-09-26 21:54:40 +02:00
|
|
|
- chmod +x dist/lbrynet
|
2018-09-26 23:52:21 +02:00
|
|
|
- zip -j dist/lbrynet-${OS}.zip dist/lbrynet
|
2018-07-27 04:04:43 +02:00
|
|
|
- ./dist/lbrynet --version
|
2018-07-29 06:16:57 +02:00
|
|
|
env: OS=linux
|
2018-07-27 00:08:26 +02:00
|
|
|
addons:
|
|
|
|
artifacts:
|
|
|
|
working_dir: dist
|
|
|
|
paths:
|
2018-09-26 23:20:24 +02:00
|
|
|
- lbrynet-${OS}.zip
|
2018-07-27 22:59:49 +02:00
|
|
|
# artifact uploader thinks lbrynet is a directory, https://github.com/travis-ci/artifacts/issues/78
|
2018-07-27 00:08:26 +02:00
|
|
|
target_paths:
|
2018-07-29 06:16:57 +02:00
|
|
|
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/${OS}/lbrynet
|
|
|
|
|
|
|
|
- <<: *build
|
|
|
|
name: "Mac"
|
|
|
|
os: osx
|
2018-12-08 20:38:35 +01:00
|
|
|
osx_image: xcode8.3
|
2018-07-29 06:16:57 +02:00
|
|
|
language: generic
|
|
|
|
env: OS=mac
|
2018-11-27 02:17:01 +01:00
|
|
|
cache: false
|
2018-12-04 10:34:57 +01:00
|
|
|
before_install:
|
2018-11-30 17:50:29 +01:00
|
|
|
- brew upgrade python
|
2018-12-04 10:34:57 +01:00
|
|
|
install:
|
|
|
|
- python3 --version
|
|
|
|
- pip3 --version
|
|
|
|
- pip3 install pyinstaller
|
2018-11-21 00:21:53 +01:00
|
|
|
- git clone https://github.com/lbryio/torba.git --depth 1
|
|
|
|
- sed -i -e "s/'plyvel',//" torba/setup.py
|
2018-12-04 10:34:57 +01:00
|
|
|
- cd torba && pip3 install -e . && cd ..
|
|
|
|
- python3 scripts/set_build.py
|
|
|
|
- pip3 install -e .
|
2018-07-24 09:06:53 +02:00
|
|
|
|
2018-07-07 00:31:35 +02:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/pip
|
|
|
|
- $HOME/Library/Caches/pip
|
|
|
|
- $TRAVIS_BUILD_DIR/.tox
|