2022-03-14 19:10:10 +00:00
# CI pipeline
(Generated automatically by `tools/generate_ci_docs.py` . Do not edit by hand.)
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
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 ](https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/pipelines/master/latest )
2020-05-03 19:45:34 +00:00
2022-09-11 15:27:58 +00:00
## ENVIRONMENT stage - [environment.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/environment.yml)
2022-03-14 19:10:10 +00:00
Connected with creating the testing image for CI.
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
Consists of **3 jobs** below:
### [.environment](https://github.com/trezor/trezor-firmware/blob/master/ci/environment.yml#L7)
2020-11-11 13:43:09 +00:00
Environment job builds the `ci/Dockerfile` and pushes the built docker image
into our GitLab registry. Since modifications of this Dockerfile are very rare
2022-03-14 19:10:10 +00:00
this is a _manual_ job which needs to be triggered on GitLab.
2020-05-03 19:45:34 +00:00
Almost all CI jobs run inside this docker image.
2022-03-14 19:10:10 +00:00
### [environment manual](https://github.com/trezor/trezor-firmware/blob/master/ci/environment.yml#L31)
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
### [environment scheduled](https://github.com/trezor/trezor-firmware/blob/master/ci/environment.yml#L35)
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
---
2022-09-11 15:27:58 +00:00
## PREBUILD stage - [prebuild.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml)
2022-03-14 19:10:10 +00:00
Static checks on the code.
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
Consists of **7 jobs** below:
### [style prebuild](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L16)
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](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L25)
Check validity of coin definitions and protobuf files.
### [gen prebuild](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L32)
Check validity of auto-generated files.
### [editor prebuild](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L39)
Checking format of .editorconfig files.
### [yaml prebuild](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L46)
All .yml/.yaml files are checked for syntax validity and other correctness.
### [release commit messages prebuild](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L53)
Checking the format of release commit messages.
### [changelog prebuild](https://github.com/trezor/trezor-firmware/blob/master/ci/prebuild.yml#L70)
Verifying that all commits changing some functionality have a changelog entry
or contain `[no changelog]` in the commit message.
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
---
2022-09-11 15:27:58 +00:00
## BUILD stage - [build.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml)
2022-03-14 19:10:10 +00:00
All builds are published as artifacts so they can be downloaded and used.
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
Consists of **25 jobs** below:
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
### [core fw regular build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L20)
Build of Core into firmware. Regular version.
**Are you looking for Trezor T firmware build? This is most likely it.**
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
### [core fw regular debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L41)
2020-05-03 19:45:34 +00:00
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.
2022-03-14 19:10:10 +00:00
### [core fw regular production build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L54)
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
### [core fw btconly build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L77)
Build of Core into firmware. Bitcoin-only version.
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
### [core fw btconly debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L94)
2020-05-03 19:45:34 +00:00
2022-03-14 19:10:10 +00:00
### [core fw btconly production build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L117)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core unix regular build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L138)
2022-03-14 19:10:10 +00:00
Non-frozen emulator build. This means you still need Python files
present which get interpreted.
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core unix regular asan build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L150)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [core unix frozen regular build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L169)
2022-03-14 19:10:10 +00:00
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.
2022-12-31 12:36:29 +00:00
### [core unix frozen btconly debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L186)
2022-03-14 19:10:10 +00:00
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 ](../core/emulator/index.md ) for more info.
Debug mode enabled, Bitcoin-only version.
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core unix frozen btconly debug asan build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L202)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core unix frozen debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L225)
2022-03-14 19:10:10 +00:00
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.**
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core unix frozen debug asan build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L238)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core unix frozen debug build arm](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L254)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core macos frozen regular build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L276)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [crypto build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L301)
2020-05-03 19:45:34 +00:00
Build of our cryptographic library, which is then incorporated into the other builds.
2022-12-31 12:36:29 +00:00
### [legacy fw regular build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L330)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [legacy fw regular debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L346)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [legacy fw btconly build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L363)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [legacy fw btconly debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L382)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [legacy emu regular debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L403)
2022-03-14 19:10:10 +00:00
Regular version (not only Bitcoin) of above.
**Are you looking for a Trezor One emulator? This is most likely it.**
2022-12-31 12:36:29 +00:00
### [legacy emu regular debug asan build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L418)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [legacy emu regular debug build arm](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L436)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [legacy emu btconly debug build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L462)
2022-03-14 19:10:10 +00:00
Build of Legacy into UNIX emulator. Use keyboard arrows to emulate button presses.
2020-05-03 19:45:34 +00:00
Bitcoin-only version.
2022-12-31 12:36:29 +00:00
### [legacy emu btconly debug asan build](https://github.com/trezor/trezor-firmware/blob/master/ci/build.yml#L479)
2022-03-14 19:10:10 +00:00
---
2022-09-11 15:27:58 +00:00
## TEST stage - [test.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml)
2022-03-14 19:10:10 +00:00
All the tests run test cases on the freshly built emulators from the previous `BUILD` stage.
2022-12-31 12:36:29 +00:00
Consists of **33 jobs** below:
2022-03-14 19:10:10 +00:00
2022-10-20 12:26:06 +00:00
### [core unit python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L15)
Python unit tests, checking core functionality.
2022-03-14 19:10:10 +00:00
2022-10-20 12:26:06 +00:00
### [core unit rust test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L24)
Rust unit tests.
2022-03-31 17:16:59 +00:00
2022-10-20 12:26:06 +00:00
### [core unit asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L33)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [core device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L54)
2022-03-14 19:10:10 +00:00
Device tests for Core. Running device tests and also comparing screens
with the expected UI result.
See artifacts for a comprehensive report of UI.
2022-09-11 15:27:58 +00:00
See [docs/tests/ui-tests ](../tests/ui-tests.md ) for more info.
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [core device asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L83)
2022-03-14 19:10:10 +00:00
2022-12-31 12:36:29 +00:00
### [core btconly device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L102)
2022-03-14 19:10:10 +00:00
Device tests excluding altcoins, only for BTC.
2022-12-31 12:36:29 +00:00
### [core btconly device asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L122)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core monero test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L143)
2022-03-14 19:10:10 +00:00
Monero tests.
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core monero asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L162)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core u2f test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L184)
2022-03-14 19:10:10 +00:00
Tests for U2F and HID.
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core u2f asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L203)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core fido2 test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L221)
2022-03-14 19:10:10 +00:00
FIDO2 device tests.
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core fido2 asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L244)
2020-05-03 19:45:34 +00:00
2022-12-31 12:36:29 +00:00
### [core click test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L264)
2022-03-14 19:10:10 +00:00
Click tests.
2022-09-11 15:27:58 +00:00
See [docs/tests/click-tests ](../tests/click-tests.md ) for more info.
2020-05-03 19:45:34 +00:00
2023-01-30 13:41:09 +00:00
### [core click asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L292)
2020-05-03 19:45:34 +00:00
2023-01-30 13:41:09 +00:00
### [core upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L313)
2022-03-14 19:10:10 +00:00
Upgrade tests.
2022-09-11 15:27:58 +00:00
See [docs/tests/upgrade-tests ](../tests/upgrade-tests.md ) for more info.
2020-05-03 19:45:34 +00:00
2023-01-30 13:41:09 +00:00
### [core upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L332)
2021-02-05 16:36:25 +00:00
2023-01-30 13:41:09 +00:00
### [core persistence test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L354)
2022-03-14 19:10:10 +00:00
Persistence tests.
2021-02-05 16:36:25 +00:00
2023-01-30 13:41:09 +00:00
### [core persistence asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L370)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [core hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L388)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [crypto test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L406)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L437)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L464)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy btconly test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L476)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy btconly asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L496)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L511)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L530)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [legacy hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L551)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L570)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [python support test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L589)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L599)
2022-03-14 19:10:10 +00:00
2023-01-30 13:41:09 +00:00
### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L623)
2022-05-27 14:15:21 +00:00
2023-01-30 13:41:09 +00:00
### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L647)
2022-03-14 19:10:10 +00:00
---
2022-09-11 15:27:58 +00:00
## TEST-HW stage - [test-hw.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml)
2022-03-14 19:10:10 +00:00
Consists of **5 jobs** below:
### [hardware core regular device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml#L25)
2022-09-11 15:27:58 +00:00
[Device tests ](../tests/device-tests.md ) that run against an actual physical Trezor T.
2021-02-05 16:36:25 +00:00
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/` .
2022-03-14 19:10:10 +00:00
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
2021-02-05 16:36:25 +00:00
2022-03-14 19:10:10 +00:00
### [hardware core btconly device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml#L54)
2021-02-05 16:36:25 +00:00
Also device tests on physical Trezor T but with Bitcoin-only firmware.
2022-03-14 19:10:10 +00:00
### [hardware core monero test](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml#L83)
2021-02-05 16:36:25 +00:00
2022-03-14 19:10:10 +00:00
### [hardware legacy regular device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml#L113)
2022-09-11 15:27:58 +00:00
[Device tests ](../tests/device-tests.md ) executed on physical Trezor 1.
2021-02-05 16:36:25 +00:00
This works thanks to [tpmb ](https://github.com/mmahut/tpmb ), which is a small arduino
device capable of pushing an actual buttons on the device.
2022-03-14 19:10:10 +00:00
### [hardware legacy btconly device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml#L137)
2021-02-05 16:36:25 +00:00
Also device tests on physical Trezor 1 but with Bitcoin-only firmware.
2022-03-14 19:10:10 +00:00
---
2022-09-11 15:27:58 +00:00
## POSTTEST stage - [posttest.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml)
2022-03-14 19:10:10 +00:00
Consists of **2 jobs** below:
### [core unix coverage posttest](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml#L10)
2023-01-30 13:41:09 +00:00
### [unix ui changes](https://github.com/trezor/trezor-firmware/blob/master/ci/posttest.yml#L32)
2022-03-14 19:10:10 +00:00
---
2022-09-11 15:27:58 +00:00
## DEPLOY stage - [deploy.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml)
2022-03-14 19:10:10 +00:00
2022-10-20 12:26:06 +00:00
Consists of **13 jobs** below:
2022-03-14 19:10:10 +00:00
### [release core fw regular deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L5)
### [release core fw btconly deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L26)
### [release core fw regular debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L47)
### [release core fw btconly debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L68)
### [release legacy fw regular deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L91)
### [release legacy fw btconly deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L112)
### [release legacy fw regular debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L133)
### [release legacy fw btconly debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L154)
### [release core unix debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L177)
### [release legacy unix debug deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L202)
### [ui tests fixtures deploy](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L229)
2023-02-10 12:08:15 +00:00
### [sync emulators to aws](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L252)
2022-05-26 09:54:54 +00:00
2023-02-10 12:08:15 +00:00
### [common sync](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L277)
2022-03-14 19:10:10 +00:00
---