forked from LBRYCommunity/lbry-sdk
d0b70ea6df
also disables travis asset uploading
142 lines
5.1 KiB
YAML
142 lines
5.1 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: "LBRY 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: "LBRY 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
|
|
|
|
- &torba-tests
|
|
name: "Torba Unit Tests"
|
|
env: TESTTYPE=unit
|
|
install:
|
|
- pip install coverage tox-travis
|
|
script: cd torba && tox
|
|
after_success:
|
|
- coverage combine torba/tests
|
|
|
|
- <<: *torba-tests
|
|
name: "Torba Integration Tests"
|
|
env: TESTTYPE=integration
|
|
|
|
- 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
|
|
|
|
- if: tag IS present
|
|
stage: build
|
|
name: "Wallet Server Docker Image - Tagged Release"
|
|
script:
|
|
- set -e
|
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
- travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -t lbry/wallet-server:latest-release -f docker/Dockerfile.wallet_server .
|
|
- docker push lbry/wallet-server:$TRAVIS_TAG
|
|
- docker push lbry/wallet-server:latest-release
|
|
|
|
- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
|
|
stage: build
|
|
name: "Wallet Server Docker Image - Master"
|
|
script:
|
|
- set -e
|
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
|
- travis_retry docker build -t lbry/wallet-server:master -f docker/Dockerfile.wallet_server .
|
|
- docker push lbry/wallet-server:master
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/venv
|
|
- $HOME/.cache/pip
|
|
- $HOME/Library/Caches/pip
|
|
- $HOME/Library/Caches/Homebrew
|
|
- $TRAVIS_BUILD_DIR/.tox
|