Skip to content

Commit cfaf26c

Browse files
committed
Merge #724: Fix builds, update build containers, update dependencies, and fix ci.
ed0b4e0 test, ledger: Update automation for new message display (Ava Chow) 4eca419 ci: Set test timeout of 45 minutes (Ava Chow) e4f51bc test, trezor: Install rustfmt component (Ava Chow) 4e4a4e7 ci: Bump action versions to avoid deprecation warnings (Ava Chow) 21f7e11 ci: Ignore flake8 E231 (Ava Chow) cb570be trezor: Fix lint error (Ava Chow) 2d64407 ledger: Add missing type annotation (Ava Chow) c2366db scripted-diff: Use assertEqual instead of assertEquals (Ava Chow) 9a38436 keepky: Update TrezorModel to include internal_name (Ava Chow) 0b50184 deps: Update dependencies (Ava Chow) 9d43b37 build: Update build containers to debian bookworm (Ava Chow) a71a820 build: Fix arch check for hwi-qt moving (Ava Chow) Pull request description: Couple of minor things that weren't fully working while doing the 2.4.0 build. Also periodic update to dependencies. Top commit has no ACKs. Tree-SHA512: 397f7d2284a1f4cbb45f6fff3008161a1f5a5e1fd10c0572c02e4811a42dc1a9f6acbd55259ca9b8f0672da1e21cb9f8f0fc3187b093d50f0e6cc8611a54ff06
2 parents 8d4fa19 + ed0b4e0 commit cfaf26c

File tree

17 files changed

+519
-502
lines changed

17 files changed

+519
-502
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
22
exclude = *.pyc,__pycache__,hwilib/devices/ledger_bitcoin/,hwilib/devices/btchip,hwilib/devices/ckcc/,hwilib/devices/jadepy/,hwilib/devices/trezorlib/,test/work/,hwilib/ui,hwilib/devices/bitbox02_lib
3-
ignore = E261,E302,E305,E501,E722,W5
3+
ignore = E261,E302,E305,E501,E722,W5,E231
44
per-file-ignores = setup.py:E122

.github/actions/build-bitcoind/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
sudo apt-get install -y ccache
1010
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
1111
12-
- uses: actions/cache/restore@v3
12+
- uses: actions/cache/restore@v4
1313
id: ccache-cache
1414
with:
1515
path: ${{ env.CCACHE_DIR }}
@@ -25,13 +25,13 @@ runs:
2525
ccache --show-stats --verbose
2626
tar -czf bitcoind.tar.gz test/work/bitcoin/src/bitcoind
2727
28-
- uses: actions/cache/save@v3
28+
- uses: actions/cache/save@v4
2929
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
3030
with:
3131
path: ${{ env.CCACHE_DIR }}
3232
key: ${{ github.job }}-ccache-${{ github.run_id }}
3333

34-
- uses: actions/upload-artifact@v3
34+
- uses: actions/upload-artifact@v4
3535
with:
3636
name: bitcoind
3737
path: bitcoind.tar.gz

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
runs:
88
using: composite
99
steps:
10-
- uses: actions/download-artifact@v3
10+
- uses: actions/download-artifact@v4
1111
with:
1212
name: ${{ inputs.device == 'ledger-legacy' && 'ledger' || inputs.device }}-sim
1313

@@ -55,7 +55,7 @@ runs:
5555
pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
5656
5757
- if: inputs.device == 'ledger'
58-
uses: actions/download-artifact@v3
58+
uses: actions/download-artifact@v4
5959
with:
6060
name: ledger_app
6161

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
find dist -type f -exec sha256sum {} \;
134134
"
135135
136-
- uses: actions/upload-artifact@v3
136+
- uses: actions/upload-artifact@v4
137137
with:
138138
name: dist
139139
path: dist/
@@ -173,7 +173,7 @@ jobs:
173173
cd test; ./setup_environment.sh --${{ matrix.device.name }}; cd ..
174174
tar -czf ${{ matrix.device.archive }}.tar.gz ${{ matrix.device.paths }}
175175
176-
- uses: actions/upload-artifact@v3
176+
- uses: actions/upload-artifact@v4
177177
with:
178178
name: ${{ matrix.device.name }}-sim
179179
path: ${{ matrix.device.archive }}.tar.gz
@@ -188,7 +188,7 @@ jobs:
188188
cd app-bitcoin-new
189189
make DEBUG=1
190190
191-
- uses: actions/upload-artifact@v3
191+
- uses: actions/upload-artifact@v4
192192
with:
193193
name: ledger_app
194194
path: app-bitcoin-new/bin/app.elf
@@ -240,15 +240,15 @@ jobs:
240240
- run: |
241241
pip install poetry
242242
243-
- uses: actions/download-artifact@v3
243+
- uses: actions/download-artifact@v4
244244
with:
245245
name: dist
246246
path: dist/
247247

248248
- run: |
249249
${{ matrix.script.install }}
250250
251-
- uses: actions/download-artifact@v3
251+
- uses: actions/download-artifact@v4
252252
with:
253253
name: bitcoind
254254

@@ -272,6 +272,7 @@ jobs:
272272
name: Python ${{ matrix.python-version }} ${{ matrix.device }} ${{ matrix.interface }}
273273
runs-on: ubuntu-latest
274274
needs: [ sim-builder, ledger-app-builder, bitcoind-builder ]
275+
timeout-minutes: 45
275276

276277
strategy:
277278
fail-fast: false
@@ -297,7 +298,7 @@ jobs:
297298
pip install poetry
298299
poetry install
299300
300-
- uses: actions/download-artifact@v3
301+
- uses: actions/download-artifact@v4
301302
with:
302303
name: bitcoind
303304

contrib/build-wine.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:oldoldstable-slim
1+
FROM debian:bookworm-slim
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -15,7 +15,7 @@ RUN apt-get install -y \
1515
RUN dpkg --add-architecture i386
1616
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
1717
RUN apt-key add winehq.key
18-
RUN echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list
18+
RUN echo "deb https://dl.winehq.org/wine-builds/debian/ bookworm main" >> /etc/apt/sources.list
1919
RUN apt-get update
2020
RUN apt-get install --install-recommends -y \
2121
wine-stable-amd64 \

contrib/build.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:oldoldstable-slim
1+
FROM debian:bookworm-slim
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -27,7 +27,8 @@ RUN apt-get install -y \
2727
libudev-dev \
2828
faketime \
2929
zip \
30-
qt5-default
30+
pyqt5-dev \
31+
libglib2.0-0
3132

3233
RUN curl https://pyenv.run | bash
3334
ENV PYENV_ROOT="/root/.pyenv"

contrib/build_bin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ target_dir="$target_tarfile.dir"
5656
mkdir $target_dir
5757
mv hwi $target_dir
5858

59-
if [[ $gui_support == "--with-gui" && $arch == "x86_64" ]]; then
59+
if [[ $gui_support == "--with-gui" && $ARCH == "x86_64" ]]; then
6060
mv hwi-qt $target_dir
6161
fi
6262

hwilib/devices/keepkey.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def __init__(self, path: str, password: Optional[str] = None, expert: bool = Fal
149149
"""
150150
model = TrezorModel(
151151
name="K1-14M",
152+
internal_name="keepkey",
152153
minimum_version=(0, 0, 0),
153154
vendors=("keepkey.com"),
154155
usb_ids=(), # unused

hwilib/devices/ledger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def check_keypath(key_path: str) -> bool:
119119
AddressType.LEGACY: 3,
120120
}
121121

122-
def handle_chip_exception(e, func_name: str) -> bool:
122+
def handle_chip_exception(e: Union[BTChipException, ApduException], func_name: str) -> bool:
123123
if e.sw in bad_args:
124124
raise BadArgumentError('Bad argument')
125125
elif e.sw == 0x6F00: # BTCHIP_SW_TECHNICAL_PROBLEM

hwilib/devices/trezor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def ignore_input() -> None:
612612
script_pubkey=vout.scriptPubKey,
613613
)
614614
t.bin_outputs.append(o)
615-
assert(psbt_in.non_witness_utxo.hash is not None)
615+
assert psbt_in.non_witness_utxo.hash is not None
616616
logging.debug(psbt_in.non_witness_utxo.hash.hex())
617617
assert psbt_in.non_witness_utxo.sha256 is not None
618618
prevtxs[ser_uint256(psbt_in.non_witness_utxo.sha256)[::-1]] = t

0 commit comments

Comments
 (0)