2019-12-06 00:30:37 +01: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-12-08 05:38:54 +01:00
|
|
|
- make install tools
|
2019-06-20 21:26:54 +02:00
|
|
|
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:
|
2019-12-08 05:38:54 +01:00
|
|
|
- make install tools
|
2018-10-16 05:04:04 +02:00
|
|
|
script:
|
2019-06-21 03:48:16 +02:00
|
|
|
- cd lbry && HOME=/tmp coverage run -p --source=lbry -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/
|
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-08-21 17:51:02 +02:00
|
|
|
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
|
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-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-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:
|
2019-12-08 05:38:54 +01:00
|
|
|
- make install tools
|
2019-04-06 22:29:59 +02:00
|
|
|
script:
|
2019-06-21 03:48:16 +02:00
|
|
|
- cd lbry && HOME=/tmp coverage run -p --source=lbry 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
|
2019-04-06 22:29:59 +02:00
|
|
|
|
2018-07-29 06:16:57 +02:00
|
|
|
- &build
|
2019-06-25 03:52:00 +02:00
|
|
|
stage: build
|
2018-07-29 06:16:57 +02:00
|
|
|
name: "Linux"
|
2018-12-12 05:24:19 +01:00
|
|
|
env: OS=linux
|
2018-07-27 00:08:26 +02:00
|
|
|
install:
|
2019-06-25 05:03:39 +02:00
|
|
|
- pip install pyinstaller awscli
|
2019-11-21 20:16:10 +01:00
|
|
|
- python docker/set_build.py
|
|
|
|
- pip install -e torba/.
|
|
|
|
- pip install -e lbry/.
|
2018-07-24 09:06:53 +02:00
|
|
|
script:
|
2019-11-21 20:16:10 +01:00
|
|
|
- pyinstaller -F -n lbrynet lbry/lbry/extras/cli.py
|
|
|
|
- chmod +x dist/lbrynet
|
|
|
|
- zip --junk-paths lbrynet-${OS}.zip dist/lbrynet
|
2019-06-25 20:21:14 +02:00
|
|
|
- shasum -a 256 -b lbrynet-${OS}.zip
|
2019-11-21 20:16:10 +01:00
|
|
|
- dist/lbrynet --version
|
2019-06-24 18:35:37 +02:00
|
|
|
after_success:
|
|
|
|
- aws configure set aws_access_key_id $ARTIFACTS_KEY
|
|
|
|
- aws configure set aws_secret_access_key $ARTIFACTS_SECRET
|
|
|
|
- aws configure set region us-east-1
|
2019-06-25 04:23:28 +02:00
|
|
|
- export S3_PATH="daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})"
|
|
|
|
- aws s3 cp lbrynet-${OS}.zip s3://build.lbry.io/${S3_PATH}/lbrynet-${OS}.zip
|
2018-12-12 05:24:19 +01:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
2019-07-23 17:03:55 +02:00
|
|
|
api_key:
|
2019-07-23 17:14:00 +02:00
|
|
|
secure: "unnR+aSJ1937Cl1PyBBZzGuZvV5W5TGcXELhXTgyOeeI6FgO/j80qmbNxJDA7qdFH/hvVicQFWoflhZu2dxN5rYP5BQJW3q3XoOLY3XAc1s1vicFkwqn3TIfdFiJTz+/D9eBUBBhHKeYFxm3M+thvklTLgjKl6fflh14NfGuNTevK9yQke8wewW3f9UmFTo1qNOPF1OsTZRbwua6oQYa59P+KukoPt4Dsu1VtILtTkj7hfEsUL79cjotwO3gkhYftxbl/xeDSZWOt+9Nhb8ZKmQG/uDx4JiTMm5lWRk4QB7pUujZ1CftxCYWz/lJx9nuJpdCOgP624tcHymErNlD+vGLwMTNslcXGYkAJH6xvGyxBJ+Obc8vRVnZbRM26BfH34TcPK1ueRxHSrDUbzMIIUsgcoZAxBuim8uDPp+K7bGqiygzSs2vQfr9U5Jhe9/F8sPdtNctfJZEfgmthNTeVFjyNsGIfIt754uGSfACqM7wDLh6fbKx7M+FHlNyOdvYCrbKUOAYXmTikYIpVDvlaaeMO+N+uW8Rhvm1j+JU7CVwhMavLySaPVc6Dt5OxiMMmxw9mVrjW9bBPjS5AkrS5MOA13T5wapoLzH6+gE92U4HzA6ilMcwRaQPSFnK2JU7tzyt2Wy1PH4MjHowXI2WyICG1x510dD3tX1P/1px8ro="
|
2019-06-25 04:23:28 +02:00
|
|
|
file: 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-29 06:16:57 +02:00
|
|
|
|
|
|
|
- <<: *build
|
|
|
|
name: "Mac"
|
|
|
|
os: osx
|
2018-12-08 20:38:35 +01:00
|
|
|
osx_image: xcode8.3
|
2019-06-24 18:35:37 +02:00
|
|
|
language: shell
|
2018-07-29 06:16:57 +02:00
|
|
|
env: OS=mac
|
2018-12-04 10:34:57 +01:00
|
|
|
before_install:
|
2019-10-26 21:02:43 +02:00
|
|
|
- brew uninstall mercurial
|
2019-01-11 00:44:42 +01:00
|
|
|
- brew upgrade python || true
|
2019-06-24 18:35:37 +02:00
|
|
|
- pip3 install --user --upgrade pip virtualenv
|
2019-10-18 07:21:27 +02:00
|
|
|
- /Users/travis/Library/Python/3.7/bin/virtualenv --clear $HOME/venv
|
2019-06-24 18:35:37 +02:00
|
|
|
- source $HOME/venv/bin/activate
|
2019-06-25 05:03:39 +02:00
|
|
|
before_cache:
|
|
|
|
- brew cleanup
|
2019-06-24 18:35:37 +02:00
|
|
|
|
|
|
|
- <<: *build
|
|
|
|
name: "Windows"
|
|
|
|
os: windows
|
|
|
|
language: shell
|
|
|
|
env:
|
|
|
|
- OS=windows
|
2019-07-09 23:54:38 +02:00
|
|
|
- PATH=/c/Python37:/c/Python37/Scripts:/C/Windows/System32/downlevel:$PATH
|
2019-06-24 18:35:37 +02:00
|
|
|
before_install:
|
2019-10-16 16:31:57 +02:00
|
|
|
- choco install python --version=3.7.4 --x86
|
2019-07-09 23:54:38 +02:00
|
|
|
- python -m pip install --upgrade pip
|
2019-06-24 18:35:37 +02:00
|
|
|
- pip install pywin32
|
|
|
|
script:
|
2019-11-21 20:16:10 +01:00
|
|
|
- pyinstaller --additional-hooks-dir=lbry/scripts/. --icon=lbry/icons/lbry256.ico -F -n lbrynet lbry/lbry/extras/cli.py
|
2019-06-24 18:35:37 +02:00
|
|
|
- cd dist
|
|
|
|
- 7z a -tzip lbrynet-windows.zip lbrynet.exe
|
2019-06-25 20:21:14 +02:00
|
|
|
- sha256sum -b lbrynet-windows.zip
|
|
|
|
- ./lbrynet.exe --version
|
2019-08-20 21:11:52 +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-11-21 20:16:10 +01:00
|
|
|
- travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -t lbry/wallet-server:latest-release -f docker/Dockerfile.wallet_server .
|
2019-06-21 01:49:09 +02:00
|
|
|
- docker push lbry/wallet-server:$TRAVIS_TAG
|
2019-11-13 18:08:04 +01:00
|
|
|
- docker push lbry/wallet-server:latest-release
|
2019-06-25 04:23:28 +02:00
|
|
|
|
2019-06-21 01:49:09 +02:00
|
|
|
- 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-11-21 20:16:10 +01:00
|
|
|
- travis_retry docker build -t lbry/wallet-server:master -f docker/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:
|
2019-06-25 04:23:28 +02:00
|
|
|
- $HOME/venv
|
2018-07-07 00:31:35 +02:00
|
|
|
- $HOME/.cache/pip
|
|
|
|
- $HOME/Library/Caches/pip
|
2019-06-25 05:03:39 +02:00
|
|
|
- $HOME/Library/Caches/Homebrew
|
2018-07-07 00:31:35 +02:00
|
|
|
- $TRAVIS_BUILD_DIR/.tox
|