diff --git a/.github/actions/install-sim/action.yml b/.github/actions/install-sim/action.yml index 1a85e3590..4e381befa 100644 --- a/.github/actions/install-sim/action.yml +++ b/.github/actions/install-sim/action.yml @@ -17,7 +17,14 @@ runs: apt-get update apt-get install -y libsdl2-image-2.0-0 libusb-1.0-0 tar -xvf trezor-firmware.tar.gz - + + - if: startsWith(inputs.device, 'onekey-') + shell: bash + run: | + apt-get update + apt-get install -y libsdl2-image-2.0-0 libusb-1.0-0 + tar -xvf onekey-firmware.tar.gz + - if: inputs.device == 'coldcard' shell: bash run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 669dd0137..11964dcd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,7 @@ jobs: hwilib/devices/__init__.py hwilib/devices/keepkey.py hwilib/devices/ledger.py + hwilib/devices/onekey.py hwilib/devices/trezor.py hwilib/errors.py hwilib/_script.py @@ -153,7 +154,9 @@ jobs: - { name: 'jade', archive: 'jade', paths: 'test/work/jade/simulator' } - { name: 'ledger', archive: 'speculos', paths: 'test/work/speculos' } - { name: 'keepkey', archive: 'keepkey-firmware', paths: 'test/work/keepkey-firmware/bin' } - + - { name: 'onekey-1', archive: 'onekey-firmware', paths: 'test/work/onekey-firmware' } + - { name: 'onekey-t', archive: 'onekey-firmware', paths: 'test/work/onekey-firmware' } + steps: - uses: actions/checkout@v4 @@ -218,6 +221,8 @@ jobs: - 'ledger' - 'ledger-legacy' - 'keepkey' + - 'onekey-1' + - 'onekey-t' script: - name: 'Wheel' install: 'pip install dist/*.whl' @@ -286,10 +291,15 @@ jobs: - 'ledger' - 'ledger-legacy' - 'keepkey' + - 'onekey-1' + - 'onekey-t' interface: [ 'library', 'cli', 'stdin' ] - container: python:${{ matrix.python-version }} - + container: + image: python:${{ matrix.python-version }} + volumes: + - ${{ github.workspace }}:${{ github.workspace }} + options: --workdir ${{ github.workspace }} steps: - uses: actions/checkout@v4