Skip to content

Commit

Permalink
feat(chore): add gha
Browse files Browse the repository at this point in the history
  • Loading branch information
somebodyLi committed Sep 17, 2023
1 parent 125ad6e commit cdf99d9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .github/actions/install-sim/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
context: .
file: contrib/build-wine.Dockerfile
Expand All @@ -115,7 +116,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
context: .
file: contrib/build.Dockerfile
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -218,6 +221,8 @@ jobs:
- 'ledger'
- 'ledger-legacy'
- 'keepkey'
- 'onekey-1'
- 'onekey-t'
script:
- name: 'Wheel'
install: 'pip install dist/*.whl'
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions test/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ if [[ -n ${build_onekey_1} || -n ${build_onekey_t} ]]; then
fi

if [[ -n ${build_onekey_t} ]]; then
rustup update
rustup toolchain uninstall nightly
rustup toolchain install nightly
rustup default nightly
Expand Down

0 comments on commit cdf99d9

Please sign in to comment.