Skip to content

Commit 3df080f

Browse files
committed
ledger: use NanoX
NanoS support has been dropped: LedgerHQ/app-bitcoin-new#262 NanoX also makes it possible to test MuSig2 in the future. Keep NanoS for legacy.
1 parent 1134776 commit 3df080f

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

.github/actions/install-sim/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ runs:
6666
- if: inputs.device == 'ledger'
6767
uses: actions/download-artifact@v4
6868
with:
69-
name: ledger_app
69+
name: ${{ inputs.device == 'ledger-legacy' && 'ledger_app_nano_s' || 'ledger_app_nano_x' }}
70+
7071

7172
- if: inputs.device == 'ledger'
7273
shell: bash

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ jobs:
232232
- uses: ./.github/actions/build-sim
233233

234234

235-
ledger-app-builder:
236-
name: Ledger App builder
235+
ledger-s-app-builder:
236+
name: Ledger Nano S Bitcoin App builder
237237
runs-on: ubuntu-latest
238238
container: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
239239
steps:
@@ -244,7 +244,23 @@ jobs:
244244
245245
- uses: actions/upload-artifact@v4
246246
with:
247-
name: ledger_app
247+
name: ledger_app_nano_s
248+
path: app-bitcoin-new/bin/app.elf
249+
250+
251+
ledger-x-app-builder:
252+
name: Ledger Nano X Bitcoin App builder
253+
runs-on: ubuntu-latest
254+
container: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
255+
steps:
256+
- run: |
257+
git clone https://github.com/LedgerHQ/app-bitcoin-new.git
258+
cd app-bitcoin-new
259+
make DEBUG=1 BOLOS_SDK=$NANOX_SDK
260+
261+
- uses: actions/upload-artifact@v4
262+
with:
263+
name: ledger_app_nano_x
248264
path: app-bitcoin-new/bin/app.elf
249265

250266
bitcoind-builder:
@@ -451,7 +467,7 @@ jobs:
451467
test-ledger:
452468
name: Python ${{ matrix.python-version }} ${{ matrix.device }} ${{ matrix.interface }}
453469
runs-on: ubuntu-latest
454-
needs: [ sim-builder-ledger, ledger-app-builder, bitcoind-builder ]
470+
needs: [ sim-builder-ledger, ledger-s-app-builder, ledger-x-app-builder, bitcoind-builder ]
455471
timeout-minutes: 45
456472

457473
strategy:

test/data/speculos-automation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": 1,
33
"rules": [
44
{
5-
"regexp": "^(Address|Review|Amount|Fee|Confirm|The derivation|Derivation path|Reject if you're|The change path|Change path|external inputs|Register wallet|Policy map|Key|Path|Public key|Spend from|Wallet name|Wallet policy).*",
5+
"regexp": "^(Address|Review|Amount|Fee|Confirm|The derivation|Derivation path|Reject if you're|The change path|Change path|external inputs|Register wallet|Register account|Policy map|Key|Path|Public key|Spend from|Account name|Wallet name|Wallet policy|Descriptor template).*",
66
"actions": [
77
[ "button", 2, true ],
88
[ "button", 2, false ]

test/test_ledger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def start(self):
5252
super().start()
5353
automation_path = os.path.abspath("data/speculos-automation.json")
5454
app_path = "./apps/nanos#btc#2.0#ce796c1b.elf" if self.legacy else "./apps/btc-test.elf"
55-
os.environ["SPECULOS_APPNAME"] = "Bitcoin Test:1.6.0" if self.legacy else "Bitcoin Test:2.1.0"
55+
os.environ["SPECULOS_APPNAME"] = "Bitcoin Test:1.6.0" if self.legacy else "Bitcoin Test:2.4.1"
5656

5757
self.emulator_stderr = open('ledger-emulator.stderr', 'a')
5858
# Start the emulator
@@ -70,7 +70,7 @@ def start(self):
7070
'seproxyhal:DEBUG',
7171
'--api-port',
7272
'0',
73-
'--model', 'nanos',
73+
'--model', 'nanos' if self.legacy else 'nanox',
7474
app_path
7575
],
7676
cwd=os.path.dirname(self.emulator_path),

0 commit comments

Comments
 (0)