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
|
2019-06-20 21:26:54 +02:00
|
|
|
name: "pylint & mypy"
|
2018-07-27 01:18:48 +02:00
|
|
|
install:
|
2019-06-20 21:53:26 +02:00
|
|
|
- pip install astroid pylint mypy==0.701
|
2019-06-20 21:26:54 +02:00
|
|
|
- make install
|
|
|
|
script: make lint
|
2018-07-27 01:18:48 +02:00
|
|
|
|
2019-01-22 23:45:36 +01:00
|
|
|
- stage: test
|
2019-06-20 21:26:54 +02:00
|
|
|
name: "LBRY Unit Tests"
|
2018-07-27 01:18:48 +02:00
|
|
|
install:
|
|
|
|
- pip install coverage
|
2019-06-20 21:26:54 +02:00
|
|
|
- make install
|
2018-10-16 05:04:04 +02:00
|
|
|
script:
|
2019-06-20 21:26:54 +02:00
|
|
|
- cd lbry && HOME=/tmp coverage run -p --source=lbrynet -m unittest discover -vv tests.unit
|
2018-07-27 23:56:13 +02:00
|
|
|
after_success:
|
2019-06-20 22:06:21 +02:00
|
|
|
- coverage combine lbry/
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2018-08-22 06:12:46 +02:00
|
|
|
|
2019-06-20 22:19:19 +02:00
|
|
|
- name: "LBRY Integration Tests"
|
2019-01-24 00:04:16 +01:00
|
|
|
install:
|
2019-06-20 22:06:21 +02:00
|
|
|
- pip install coverage tox-travis
|
2019-06-20 22:19:19 +02:00
|
|
|
script: cd lbry && tox
|
2019-06-20 21:26:54 +02:00
|
|
|
after_success:
|
2019-06-20 22:19:19 +02:00
|
|
|
- coverage combine lbry
|
2019-06-20 22:06:21 +02:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2019-05-24 22:14:47 +02:00
|
|
|
|
2019-06-20 22:19:19 +02:00
|
|
|
- &torba-tests
|
|
|
|
name: "Torba Unit Tests"
|
|
|
|
env: TESTTYPE=unit
|
2019-06-20 21:26:54 +02:00
|
|
|
install:
|
2019-06-20 22:06:21 +02:00
|
|
|
- pip install coverage tox-travis
|
2019-06-20 22:19:19 +02:00
|
|
|
script: cd torba && tox
|
2019-01-24 00:04:16 +01:00
|
|
|
after_success:
|
2019-06-20 22:19:19 +02:00
|
|
|
- coverage combine torba/tests
|
2019-06-20 22:06:21 +02:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2019-01-24 00:04:16 +01:00
|
|
|
|
2019-06-20 22:19:19 +02:00
|
|
|
- <<: *torba-tests
|
|
|
|
name: "Torba Integration Tests"
|
|
|
|
env: TESTTYPE=integration
|
|
|
|
|
2019-04-06 22:29:59 +02:00
|
|
|
- name: "Run Examples"
|
|
|
|
install:
|
|
|
|
- pip install coverage
|
2019-06-20 21:26:54 +02:00
|
|
|
- make install
|
2019-04-06 22:29:59 +02:00
|
|
|
script:
|
2019-06-20 21:26:54 +02:00
|
|
|
- cd lbry && HOME=/tmp coverage run -p --source=lbrynet scripts/generate_json_api.py
|
2019-04-06 22:29:59 +02:00
|
|
|
after_success:
|
2019-06-20 22:06:21 +02:00
|
|
|
- coverage combine lbry
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2019-04-06 22:29:59 +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:
|
2019-06-20 22:19:19 +02:00
|
|
|
- cd lbry && python scripts/set_build.py
|
2019-06-05 23:35:26 +02: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-12-12 05:24:19 +01:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: $GITHUB_OAUTH_TOKEN
|
|
|
|
file: dist/lbrynet-windows.zip
|
|
|
|
skip_cleanup: true
|
|
|
|
overwrite: true
|
|
|
|
draft: true
|
2018-12-12 06:10:39 +01:00
|
|
|
on:
|
|
|
|
tags: true
|
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-12-08 20:45:53 +01:00
|
|
|
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})
|
2018-07-27 01:18:48 +02:00
|
|
|
|
2018-07-29 06:16:57 +02:00
|
|
|
- &build
|
|
|
|
name: "Linux"
|
2018-12-12 05:24:19 +01:00
|
|
|
env: OS=linux
|
2018-07-27 00:08:26 +02:00
|
|
|
install:
|
2018-07-27 01:13:14 +02:00
|
|
|
- pip3 install pyinstaller
|
2019-06-20 23:51:56 +02:00
|
|
|
- cd torba && pip3 install -e . && cd ..
|
|
|
|
- cd lbry
|
2019-06-20 23:07:22 +02:00
|
|
|
- python3 scripts/set_build.py
|
|
|
|
- pip3 install -e .
|
2018-07-24 09:06:53 +02:00
|
|
|
script:
|
2019-06-20 23:07:22 +02:00
|
|
|
- pyinstaller -F -n lbrynet lbrynet/extras/cli.py
|
|
|
|
- chmod +x dist/lbrynet
|
|
|
|
- zip -j dist/lbrynet-${OS}.zip dist/lbrynet
|
|
|
|
- ./dist/lbrynet --version
|
2018-12-12 05:24:19 +01:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: $GITHUB_OAUTH_TOKEN
|
2019-06-20 23:07:22 +02:00
|
|
|
file: lbry/dist/lbrynet-${OS}.zip
|
2018-12-12 05:24:19 +01:00
|
|
|
skip_cleanup: true
|
|
|
|
overwrite: true
|
|
|
|
draft: true
|
2018-12-12 06:10:39 +01:00
|
|
|
on:
|
|
|
|
tags: true
|
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-12-08 20:45:53 +01:00
|
|
|
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})
|
2018-07-29 06:16:57 +02:00
|
|
|
|
|
|
|
- <<: *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:
|
2019-01-11 00:44:42 +01:00
|
|
|
- brew upgrade python || true
|
2019-06-20 23:07:22 +02:00
|
|
|
|
2019-06-20 23:51:56 +02:00
|
|
|
- if: tag IS present
|
|
|
|
stage: build
|
2019-01-25 18:03:39 +01:00
|
|
|
name: "Wallet Server Docker Image - Tagged Release"
|
2019-01-23 21:10:32 +01:00
|
|
|
script:
|
|
|
|
- set -e
|
|
|
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
2019-06-20 23:51:56 +02:00
|
|
|
- travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f lbry/scripts/Dockerfile.wallet_server .
|
2019-06-21 01:49:09 +02:00
|
|
|
- docker push lbry/wallet-server:$TRAVIS_TAG
|
|
|
|
- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
|
|
|
|
stage: build
|
2019-01-25 18:03:39 +01:00
|
|
|
name: "Wallet Server Docker Image - Master"
|
|
|
|
script:
|
|
|
|
- set -e
|
|
|
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
2019-06-20 23:51:56 +02:00
|
|
|
- travis_retry docker build -t lbry/wallet-server:master -f lbry/scripts/Dockerfile.wallet_server .
|
2019-06-21 01:49:09 +02:00
|
|
|
- docker push lbry/wallet-server:master
|
2019-01-23 21:10:32 +01:00
|
|
|
|
2018-07-07 00:31:35 +02:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/pip
|
|
|
|
- $HOME/Library/Caches/pip
|
|
|
|
- $TRAVIS_BUILD_DIR/.tox
|