updating scripts after moving lbry up one level

This commit is contained in:
Lex Berezhny 2019-12-31 18:57:48 -05:00
parent 2968f74c6c
commit 727815d6dd
3 changed files with 15 additions and 86 deletions

View file

@ -35,19 +35,19 @@ test:unit:
stage: test
script:
- make install tools
- cd lbry && HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
- HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
test:integration:
stage: test
script:
- pip install coverage tox-travis
- cd lbry && tox
- tox
test:json-api:
stage: test
script:
- make install tools
- cd lbry && HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
- HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
@ -60,8 +60,8 @@ test:json-api:
script:
- pip install pyinstaller
- python3.7 docker/set_build.py
- pip install -e lbry/.
- pyinstaller --onefile --name lbrynet lbry/lbry/extras/cli.py
- pip install -e .
- pyinstaller --onefile --name lbrynet lbry/extras/cli.py
- chmod +x dist/lbrynet
- zip --junk-paths ${CI_PROJECT_DIR}/lbrynet-${OS}.zip dist/lbrynet # gitlab expects artifacts to be in $CI_PROJECT_DIR
- openssl dgst -sha256 ${CI_PROJECT_DIR}/lbrynet-${OS}.zip | egrep -o [0-9a-f]+$ # get sha256 of asset. works on mac and ubuntu
@ -115,8 +115,8 @@ build:windows:
script:
- pip install pyinstaller
- python docker/set_build.py
- pip install -e lbry/.
- pyinstaller --additional-hooks-dir=lbry/scripts/. --icon=lbry/icons/lbry256.ico -F -n lbrynet lbry/lbry/extras/cli.py
- pip install -e .
- pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico -F -n lbrynet lbry/extras/cli.py
- 7z a -tzip $env:CI_PROJECT_DIR/lbrynet-${OS}.zip ./dist/lbrynet.exe
- checksum --type=sha256 --file=$env:CI_PROJECT_DIR/lbrynet-${OS}.zip
- dist/lbrynet.exe --version

View file

@ -16,90 +16,19 @@ jobs:
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/
- HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
- 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
script: tox
- 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
- HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
cache:
directories:

View file

@ -5,19 +5,19 @@ install:
--global-option=fetch \
--global-option=--version --global-option=3.30.1 --global-option=--all \
--global-option=build --global-option=--enable --global-option=fts5
cd lbry && pip install -e .
pip install -e .
tools:
pip install mypy==0.701
pip install coverage astroid pylint
lint:
cd lbry && pylint --rcfile=setup.cfg lbry
#cd lbry && mypy --ignore-missing-imports lbry
pylint --rcfile=setup.cfg lbry
#mypy --ignore-missing-imports lbry
test:
cd lbry && tox
tox
idea:
mkdir -p .idea
cp -r lbry/scripts/idea/* .idea
cp -r scripts/idea/* .idea