Skip to content

Commit cdf99d9

Browse files
committed
feat(chore): add gha
1 parent 125ad6e commit cdf99d9

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
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: 15 additions & 5 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
@@ -91,7 +92,7 @@ jobs:
9192
steps:
9293
- uses: actions/checkout@v4
9394

94-
- uses: docker/build-push-action@v4
95+
- uses: docker/build-push-action@v5
9596
with:
9697
context: .
9798
file: contrib/build-wine.Dockerfile
@@ -115,7 +116,7 @@ jobs:
115116
steps:
116117
- uses: actions/checkout@v4
117118

118-
- uses: docker/build-push-action@v4
119+
- uses: docker/build-push-action@v5
119120
with:
120121
context: .
121122
file: contrib/build.Dockerfile
@@ -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

test/setup_environment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ if [[ -n ${build_onekey_1} || -n ${build_onekey_t} ]]; then
154154
fi
155155

156156
if [[ -n ${build_onekey_t} ]]; then
157+
rustup update
157158
rustup toolchain uninstall nightly
158159
rustup toolchain install nightly
159160
rustup default nightly

0 commit comments

Comments
 (0)