110 lines
3.9 KiB
YAML
110 lines
3.9 KiB
YAML
dist: xenial
|
|
language: python
|
|
python: "3.7"
|
|
|
|
jobs:
|
|
include:
|
|
|
|
# - stage: code quality
|
|
# name: "pylint & mypy"
|
|
# install:
|
|
# - make install tools
|
|
# script: make lint
|
|
|
|
- stage: test
|
|
name: "Unit Tests"
|
|
install:
|
|
- make install tools
|
|
script:
|
|
- cd lbry && HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
|
|
after_success:
|
|
- coverage combine lbry/
|
|
|
|
- name: "Integration Tests"
|
|
install:
|
|
- pip install coverage tox-travis
|
|
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
|
|
script: cd lbry && tox
|
|
after_success:
|
|
- coverage combine lbry
|
|
|
|
- name: "Run Examples"
|
|
install:
|
|
- make install tools
|
|
script:
|
|
- cd lbry && HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
|
|
after_success:
|
|
- coverage combine lbry
|
|
|
|
- &build
|
|
stage: build
|
|
name: "Linux"
|
|
env: OS=linux
|
|
install:
|
|
- pip install pyinstaller awscli
|
|
- python docker/set_build.py
|
|
- pip install -e torba/.
|
|
- pip install -e lbry/.
|
|
script:
|
|
- pyinstaller -F -n lbrynet lbry/lbry/extras/cli.py
|
|
- chmod +x dist/lbrynet
|
|
- zip --junk-paths lbrynet-${OS}.zip dist/lbrynet
|
|
- shasum -a 256 -b lbrynet-${OS}.zip
|
|
- dist/lbrynet --version
|
|
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
|
|
- 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
|
|
# deploy:
|
|
# provider: releases
|
|
# api_key:
|
|
# secure: "unnR+aSJ1937Cl1PyBBZzGuZvV5W5TGcXELhXTgyOeeI6FgO/j80qmbNxJDA7qdFH/hvVicQFWoflhZu2dxN5rYP5BQJW3q3XoOLY3XAc1s1vicFkwqn3TIfdFiJTz+/D9eBUBBhHKeYFxm3M+thvklTLgjKl6fflh14NfGuNTevK9yQke8wewW3f9UmFTo1qNOPF1OsTZRbwua6oQYa59P+KukoPt4Dsu1VtILtTkj7hfEsUL79cjotwO3gkhYftxbl/xeDSZWOt+9Nhb8ZKmQG/uDx4JiTMm5lWRk4QB7pUujZ1CftxCYWz/lJx9nuJpdCOgP624tcHymErNlD+vGLwMTNslcXGYkAJH6xvGyxBJ+Obc8vRVnZbRM26BfH34TcPK1ueRxHSrDUbzMIIUsgcoZAxBuim8uDPp+K7bGqiygzSs2vQfr9U5Jhe9/F8sPdtNctfJZEfgmthNTeVFjyNsGIfIt754uGSfACqM7wDLh6fbKx7M+FHlNyOdvYCrbKUOAYXmTikYIpVDvlaaeMO+N+uW8Rhvm1j+JU7CVwhMavLySaPVc6Dt5OxiMMmxw9mVrjW9bBPjS5AkrS5MOA13T5wapoLzH6+gE92U4HzA6ilMcwRaQPSFnK2JU7tzyt2Wy1PH4MjHowXI2WyICG1x510dD3tX1P/1px8ro="
|
|
# file: lbrynet-${OS}.zip
|
|
# skip_cleanup: true
|
|
# overwrite: true
|
|
# draft: true
|
|
# on:
|
|
# tags: true
|
|
|
|
- <<: *build
|
|
name: "Mac"
|
|
os: osx
|
|
osx_image: xcode8.3
|
|
language: shell
|
|
env: OS=mac
|
|
before_install:
|
|
- brew uninstall mercurial
|
|
- brew upgrade python || true
|
|
- pip3 install --user --upgrade pip virtualenv
|
|
- /Users/travis/Library/Python/3.7/bin/virtualenv --clear $HOME/venv
|
|
- source $HOME/venv/bin/activate
|
|
before_cache:
|
|
- brew cleanup
|
|
|
|
- <<: *build
|
|
name: "Windows"
|
|
os: windows
|
|
language: shell
|
|
env:
|
|
- OS=windows
|
|
- PATH=/c/Python37:/c/Python37/Scripts:/C/Windows/System32/downlevel:$PATH
|
|
before_install:
|
|
- choco install python --version=3.7.4 --x86
|
|
- python -m pip install --upgrade pip
|
|
- pip install pywin32
|
|
script:
|
|
- pyinstaller --additional-hooks-dir=lbry/scripts/. --icon=lbry/icons/lbry256.ico -F -n lbrynet lbry/lbry/extras/cli.py
|
|
- cd dist
|
|
- 7z a -tzip lbrynet-windows.zip lbrynet.exe
|
|
- sha256sum -b lbrynet-windows.zip
|
|
- ./lbrynet.exe --version
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/venv
|
|
- $HOME/.cache/pip
|
|
- $HOME/Library/Caches/pip
|
|
- $HOME/Library/Caches/Homebrew
|
|
- $TRAVIS_BUILD_DIR/.tox
|