mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
fixup! build(ci): add thp builds and tests
This commit is contained in:
parent
33957ce1c8
commit
74dbf3ef41
87
.github/workflows/core.yml
vendored
87
.github/workflows/core.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
cat $GITHUB_OUTPUT
|
cat $GITHUB_OUTPUT
|
||||||
|
|
||||||
core_firmware:
|
core_firmware:
|
||||||
name: Build firmware
|
name: Build firmware (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -67,6 +67,14 @@ jobs:
|
|||||||
coins: btconly
|
coins: btconly
|
||||||
type: debuglink
|
type: debuglink
|
||||||
protocol: v2
|
protocol: v2
|
||||||
|
- model: T3T1
|
||||||
|
coins: universal
|
||||||
|
type: debuglink
|
||||||
|
protocol: v2
|
||||||
|
- model: T3T1
|
||||||
|
coins: btconly
|
||||||
|
type: debuglink
|
||||||
|
protocol: v2
|
||||||
exclude:
|
exclude:
|
||||||
- model: T3W1
|
- model: T3W1
|
||||||
type: production
|
type: production
|
||||||
@ -108,7 +116,7 @@ jobs:
|
|||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
core_emu:
|
core_emu:
|
||||||
name: Build emu
|
name: Build emu (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: param
|
needs: param
|
||||||
strategy:
|
strategy:
|
||||||
@ -134,6 +142,16 @@ jobs:
|
|||||||
type: debuglink
|
type: debuglink
|
||||||
asan: noasan
|
asan: noasan
|
||||||
protocol: v2
|
protocol: v2
|
||||||
|
- model: T3T1
|
||||||
|
coins: universal
|
||||||
|
type: debuglink
|
||||||
|
asan: noasan
|
||||||
|
protocol: v2
|
||||||
|
- model: T3T1
|
||||||
|
coins: btconly
|
||||||
|
type: debuglink
|
||||||
|
asan: noasan
|
||||||
|
protocol: v2
|
||||||
env:
|
env:
|
||||||
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
|
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model }}
|
||||||
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
|
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
|
||||||
@ -197,7 +215,7 @@ jobs:
|
|||||||
retention-days: 2
|
retention-days: 2
|
||||||
|
|
||||||
core_unit_python_test:
|
core_unit_python_test:
|
||||||
name: Python unit tests (${{ matrix.model }}, ${{ matrix.asan }}, protocol_${{ matrix.protocol}})
|
name: Python unit tests (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: param
|
needs: param
|
||||||
strategy:
|
strategy:
|
||||||
@ -220,7 +238,7 @@ jobs:
|
|||||||
- run: nix-shell --run "poetry run make -C core test"
|
- run: nix-shell --run "poetry run make -C core test"
|
||||||
|
|
||||||
core_unit_rust_test:
|
core_unit_rust_test:
|
||||||
name: Rust unit tests (${{ matrix.model }}, ${{ matrix.asan }}, protocol_${{ matrix.protocol}})
|
name: Rust unit tests (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -272,7 +290,7 @@ jobs:
|
|||||||
# See artifacts for a comprehensive report of UI.
|
# See artifacts for a comprehensive report of UI.
|
||||||
# See [docs/tests/ui-tests](../tests/ui-tests.md) for more info.
|
# See [docs/tests/ui-tests](../tests/ui-tests.md) for more info.
|
||||||
core_device_test:
|
core_device_test:
|
||||||
name: Device tests
|
name: Device tests (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.asan }}, ${{ matrix.lang }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -331,7 +349,7 @@ jobs:
|
|||||||
# Click tests - UI.
|
# Click tests - UI.
|
||||||
# See [docs/tests/click-tests](../tests/click-tests.md) for more info.
|
# See [docs/tests/click-tests](../tests/click-tests.md) for more info.
|
||||||
core_click_test:
|
core_click_test:
|
||||||
name: Click tests
|
name: Click tests (${{ matrix.model }}, ${{ matrix.asan }}, ${{ matrix.lang }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -343,6 +361,12 @@ jobs:
|
|||||||
model: [T2T1, T3B1, T3T1]
|
model: [T2T1, T3B1, T3T1]
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
lang: ${{ fromJSON(needs.param.outputs.test_lang) }}
|
lang: ${{ fromJSON(needs.param.outputs.test_lang) }}
|
||||||
|
protocol: [v1]
|
||||||
|
include:
|
||||||
|
- model: T2T1
|
||||||
|
asan: noasan
|
||||||
|
lang: en
|
||||||
|
protocol: v2
|
||||||
env:
|
env:
|
||||||
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
||||||
# MULTICORE: 4 # more could interfere with other jobs
|
# MULTICORE: 4 # more could interfere with other jobs
|
||||||
@ -354,7 +378,7 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_v1
|
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: core/build
|
path: core/build
|
||||||
- run: chmod +x core/build/unix/trezor-emu-core*
|
- run: chmod +x core/build/unix/trezor-emu-core*
|
||||||
- uses: ./.github/actions/environment
|
- uses: ./.github/actions/environment
|
||||||
@ -364,7 +388,7 @@ jobs:
|
|||||||
if: ${{ matrix.asan == 'asan' }}
|
if: ${{ matrix.asan == 'asan' }}
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-test-click-${{ matrix.model }}-${{ matrix.lang }}-${{ matrix.asan }}-protocol_v1
|
name: core-test-click-${{ matrix.model }}-${{ matrix.lang }}-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: tests/trezor.log
|
path: tests/trezor.log
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
if: always()
|
if: always()
|
||||||
@ -381,7 +405,7 @@ jobs:
|
|||||||
# Upgrade tests.
|
# Upgrade tests.
|
||||||
# See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
|
# See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
|
||||||
core_upgrade_test:
|
core_upgrade_test:
|
||||||
name: Upgrade tests
|
name: Upgrade tests (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -393,6 +417,7 @@ jobs:
|
|||||||
# FIXME: T3T1 https://github.com/trezor/trezor-firmware/issues/3595
|
# FIXME: T3T1 https://github.com/trezor/trezor-firmware/issues/3595
|
||||||
model: [T2T1]
|
model: [T2T1]
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
|
protocol: [v1,v2]
|
||||||
env:
|
env:
|
||||||
TREZOR_UPGRADE_TEST: core
|
TREZOR_UPGRADE_TEST: core
|
||||||
PYTEST_TIMEOUT: 400
|
PYTEST_TIMEOUT: 400
|
||||||
@ -402,7 +427,7 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_v1
|
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: core/build
|
path: core/build
|
||||||
- run: chmod +x core/build/unix/trezor-emu-core*
|
- run: chmod +x core/build/unix/trezor-emu-core*
|
||||||
- uses: ./.github/actions/environment
|
- uses: ./.github/actions/environment
|
||||||
@ -412,7 +437,7 @@ jobs:
|
|||||||
|
|
||||||
# Persistence tests - UI.
|
# Persistence tests - UI.
|
||||||
core_persistence_test:
|
core_persistence_test:
|
||||||
name: Persistence tests
|
name: Persistence tests (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -423,6 +448,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
model: [T2T1, T3B1, T3T1]
|
model: [T2T1, T3B1, T3T1]
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
|
protocol: [v1]
|
||||||
|
include:
|
||||||
|
- model: T2T1
|
||||||
|
asan: noasan
|
||||||
|
protocol: v2
|
||||||
env:
|
env:
|
||||||
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
||||||
PYTEST_TIMEOUT: 400
|
PYTEST_TIMEOUT: 400
|
||||||
@ -432,7 +462,7 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_v1
|
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: core/build
|
path: core/build
|
||||||
- run: chmod +x core/build/unix/trezor-emu-core*
|
- run: chmod +x core/build/unix/trezor-emu-core*
|
||||||
- uses: ./.github/actions/environment
|
- uses: ./.github/actions/environment
|
||||||
@ -559,7 +589,7 @@ jobs:
|
|||||||
|
|
||||||
# Monero tests.
|
# Monero tests.
|
||||||
core_monero_test:
|
core_monero_test:
|
||||||
name: Monero test
|
name: Monero test (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -569,6 +599,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
model: [T2T1, T3B1, T3T1]
|
model: [T2T1, T3B1, T3T1]
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
|
protocol: [v1]
|
||||||
|
include:
|
||||||
|
- model: T2T1
|
||||||
|
asan: noasan
|
||||||
|
protocol: v2
|
||||||
env:
|
env:
|
||||||
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
||||||
PYTEST_TIMEOUT: 400
|
PYTEST_TIMEOUT: 400
|
||||||
@ -578,7 +613,7 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_v1
|
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: core/build
|
path: core/build
|
||||||
- run: chmod +x core/build/unix/trezor-emu-core*
|
- run: chmod +x core/build/unix/trezor-emu-core*
|
||||||
- uses: cachix/install-nix-action@v23
|
- uses: cachix/install-nix-action@v23
|
||||||
@ -589,7 +624,7 @@ jobs:
|
|||||||
- run: nix-shell --arg fullDeps true --run "unset _PYTHON_SYSCONFIGDATA_NAME && poetry run make -C core test_emu_monero"
|
- run: nix-shell --arg fullDeps true --run "unset _PYTHON_SYSCONFIGDATA_NAME && poetry run make -C core test_emu_monero"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-test-monero-${{ matrix.model }}-${{ matrix.asan }}
|
name: core-test-monero-${{ matrix.model }}-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: |
|
path: |
|
||||||
tests/trezor.log
|
tests/trezor.log
|
||||||
core/tests/trezor_monero_tests.log
|
core/tests/trezor_monero_tests.log
|
||||||
@ -600,7 +635,7 @@ jobs:
|
|||||||
|
|
||||||
# Tests for U2F and HID.
|
# Tests for U2F and HID.
|
||||||
core_u2f_test:
|
core_u2f_test:
|
||||||
name: U2F test
|
name: U2F test (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -610,6 +645,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
model: [T2T1, T3B1, T3T1]
|
model: [T2T1, T3B1, T3T1]
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
|
protocol: [v1]
|
||||||
|
include:
|
||||||
|
- model: T2T1
|
||||||
|
asan: noasan
|
||||||
|
protocol: v2
|
||||||
env:
|
env:
|
||||||
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
||||||
PYTEST_TIMEOUT: 400
|
PYTEST_TIMEOUT: 400
|
||||||
@ -619,7 +659,7 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_v1
|
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: core/build
|
path: core/build
|
||||||
- run: chmod +x core/build/unix/trezor-emu-core*
|
- run: chmod +x core/build/unix/trezor-emu-core*
|
||||||
- uses: ./.github/actions/environment
|
- uses: ./.github/actions/environment
|
||||||
@ -627,7 +667,7 @@ jobs:
|
|||||||
- run: nix-shell --run "poetry run make -C core test_emu_u2f"
|
- run: nix-shell --run "poetry run make -C core test_emu_u2f"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-test-u2f-${{ matrix.model }}-${{ matrix.asan }}
|
name: core-test-u2f-${{ matrix.model }}-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: tests/trezor.log
|
path: tests/trezor.log
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
if: always()
|
if: always()
|
||||||
@ -635,7 +675,7 @@ jobs:
|
|||||||
|
|
||||||
# FIDO2 device tests.
|
# FIDO2 device tests.
|
||||||
core_fido2_test:
|
core_fido2_test:
|
||||||
name: FIDO2 test
|
name: FIDO2 test (${{ matrix.model }}, ${{ matrix.asan }}${{ matrix.protocol=='v2' && ', THP' || ''}})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- param
|
- param
|
||||||
@ -645,6 +685,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
model: [T2T1, T3T1] # XXX T3B1 https://github.com/trezor/trezor-firmware/issues/2724
|
model: [T2T1, T3T1] # XXX T3B1 https://github.com/trezor/trezor-firmware/issues/2724
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
|
protocol: [v1]
|
||||||
|
include:
|
||||||
|
- model: T2T1
|
||||||
|
asan: noasan
|
||||||
|
protocol: v2
|
||||||
env:
|
env:
|
||||||
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
||||||
PYTEST_TIMEOUT: 400
|
PYTEST_TIMEOUT: 400
|
||||||
@ -654,14 +699,14 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_v1
|
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: core/build
|
path: core/build
|
||||||
- run: chmod +x core/build/unix/trezor-emu-core*
|
- run: chmod +x core/build/unix/trezor-emu-core*
|
||||||
- uses: ./.github/actions/environment
|
- uses: ./.github/actions/environment
|
||||||
- run: nix-shell --run "poetry run make -C core test_emu_fido2"
|
- run: nix-shell --run "poetry run make -C core test_emu_fido2"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: core-test-fido2-${{ matrix.model }}-${{ matrix.asan }}
|
name: core-test-fido2-${{ matrix.model }}-${{ matrix.asan }}-protocol_${{matrix.protocol}}
|
||||||
path: |
|
path: |
|
||||||
tests/trezor.log
|
tests/trezor.log
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
Loading…
Reference in New Issue
Block a user