HWI/.travis.yml
2019-04-21 18:18:50 -04:00

83 lines
3.0 KiB
YAML

language: python
os: linux
dist: xenial
python:
- '3.6.8'
cache:
pip: true
ccache: true
directories:
- test/work
addons:
apt:
sources:
- sourceline: 'ppa:bitcoin/bitcoin'
packages:
- libdb4.8-dev
- libdb4.8++-dev
- build-essential
- curl
- git
- libsdl2-dev
- libsdl2-image-dev
- gcc-arm-none-eabi
- libnewlib-arm-none-eabi
- libudev-dev
- libtool
- autotools-dev
- automake
- pkg-config
- bsdmainutils
- libssl-dev
- libevent-dev
- libboost-system-dev
- libboost-filesystem-dev
- libboost-chrono-dev
- libboost-test-dev
- libboost-thread-dev
- libusb-1.0-0-dev
- protobuf-compiler
- cython3
- ccache
install:
- pip install pipenv pysdl2 python-bitcoinrpc protobuf poetry
# From trezor-mcu to get the correct protobuf version
- curl -LO "https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip"
- unzip "protoc-3.4.0-linux-x86_64.zip" -d protoc
- export PATH="$(pwd)/protoc/bin:$PATH"
# Build emulators/simulators and bitcoind
- cd test; ./setup_environment.sh; cd ..
- pip uninstall -y trezor # Hack to get rid of master branch version of trezor that is installed for trezor-mcu build
- poetry install
jobs:
include:
- name: With process_commands interface
script: cd test; poetry run ./run_tests.py --interface=library
- name: With command line interface
script: cd test; poetry run ./run_tests.py --interface=cli
- name: With stdin interface
script: cd test; ./run_tests.py --interface=stdin
- name: With linux binary distribution command line interface
services: docker
before_script:
- docker build -t hwi-builder -f contrib/build.Dockerfile .
script:
- docker run -it --name hwi-builder -v $PWD:/opt/hwi --rm --workdir /opt/hwi hwi-builder /bin/bash -c "contrib/build_bin.sh && contrib/build_wine.sh && contrib/build_dist.sh"
- sudo chown -R `whoami`:`whoami` dist/
- cd test; poetry run ./run_tests.py --interface=bindist
- cd ..; sha256sum dist/*
- name: macOS binary distribution (no tests)
os: osx
osx_image: xcode7.3
language: generic
addons:
artifacts:
working_dir: dist
install:
- brew update && brew upgrade pyenv
- brew install libusb
- cat contrib/reproducible-python.diff | PYTHON_CONFIGURE_OPTS="--enable-framework" BUILD_DATE="Jan 1 2019" BUILD_TIME="00:00:00" pyenv install -kp 3.6.8
script:
- contrib/build_bin.sh
- shasum -a 256 dist/*