Skip to content

Commit 54fc3fc

Browse files
committed
ci: add onekey device
1 parent c6889cf commit 54fc3fc

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ runs:
1717
apt-get update
1818
apt-get install -y libsdl2-image-2.0-0 libusb-1.0-0
1919
tar -xvf trezor-firmware.tar.gz
20-
20+
21+
- if: startsWith(inputs.device, 'onekey-')
22+
shell: bash
23+
run: |
24+
apt-get update
25+
apt-get install -y libsdl2-image-2.0-0 libusb-1.0-0
26+
tar -xvf onekey-firmware.tar.gz
27+
2128
- if: inputs.device == 'coldcard'
2229
shell: bash
2330
run: |

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
hwilib/devices/__init__.py
4545
hwilib/devices/keepkey.py
4646
hwilib/devices/ledger.py
47+
hwilib/devices/onekey.py
4748
hwilib/devices/trezor.py
4849
hwilib/errors.py
4950
hwilib/_script.py
@@ -153,7 +154,9 @@ jobs:
153154
- { name: 'jade', archive: 'jade', paths: 'test/work/jade/simulator' }
154155
- { name: 'ledger', archive: 'speculos', paths: 'test/work/speculos' }
155156
- { name: 'keepkey', archive: 'keepkey-firmware', paths: 'test/work/keepkey-firmware/bin' }
156-
157+
- { name: 'onekey-1', archive: 'onekey-firmware', paths: 'test/work/onekey-firmware' }
158+
- { name: 'onekey-t', archive: 'onekey-firmware', paths: 'test/work/onekey-firmware' }
159+
157160
steps:
158161
- uses: actions/checkout@v4
159162

@@ -218,6 +221,8 @@ jobs:
218221
- 'ledger'
219222
- 'ledger-legacy'
220223
- 'keepkey'
224+
- 'onekey-1'
225+
- 'onekey-t'
221226
script:
222227
- name: 'Wheel'
223228
install: 'pip install dist/*.whl'
@@ -286,10 +291,15 @@ jobs:
286291
- 'ledger'
287292
- 'ledger-legacy'
288293
- 'keepkey'
294+
- 'onekey-1'
295+
- 'onekey-t'
289296
interface: [ 'library', 'cli', 'stdin' ]
290297

291-
container: python:${{ matrix.python-version }}
292-
298+
container:
299+
image: python:${{ matrix.python-version }}
300+
volumes:
301+
- ${{ github.workspace }}:${{ github.workspace }}
302+
options: --workdir ${{ github.workspace }}
293303
steps:
294304
- uses: actions/checkout@v4
295305

0 commit comments

Comments
 (0)