forked from bitcoin-core/HWI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
127 lines (127 loc) · 5.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
language: python
os: linux
dist: bionic
python:
- '3.6.8'
cache:
pip: true
ccache: true
directories:
- test/work
addons:
apt:
packages:
- libdb-dev
- libdb++-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
- qemu-user-static
- gcc-arm-linux-gnueabihf
- libc6-dev-armhf-cross
before_install:
- |
wget -qO- "https://github.com/crazy-max/travis-wait-enhanced/releases/download/v1.0.0/travis-wait-enhanced_1.0.0_linux_x86_64.tar.gz" | tar -zxvf - travis-wait-enhanced
mv travis-wait-enhanced /home/travis/bin/
travis-wait-enhanced --version
install:
- pip install pipenv pysdl2 protobuf poetry pyqt5 construct mnemonic pyelftools
# 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: lint
stage: lint
install:
- pip install flake8
script: flake8
- name: Type annotation checking
stage: lint
install:
- pip install mypy
script: mypy hwilib/base58.py
- name: Run non-device tests only
stage: test
script: cd test; poetry run ./run_tests.py
- name: With process_commands interface
stage: test
script: cd test; travis-wait-enhanced --timeout=40m -- poetry run ./run_tests.py --all --interface=library
- name: With command line interface
stage: test
script: cd test; travis-wait-enhanced --timeout=40m -- poetry run ./run_tests.py --all --interface=cli
- name: With stdin interface
stage: test
script: cd test; travis-wait-enhanced --timeout=40m -- poetry run ./run_tests.py --all --interface=stdin
- name: With wheel command line interface
stage: test
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_dist.sh"
- sudo chown -R `whoami`:`whoami` dist/
- pip install dist/*.whl
- cd test; travis-wait-enhanced --timeout=40m -- poetry run ./run_tests.py --all --interface=cli
- name: With sdist command line interface
stage: test
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_dist.sh"
- sudo chown -R `whoami`:`whoami` dist/
- pip install dist/*.tar.gz
- cd test; travis-wait-enhanced --timeout=40m -- poetry run ./run_tests.py --all --interface=cli
- name: With linux binary distribution command line interface
stage: test
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; travis-wait-enhanced --timeout=40m -- poetry run ./run_tests.py --all --interface=bindist
- cd ..; sha256sum dist/*
- name: macOS binary distribution (no tests)
stage: test
os: osx
osx_image: xcode7.3
language: generic
addons:
artifacts:
working_dir: dist
before_install:
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/*