Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6149775
Adjust bitcoind location
Sjors Jul 22, 2025
07b3ae7
ci: bump docker/build-push-action to v6
Sjors Jul 22, 2025
b8d7147
Drop Python 3.8
Sjors Jul 22, 2025
8215159
build: bump debian to bookworm
Sjors Jul 22, 2025
72bbef2
ci: .github match 'on' from Bitcoin Core
Sjors Jul 22, 2025
c5f62a0
ci: fix rust emulator build failure
Sjors Jul 22, 2025
9c83f52
jade setup_environment: update qemu installation
Mar 21, 2025
784342f
ci: abort if bitcoind fails to start
Sjors Jul 22, 2025
48d965d
ci: abort if simulator fails to start
Sjors Jul 23, 2025
4457bac
Set 60 second timeout on proc.communicate
Sjors Jul 23, 2025
514fe63
ci: build bitcoind with Ubuntu 22.04
Sjors Jul 22, 2025
a539f1b
coldcard: drop address patch
Sjors Jul 23, 2025
ba3c050
coldcard: update multisig patch
Sjors Jul 23, 2025
451efa6
coldcard: install pysdl2-dll
Sjors Jul 23, 2025
7dc2579
coldcard: use --headless
Sjors Jul 23, 2025
598aad2
coldcard: disable test_signtx
Sjors Jul 24, 2025
103d70d
ledger: add missing flask-cors
Sjors Jul 23, 2025
79bc788
ledger: add missing ledgerd
Sjors Jul 23, 2025
3d7c3c9
ledger: disable several tests for NanoX
Sjors Jul 24, 2025
4aa0b26
Revert "ci: Always run test"
Sjors Jul 22, 2025
536e9cb
ci: split device groups
Sjors Jul 22, 2025
260277f
ci: downgrade Keepkey sim builder to Ubuntu 22.04
Sjors Jul 23, 2025
0639d6d
ci: downgrade Coinkite sim builder and tests to Ubuntu 22.04
Sjors Jul 23, 2025
a482d15
ci: downgrade Trezor sim builder to Ubuntu 22.04
Sjors Jul 23, 2025
5f0edff
ledger: use NanoX
Sjors Jul 23, 2025
e771d31
ci: pin non-device jobs to Python 3.12
Sjors Aug 29, 2025
1c53f9a
support BitBox02 Nova by updating bitbox02 lib to v7.0.0
benma Jul 17, 2025
48e5b9a
bitbox02: fix path to simulator
benma Aug 29, 2025
6b923c8
ci: combine dist and test jobs
Sjors Aug 29, 2025
b2e1405
ci: use Device Test Template
Sjors Aug 29, 2025
70e14aa
ci: move type check and simbuilds to own file
Sjors Aug 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/build-bitcoind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
ccache --zero-stats
cd test; ./setup_environment.sh --bitcoind; cd ..
ccache --show-stats --verbose
tar -czf bitcoind.tar.gz test/work/bitcoin/build/src/bitcoind
tar -czf bitcoind.tar.gz test/work/bitcoin/build/bin/bitcoind

- uses: actions/cache/save@v4
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
Expand Down
42 changes: 42 additions & 0 deletions .github/actions/build-sim/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build sim
description: Build device simulator(s)
inputs:
name:
description: Device name from matrix (e.g. trezor-1, coldcard, jade)
required: true
archive:
description: Archive base name (e.g. trezor-firmware)
required: true
paths:
description: Space-separated paths to include in the archive
required: true
runs:
using: composite
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf libsdl2-image-dev libslirp-dev libpcsclite-dev ninja-build
pip install poetry
wget https://github.com/protocolbuffers/protobuf/releases/download/v22.0/protoc-22.0-linux-x86_64.zip
sudo unzip protoc-22.0-linux-x86_64.zip -d /usr/local
protoc --version

- name: Build simulator
shell: bash
run: |
set -euxo pipefail
git config --global user.email '[email protected]'
git config --global user.name 'ci'
git config --global --add safe.directory "$GITHUB_WORKSPACE"
cd test
./setup_environment.sh --"${{ inputs.name }}"
cd ..
tar -czf "${{ inputs.archive }}.tar.gz" ${{ inputs.paths }}

- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}-sim
path: ${{ inputs.archive }}.tar.gz

9 changes: 6 additions & 3 deletions .github/actions/install-sim/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ runs:
pushd test/work/firmware; git am ../../data/coldcard-multisig.patch; popd
poetry run pip install -r test/work/firmware/requirements.txt
pip install -r test/work/firmware/requirements.txt
poetry run pip install pysdl2-dll
pip install pysdl2-dll

- if: inputs.device == 'bitbox01'
shell: bash
Expand Down Expand Up @@ -58,13 +60,14 @@ runs:
apt-get update
apt-get install -y libusb-1.0-0 qemu-user-static
tar -xvf speculos.tar.gz
poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
poetry run pip install construct flask-cors flask-restful jsonschema ledgered mnemonic pyelftools pillow requests pytesseract
pip install construct flask-cors flask-restful jsonschema ledgered mnemonic pyelftools pillow requests pytesseract

- if: inputs.device == 'ledger'
uses: actions/download-artifact@v4
with:
name: ledger_app
name: ${{ inputs.device == 'ledger-legacy' && 'ledger_app_nano_s' || 'ledger_app_nano_x' }}


- if: inputs.device == 'ledger'
shell: bash
Expand Down
31 changes: 31 additions & 0 deletions .github/actions/test-device/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test device
description: Run tests for one device type.
runs:
using: composite
steps:
- shell: bash
run: |
pip install poetry
poetry install

- uses: actions/download-artifact@v4
with:
name: bitcoind

- shell: bash
run: |
tar -xvf bitcoind.tar.gz

- uses: ./.github/actions/install-sim
with:
device: ${{ matrix.device }}

- name: Run tests
shell: bash
run: |
cd test; poetry run ./run_tests.py --${{ matrix.device }} --interface=${{ matrix.test.interface }} --device-only; cd ..

- if: failure()
shell: bash
run: |
tail -v -n +1 test/*.std*
67 changes: 67 additions & 0 deletions .github/actions/test-dist/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test dist
description: Run dist tests for one device type.
runs:
using: composite
steps:
- shell: bash
run: |
pip install poetry

- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Install (Wheel)
if: matrix.test.script == 'Wheel'
shell: bash
run: |
pip install dist/*.whl

- name: Install (Sdist)
if: matrix.test.script == 'Sdist'
shell: bash
run: |
pip install $(find dist -name "*.tar.gz" -a -not -name "*linux*")

- name: Install (Bindist)
if: matrix.test.script == 'Bindist'
shell: bash
run: |
poetry install; cd dist; tar -xvf hwi*linux*.tar.gz; cd ..

- uses: actions/download-artifact@v4
with:
name: bitcoind

- shell: bash
run: |
tar -xvf bitcoind.tar.gz

- uses: ./.github/actions/install-sim
with:
device: ${{ matrix.device }}

- name: Run tests (Wheel)
if: matrix.test.script == 'Wheel'
shell: bash
run: |
cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd ..

- name: Run tests (Sdist)
if: matrix.test.script == 'Sdist'
shell: bash
run: |
cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd ..

- name: Run tests (Bindist)
if: matrix.test.script == 'Bindist'
shell: bash
run: |
cd test; poetry run ./run_tests.py $DEVICE --interface=bindist --device-only; cd ..

- if: failure()
shell: bash
run: |
tail -v -n +1 test/*.std*

22 changes: 22 additions & 0 deletions .github/sim-build-map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"trezor": [
{ "name": "trezor-1", "archive": "trezor-firmware", "paths": "test/work/trezor-firmware" },
{ "name": "trezor-t", "archive": "trezor-firmware", "paths": "test/work/trezor-firmware" }
],
"coldcard": [
{ "name": "coldcard", "archive": "coldcard-mpy", "paths": "test/work/firmware/external/micropython/ports/unix/coldcard-mpy test/work/firmware/unix/coldcard-mpy test/work/firmware/unix/l-mpy test/work/firmware/unix/l-port" }
],
"bitbox": [
{ "name": "bitbox01", "archive": "mcu", "paths": "test/work/mcu" },
{ "name": "bitbox02", "archive": "bitbox02", "paths": "test/work/bitbox02-firmware/build-build-noasan/bin/simulator" }
],
"jade": [
{ "name": "jade", "archive": "jade", "paths": "test/work/jade/simulator" }
],
"ledger": [
{ "name": "ledger", "archive": "speculos", "paths": "test/work/speculos" }
],
"keepkey": [
{ "name": "keepkey", "archive": "keepkey-firmware", "paths": "test/work/keepkey-firmware/bin" }
]
}
Loading