1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 05:48:23 +00:00
trezor-firmware/ci/hardware_tests
2023-01-30 12:34:36 +01:00
..
device style(all): use f-strings for formatting 2021-10-13 11:53:17 +02:00
tpmb ci: enable editorconfig checks, fix whitespace issues 2020-11-11 14:43:50 +01:00
bootstrap.py ci: all hw configuration in one place 2021-02-05 12:58:21 +01:00
hardware.cfg ci: change usb location/ports 2021-02-05 12:58:21 +01:00
README.md docs: hardware CI test jobs 2021-02-06 11:56:23 +01:00
record_video.sh ci: all hw configuration in one place 2021-02-05 12:58:21 +01:00
shell.nix ci: unified shell.nix for hardware tests 2021-04-06 22:06:12 +02:00
t1_hw_test.sh ci: use new firmware filenames 2023-01-30 12:34:36 +01:00

CI pipeline

(Generated automatically by tools/generate_ci_docs.py. Do not edit by hand.)

It consists of multiple stages below, each having one or more jobs Latest CI pipeline of master branch can be seen at https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/pipelines/master/latest

ENVIRONMENT stage - environment.yml

Connected with creating the testing image for CI.

Consists of 3 jobs below:

.environment

Environment job builds the ci/Dockerfile and pushes the built docker image into our GitLab registry. Since modifications of this Dockerfile are very rare this is a manual job which needs to be triggered on GitLab. Almost all CI jobs run inside this docker image.

environment manual

environment scheduled


PREBUILD stage - prebuild.yml

Static checks on the code.

Consists of 6 jobs below:

style prebuild

Check the code for style correctness and perform some static code analysis. Biggest part is the python one - using flake8, isort, black, pylint and pyright, also checking Rust files by rustfmt and C files by clang-format. Changelogs formats are checked.

common prebuild

Check validity of coin definitions and protobuf files.

gen prebuild

Check validity of auto-generated files.

editor prebuild

Checking format of .editorconfig files.

release commit messages prebuild

Checking the format of release commit messages.

changelog prebuild

Verifying that all commits changing some functionality have a changelog entry or contain [no changelog] in the commit message.


BUILD stage - build.yml

All builds are published as artifacts so they can be downloaded and used.

Consists of 25 jobs below:

core fw regular build

Build of Core into firmware. Regular version. Are you looking for Trezor T firmware build? This is most likely it.

core fw regular debug build

Build of Core into firmware with enabled debug mode. In debug mode you can upload mnemonic seed, use debug link etc. which enables device tests. Storage on the device gets wiped on every start in this firmware.

core fw regular production build

core fw btconly build

Build of Core into firmware. Bitcoin-only version.

core fw btconly debug build

core fw btconly production build

core unix regular build

Non-frozen emulator build. This means you still need Python files present which get interpreted.

core unix regular asan build

core unix frozen regular build

Build of Core into UNIX emulator. Something you can run on your laptop. Frozen version. That means you do not need any other files to run it, it is just a single binary file that you can execute directly.

core unix frozen btconly debug build

Build of Core into UNIX emulator. Something you can run on your laptop. Frozen version. That means you do not need any other files to run it, it is just a single binary file that you can execute directly. See Emulator for more info. Debug mode enabled, Bitcoin-only version.

core unix frozen btconly debug asan build

core unix frozen debug build

Build of Core into UNIX emulator. Something you can run on your laptop. Frozen version. That means you do not need any other files to run it, it is just a single binary file that you can execute directly. Are you looking for a Trezor T emulator? This is most likely it.

core unix frozen debug asan build

core unix frozen debug build arm

core macos frozen regular build

crypto build

Build of our cryptographic library, which is then incorporated into the other builds.

legacy fw regular build

legacy fw regular debug build

legacy fw btconly build

legacy fw btconly debug build

legacy emu regular debug build

Regular version (not only Bitcoin) of above. Are you looking for a Trezor One emulator? This is most likely it.

legacy emu regular debug asan build

legacy emu regular debug build arm

legacy emu btconly debug build

Build of Legacy into UNIX emulator. Use keyboard arrows to emulate button presses. Bitcoin-only version.

legacy emu btconly debug asan build


TEST stage - test.yml

All the tests run test cases on the freshly built emulators from the previous BUILD stage.

Consists of 33 jobs below:

core unit python test

Python unit tests, checking core functionality.

core unit rust test

Rust unit tests.

core unit asan test

core device test

Device tests for Core. Running device tests and also comparing screens with the expected UI result. See artifacts for a comprehensive report of UI. See docs/tests/ui-tests for more info.

core device asan test

core btconly device test

Device tests excluding altcoins, only for BTC.

core btconly device asan test

core monero test

Monero tests.

core monero asan test

core u2f test

Tests for U2F and HID.

core u2f asan test

core fido2 test

FIDO2 device tests.

core fido2 asan test

core click test

Click tests. See docs/tests/click-tests for more info.

core click asan test

core upgrade test

Upgrade tests. See docs/tests/upgrade-tests for more info.

core upgrade asan test

core persistence test

Persistence tests.

core persistence asan test

core hwi test

crypto test

legacy device test

legacy asan test

legacy btconly test

legacy btconly asan test

legacy upgrade test

legacy upgrade asan test

legacy hwi test

python test

python support test

storage test

core unix memory profiler

connect test core


TEST-HW stage - test-hw.yml

Consists of 5 jobs below:

hardware core regular device test

Device tests that run against an actual physical Trezor T. The device needs to have special bootloader, found in core/embed/bootloader_ci, that makes it possible to flash firmware without confirmation on the touchscreen.

All hardware tests are run nightly on the master branch, as well as on push to branches with whitelisted prefix. If you want hardware tests ran on your branch, make sure its name starts with hw/.

Currently it's not possible to run all regular TT tests without getting into a state where the micropython heap is too fragmented and allocations fail (often manifesting as a stuck test case). For that reason some tests are skipped. See also: https://github.com/trezor/trezor-firmware/issues/1371

hardware core btconly device test

Also device tests on physical Trezor T but with Bitcoin-only firmware.

hardware core monero test

hardware legacy regular device test

Device tests executed on physical Trezor 1. This works thanks to tpmb, which is a small arduino device capable of pushing an actual buttons on the device.

hardware legacy btconly device test

Also device tests on physical Trezor 1 but with Bitcoin-only firmware.


POSTTEST stage - posttest.yml

Consists of 2 jobs below:

core unix coverage posttest

unix ui changes


DEPLOY stage - deploy.yml

Consists of 13 jobs below:

release core fw regular deploy

release core fw btconly deploy

release core fw regular debug deploy

release core fw btconly debug deploy

release legacy fw regular deploy

release legacy fw btconly deploy

release legacy fw regular debug deploy

release legacy fw btconly debug deploy

release core unix debug deploy

release legacy unix debug deploy

ui tests fixtures deploy

sync emulators to aws

common sync