Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions .github/actions/install-sim/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ runs:
- if: startsWith(inputs.device, 'trezor-')
shell: bash
run: |
apt-get update
apt-get install -y libsdl2-image-2.0-0 libusb-1.0-0
sudo apt-get update
sudo apt-get install -y libsdl2-image-2.0-0 libusb-1.0-0
tar -xvf trezor-firmware.tar.gz

- if: inputs.device == 'coldcard'
shell: bash
run: |
apt-get update
apt-get install -y libpcsclite-dev libusb-1.0-0 swig
sudo apt-get update
sudo apt-get install -y libpcsclite-dev libusb-1.0-0 swig
git config --global user.email "[email protected]"
git config --global user.name "ci"
pushd test/work; git clone --recursive https://github.com/Coldcard/firmware.git; popd
Expand All @@ -36,29 +36,30 @@ runs:
- if: inputs.device == 'bitbox01'
shell: bash
run: |
apt-get update
apt-get install -y libusb-1.0-0
sudo apt-get update
sudo apt-get install -y libusb-1.0-0
tar -xvf mcu.tar.gz

- if: inputs.device == 'bitbox02'
shell: bash
run: |
apt-get update
apt-get install -y libusb-1.0-0 docker.io
sudo apt-get update
sudo apt-get install -y libusb-1.0-0
# removed: docker.io
tar -xvf bitbox02.tar.gz

- if: inputs.device == 'jade'
shell: bash
run: |
apt-get update
apt-get install -y libgcrypt20 libsdl2-dev libslirp0 libusb-1.0-0
sudo apt-get update
sudo apt-get install -y libgcrypt20 libsdl2-dev libslirp0 libusb-1.0-0
tar -xvf jade.tar.gz

- if: startsWith(inputs.device, 'ledger')
shell: bash
run: |
apt-get update
apt-get install -y libusb-1.0-0 qemu-user-static
sudo apt-get update
sudo apt-get install -y libusb-1.0-0 qemu-user-static
tar -xvf speculos.tar.gz
poetry run pip install construct flask-cors flask-restful jsonschema ledgered mnemonic pyelftools pillow requests pytesseract
pip install construct flask-cors flask-restful jsonschema ledgered mnemonic pyelftools pillow requests pytesseract
Expand All @@ -77,6 +78,6 @@ runs:
- if: inputs.device == 'keepkey'
shell: bash
run: |
apt-get update
apt-get install -y libusb-1.0-0
sudo apt-get update
sudo apt-get install -y libusb-1.0-0
tar -xvf keepkey-firmware.tar.gz
65 changes: 34 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: CI
on:
# See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request.
pull_request:
# See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push.
push:
branches:
- '**'
tags-ignore:
- '**'

on: pull_request

# on:
# # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request.
# pull_request:
# # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push.
# push:
# branches:
# - '**'
# tags-ignore:
# - '**'

concurrency:
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
Expand All @@ -21,7 +24,7 @@ env:
jobs:
non-device-tests:
name: Non-device tests
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale
container: python:3.12
steps:
- uses: actions/checkout@v4
Expand All @@ -36,7 +39,7 @@ jobs:

lint:
name: lint
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale
container: python:3.12
steps:
- uses: actions/checkout@v4
Expand All @@ -51,7 +54,7 @@ jobs:

wine-builder:
name: Wine builder
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

steps:
- uses: actions/checkout@v4
Expand All @@ -75,7 +78,7 @@ jobs:

dist-builder:
name: Dist builder
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -117,7 +120,7 @@ jobs:
# Ubuntu 22.04 ships with glibc 2.35, which is needed to keep Trezor 1
# binaries compatible with Debian Bookworm (glibc 2.36) Python containers.
# Trezor T binaries don't need this.
runs-on: ubuntu-22.04
runs-on: tenki-standard-autoscale

sim-builder-coldcard:
name: Coldcard sim builder
Expand All @@ -126,7 +129,7 @@ jobs:
with:
sim: coldcard
include: ${{ needs.prepare-sim-matrices.outputs.coldcard }}
runs-on: ubuntu-22.04
runs-on: tenki-standard-autoscale

sim-builder-bitbox:
name: Bitbox sim builder
Expand All @@ -135,7 +138,7 @@ jobs:
with:
sim: bitbox
include: ${{ needs.prepare-sim-matrices.outputs.bitbox }}
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

sim-builder-jade:
name: Jade sim builder
Expand All @@ -144,7 +147,7 @@ jobs:
with:
sim: jade
include: ${{ needs.prepare-sim-matrices.outputs.jade }}
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

sim-builder-ledger:
name: Ledger sim builder
Expand All @@ -153,7 +156,7 @@ jobs:
with:
sim: ledger
include: ${{ needs.prepare-sim-matrices.outputs.ledger }}
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

sim-builder-keepkey:
name: Keepkey sim builder
Expand All @@ -162,27 +165,27 @@ jobs:
with:
sim: keepkey
include: ${{ needs.prepare-sim-matrices.outputs.keepkey }}
runs-on: ubuntu-22.04
runs-on: tenki-standard-autoscale

ledger-s-app-builder:
name: Ledger Nano S Bitcoin App builder
uses: ./.github/workflows/ledger-app-builder.yml
with:
app: nano_s
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

ledger-x-app-builder:
name: Ledger Nano X Bitcoin App builder
uses: ./.github/workflows/ledger-app-builder.yml
with:
app: nano_x
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

bitcoind-builder:
name: bitcoind builder
# Ubuntu 22.04 ships with glibc 2.35, which is needed to keep binaries
# compatible with Debian Bookworm (glibc 2.36) Python containers.
runs-on: ubuntu-22.04
runs-on: tenki-standard-autoscale
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-bitcoind
Expand All @@ -192,61 +195,61 @@ jobs:
needs: [sim-builder-trezor, bitcoind-builder, dist-builder]
with:
device: trezor-1
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-trezor-t:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-trezor, bitcoind-builder, dist-builder]
with:
device: trezor-t
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-ledger-s:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-ledger, ledger-s-app-builder, bitcoind-builder, dist-builder]
with:
device: ledger-legacy
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-ledger-x:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-ledger, ledger-x-app-builder, bitcoind-builder, dist-builder]
with:
device: ledger
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-coldcard:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-coldcard, bitcoind-builder, dist-builder]
with:
device: coldcard
runs-on: ubuntu-22.04
runs-on: tenki-standard-autoscale

test-bitbox01:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-bitbox, bitcoind-builder, dist-builder]
with:
device: bitbox01
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-bitbox02:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-bitbox, bitcoind-builder, dist-builder]
with:
device: bitbox02
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-jade:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-jade, bitcoind-builder, dist-builder]
with:
device: jade
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

test-keepkey:
uses: ./.github/workflows/device-test.yml
needs: [sim-builder-keepkey, bitcoind-builder, dist-builder]
with:
device: keepkey
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

7 changes: 6 additions & 1 deletion .github/workflows/device-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ jobs:
- {script: 'Wheel'}
- {script: 'Sdist'}
- {script: 'Bindist'}
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: run test
if: ${{ matrix.test.interface }}
uses: ./.github/actions/test-device

- name: run dist test
if: ${{ matrix.test.script }}
uses: ./.github/actions/test-dist
1 change: 1 addition & 0 deletions .github/workflows/ledger-app-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
git clone https://github.com/LedgerHQ/app-bitcoin-new.git
cd app-bitcoin-new
make DEBUG=1 ${{ inputs.app == 'nano_x' && 'BOLOS_SDK=$NANOX_SDK' || '' }}

- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.app == 'nano_x' && 'ledger_app_nano_x' || 'ledger_app_nano_s' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sim-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
include: ${{ fromJSON(inputs.include) }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: ./.github/actions/build-sim
with:
name: ${{ matrix.name }}
Expand Down
Loading