forked from bitcoin-core/HWI
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from qtumproject/cf/merge-upstream-2.3.1
merge upstream 2.3.1
- Loading branch information
Showing
255 changed files
with
20,218 additions
and
6,910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
|
||
env: | ||
EMAIL: [email protected] | ||
|
||
python_version_matrix_template: &PYTHON_VERSION_MATRIX_TEMPLATE | ||
- container: | ||
dockerfile: ci/py37.Dockerfile | ||
env: | ||
PYTHON: 3.7 | ||
- container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
PYTHON: 3.8 | ||
- container: | ||
dockerfile: ci/py39.Dockerfile | ||
env: | ||
PYTHON: 3.9 | ||
- container: | ||
dockerfile: ci/py310.Dockerfile | ||
env: | ||
PYTHON: 3.10 | ||
- container: | ||
dockerfile: ci/py311.Dockerfile | ||
env: | ||
PYTHON: 3.11 | ||
|
||
device_matrix_template: &DEVICE_MATRIX_TEMPLATE | ||
- env: | ||
DEVICE: --trezor-1 | ||
|
@@ -54,8 +73,37 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE | |
- tar -xvf "mcu.tar.gz" | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz" | ||
- tar -xvf "bitcoin.tar.gz" | ||
- env: | ||
DEVICE: --jade | ||
depends_on: | ||
- Jade Sim Builder | ||
- dist_builder | ||
- bitcoind_builder | ||
fetch_sim_script: | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Jade Sim Builder/sim/jade.tar.gz" | ||
- tar -xvf "jade.tar.gz" | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz" | ||
- tar -xvf "bitcoin.tar.gz" | ||
- env: | ||
DEVICE: --ledger | ||
depends_on: | ||
- Ledger Sim Builder | ||
- Ledger App Builder | ||
- dist_builder | ||
- bitcoind_builder | ||
fetch_sim_script: | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger Sim Builder/sim/speculos.tar.gz" | ||
- tar -xvf "speculos.tar.gz" | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz" | ||
- tar -xvf "bitcoin.tar.gz" | ||
fetch_ledger_app_script: | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger App Builder/built_ledger_app/app-bitcoin-new/bin/app.elf" | ||
- mv app.elf test/work/speculos/apps/btc-test.elf | ||
sim_install_script: | ||
- poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract | ||
- pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract | ||
- env: | ||
DEVICE: --ledger-legacy | ||
depends_on: | ||
- Ledger Sim Builder | ||
- dist_builder | ||
|
@@ -66,8 +114,8 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE | |
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz" | ||
- tar -xvf "bitcoin.tar.gz" | ||
sim_install_script: | ||
- poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests | ||
- pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests | ||
- poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract | ||
- pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract | ||
- env: | ||
DEVICE: --keepkey | ||
depends_on: | ||
|
@@ -80,12 +128,11 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE | |
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz" | ||
- tar -xvf "bitcoin.tar.gz" | ||
|
||
lint_task: | ||
test_script: | ||
- flake8 | ||
|
||
task: | ||
container: | ||
image: python:latest | ||
install_script: | ||
- pip install poetry | ||
- poetry install | ||
matrix: | ||
- name: Type Check | ||
|
@@ -102,6 +149,7 @@ task: | |
hwilib/devices/bitbox02.py | ||
hwilib/devices/coldcard.py | ||
hwilib/devices/digitalbitbox.py | ||
hwilib/devices/jade.py | ||
hwilib/devices/__init__.py | ||
hwilib/devices/keepkey.py | ||
hwilib/devices/ledger.py | ||
|
@@ -116,15 +164,19 @@ task: | |
hwilib/udevinstaller.py | ||
- name: Non-Device Tests | ||
test_script: cd test; poetry run ./run_tests.py; cd .. | ||
- name: lint | ||
test_script: poetry run flake8 | ||
|
||
wine_builder_task: | ||
container: | ||
dockerfile: contrib/build.Dockerfile | ||
dockerfile: contrib/build-wine.Dockerfile | ||
build_script: | ||
- contrib/build_wine.sh | ||
- find dist -type f -exec sha256sum {} \; | ||
|
||
bitcoind_builder_task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
bitcoind_cache: | ||
folder: test/work/bitcoin | ||
ccache_cache: | ||
|
@@ -138,6 +190,8 @@ bitcoind_builder_task: | |
path: "bitcoin.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --trezor-1 | ||
name: Trezor 1 Sim Builder | ||
|
@@ -150,6 +204,8 @@ task: | |
path: "trezor-firmware.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --trezor-t | ||
name: Trezor T Sim Builder | ||
|
@@ -162,6 +218,8 @@ task: | |
path: "trezor-firmware.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --coldcard | ||
name: Coldcard Sim Builder | ||
|
@@ -174,6 +232,8 @@ task: | |
path: "coldcard-mpy.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --bitbox01 | ||
name: Bitbox01 Sim Builder | ||
|
@@ -186,6 +246,22 @@ task: | |
path: "mcu.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --jade | ||
name: Jade Sim Builder | ||
sim_work_cache: | ||
folder: test/work/jade | ||
build_script: | ||
- cd test; ./setup_environment.sh $DEVICE; cd .. | ||
- tar -czf jade.tar.gz test/work/jade/simulator | ||
sim_artifacts: | ||
path: "jade.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --ledger | ||
name: Ledger Sim Builder | ||
|
@@ -198,6 +274,8 @@ task: | |
path: "speculos.tar.gz" | ||
|
||
task: | ||
container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
DEVICE: --keepkey | ||
name: Keepkey Sim Builder | ||
|
@@ -220,20 +298,33 @@ dist_builder_task: | |
built_dist_artifacts: | ||
path: "dist/*" | ||
|
||
ledger_app_builder_task: | ||
name: Ledger App Builder | ||
container: | ||
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest | ||
build_script: | ||
- git clone https://github.com/LedgerHQ/app-bitcoin-new.git | ||
- cd app-bitcoin-new | ||
- make DEBUG=1 | ||
built_ledger_app_artifacts: | ||
path: app-bitcoin-new/bin/app.elf | ||
|
||
task: | ||
matrix: | ||
<< : *PYTHON_VERSION_MATRIX_TEMPLATE | ||
matrix: | ||
<< : *DEVICE_MATRIX_TEMPLATE | ||
fetch_dist_script: | ||
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/dist_builder/built_dist.zip" | ||
- unzip built_dist.zip | ||
matrix: | ||
- name: $DEVICE Wheel | ||
- name: Python $PYTHON $DEVICE Wheel | ||
install_script: pip install dist/*.whl | ||
test_script: cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd .. | ||
- name: $DEVICE Sdist | ||
install_script: pip install $(find dist -name "*.tar.gz" -a -not -name "*amd64*") | ||
- name: Python $PYTHON $DEVICE Sdist | ||
install_script: pip install $(find dist -name "*.tar.gz" -a -not -name "*linux*") | ||
test_script: cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd .. | ||
- name: $DEVICE Bindist | ||
- name: Python $PYTHON $DEVICE Bindist | ||
install_script: poetry install | ||
untar_bindist_script: cd dist; tar -xvf hwi*linux*.tar.gz; cd .. | ||
test_script: cd test; poetry run ./run_tests.py $DEVICE --interface=bindist --device-only; cd .. | ||
|
@@ -242,26 +333,8 @@ task: | |
|
||
task: | ||
matrix: | ||
- container: | ||
dockerfile: ci/cirrus.Dockerfile | ||
env: | ||
PYTHON: 3.6 | ||
- container: | ||
dockerfile: ci/py37.Dockerfile | ||
env: | ||
PYTHON: 3.7 | ||
- container: | ||
dockerfile: ci/py38.Dockerfile | ||
env: | ||
PYTHON: 3.8 | ||
- container: | ||
dockerfile: ci/py39.Dockerfile | ||
env: | ||
PYTHON: 3.9 | ||
- container: | ||
dockerfile: ci/py310.Dockerfile | ||
env: | ||
PYTHON: 3.10 | ||
<< : *PYTHON_VERSION_MATRIX_TEMPLATE | ||
install_script: poetry install | ||
matrix: | ||
<< : *DEVICE_MATRIX_TEMPLATE | ||
matrix: | ||
|
@@ -272,7 +345,6 @@ task: | |
- env: | ||
INTERFACE: stdin | ||
name: Python $PYTHON $DEVICE $INTERFACE | ||
install_script: poetry install | ||
test_script: cd test; poetry run ./run_tests.py $DEVICE --interface=$INTERFACE --device-only; cd .. | ||
on_failure: | ||
failed_script: tail -v -n +1 test/*.std* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
exclude = *.pyc,__pycache__,hwilib/devices/btchip/,hwilib/devices/ckcc/,hwilib/devices/trezorlib/,test/work/,hwilib/ui | ||
exclude = *.pyc,__pycache__,hwilib/devices/ledger_bitcoin/,hwilib/devices/btchip,hwilib/devices/ckcc/,hwilib/devices/jadepy/,hwilib/devices/trezorlib/,test/work/,hwilib/ui,hwilib/devices/bitbox02_lib | ||
ignore = E261,E302,E305,E501,E722,W5 | ||
per-file-ignores = setup.py:E122 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.6.12 | ||
3.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.