1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-05 05:58:23 +00:00
Commit Graph

374 Commits

Author SHA1 Message Date
grdddj
f0cc7f3327 feat(ci): autogenerate documentation for CI jobs 2022-03-18 12:02:24 +01:00
Martin Milata
2e3ce4fa1a docs(core): bump MSRV
[skip_ci]
2022-03-08 12:53:12 +01:00
grdddj
b77f4b7dbc feat(shell.nix): enable rust extensions in VS Code 2022-03-08 10:32:30 +01:00
Martin Milata
5632567c06 ci: fix HWI test bitcoind sources 2022-03-03 13:59:47 +01:00
matejcik
d655dbf228 ci: allow HWI test failure 2022-02-28 15:45:29 +01:00
vdovhanych
d0148e020b ci: upload emulators and ui_tests to public storage 2022-02-24 14:48:54 +01:00
grdddj
9cba6a0191 chore(ci): rename UI jobs and make legacy UI a dependency 2022-02-17 11:05:55 +01:00
grdddj
5ba47b582a fix(ci): add T1/TT argument into prepare_ui_artifacts.py to account for missing files 2022-02-17 11:05:55 +01:00
grdddj
5ab93ab812 feat(ci): generate artifacts for legacy test 2022-02-17 11:05:55 +01:00
grdddj
967727a43c chore(legacy,ci): add and use make targets for legacy 2022-02-17 11:05:55 +01:00
Andrew Kozlik
02660ea64a ci: Increase crypto test timeout due to test_codepoints failing. 2022-02-16 10:25:15 +01:00
Pavol Rusnak
b9bbd5fcd7 chore: update dependencies
[no changelog]

Co-Authored-By: Martin Milata <martin@martinmilata.cz>
2022-02-15 13:28:03 +01:00
vdovhanych
bb71f9f345 ci: fix the environment build after changing runner config 2022-02-10 13:17:35 +01:00
matejcik
b0a7e13c88 ci: remove separate "UI" job, do UI test in the default "device test" job 2022-02-08 16:34:54 +01:00
vdovhanych
48d7f71ccc ci: add hwi tests for core and legacy builds 2022-02-08 14:18:08 +01:00
grdddj
5d76144ef5 chore(common): always use resolve() when accessing parent of the Path
[no changelog]
2022-02-07 14:05:27 +01:00
vdovhanych
b35e6ca5c4 ci: add git filter repo to base image 2022-01-27 10:30:18 +01:00
vdovhanych
2c2474db07 ci: add script for automating common sync 2022-01-27 10:30:18 +01:00
Martin Milata
7ca2ae232b ci(core): add nightly builds with PRODUCTION=1 2022-01-25 13:59:18 +01:00
vdovhanych
068c6463a2 ci: build base docker image once a week on schedule 2022-01-24 14:22:56 +01:00
Martin Milata
af0ae880a1 fix(ci): Fix valgrind crypto test. 2022-01-19 15:22:03 +01:00
Andrew Kozlik
07013d5a0c fix(ci): Fix crypto tests. 2022-01-19 15:22:03 +01:00
Andrew Kozlik
ebc07fd6db ci: Suppress libSDL memory leaks.
[no changelog]
2022-01-19 15:22:03 +01:00
Martin Milata
242b5f956c ci: more AddressSanitizer jobs 2022-01-19 15:22:03 +01:00
Martin Milata
b6ed573cf5 ci(legacy): run nightly device tests with AddressSanitizer
[no changelog]
2022-01-19 15:22:03 +01:00
Martin Milata
e3541997f0 ci(core): run nightly device tests with AddressSanitizer
[no changelog]
2022-01-19 15:22:03 +01:00
Andrew Kozlik
56126b75a7 ci: Use address sanitizer in CI.
[no changelog]
2022-01-19 15:22:03 +01:00
Pavol Rusnak
52a09c320d fix(ci): copy pyright directory in Dockerfile
follow-up to https://github.com/trezor/trezor-firmware/pull/1939
2022-01-12 21:01:34 +01:00
Andrew Kozlik
fc0fa726e4 ci: Allow failure of connect tests. 2022-01-10 11:14:36 +01:00
Martin Milata
3100961dda ci(nix): update to pyright-1.1.204 2022-01-07 21:41:17 +01:00
vdovhanych
f9b43efcbe ci: jobs for deploying arm emulators 2021-12-21 16:25:11 +01:00
vdovhanych
0024d72340 ci: add arm build for core unix and legacy emulators 2021-12-21 16:25:11 +01:00
matejcik
9a9201fe8a fix(ci): properly ignore changed generated enums 2021-12-19 20:36:30 +01:00
grdddj
f838e15eda chore(ci): connect tests - exporting emu/bridge logfile from tenv as artifact 2021-12-17 13:53:26 +01:00
Pavol Rusnak
30a77a76bc
chore(legacy): rename MEMORY_PROTECT flag to PRODUCTION to match core naming (#2003) 2021-12-12 15:45:10 +01:00
grdddj
3ed92a72bb feat(ci): running connect tests against current branch 2021-12-10 14:18:21 +01:00
Pavol Rusnak
aa4ade59dc chore(ci): update alpine-linux to 3.15.0 and nix to 2.4 2021-12-09 17:23:30 +01:00
Martin Milata
2b7b4b13bd chore(nix): update rust to 1.57 2021-12-07 17:12:43 +01:00
Martin Milata
e43ff4ba8e ci(nix): prefer gcc over clang for symlinks with same name 2021-12-06 16:25:59 +01:00
Pavol Rusnak
4419572437
ci(nix): use gcc-arm-embedded on aarch64-darwin too
it is now enabled in nixpkgs (via rosetta)
2021-12-06 00:21:42 +01:00
Pavol Rusnak
8428456df6
ci(nix): use explicit versions for clang and gcc (#1969) 2021-12-03 12:49:08 +01:00
vdovhanych
3419961797 ci: introduce gitlab cache for vnev 2021-11-26 16:30:05 +01:00
Martin Milata
52f719ad81 ci: add core unit test t1
[no changelog]
2021-11-24 15:36:34 +01:00
Martin Milata
909b7b355d
ci: also build legacy firmware with MEMORY_PROTECT=1 (#1935) 2021-11-24 11:14:44 +01:00
Martin Milata
ebfaff7904 ci(nix): keep python3.6 from old nixpkgs 2021-11-19 16:26:31 +01:00
Martin Milata
0e505ec78b ci(nix): update to latest nixpkgs-unstable 2021-11-19 10:54:31 +01:00
grdddj
6eac12e80e feat(shell.nix): adding pyright as a dependency 2021-11-19 10:54:31 +01:00
Pavol Rusnak
a3b83685ef fix(core): fix emulator build on Apple Silicon
[no changelog]
2021-11-08 11:00:04 +01:00
amadejpapez
85ba7c12ba style(all): use f-strings for formatting
[no changelog]
2021-10-13 11:53:17 +02:00
Martin Milata
2687fd4ade ci: hw: don't skip memory-intensive tests 2021-10-07 18:30:43 +02:00
Martin Milata
31d6cfb52d chore(ci): update alpine-linux to 3.14.2 and nix to 2.3.15 2021-09-29 16:15:42 +02:00
matejcik
b6ee69c905 ci: ignore auto-generated files in changelog check (fixes #1785) 2021-09-24 10:30:19 +02:00
Martin Milata
81e66cb024 style(core/rust): enable clippy lints
[no changelog]
2021-09-23 14:22:40 +02:00
matejcik
8d7f3fbd15 ci: include whole build/unix/ subdir for rust_test to consume 2021-09-21 12:43:31 +02:00
Martin Milata
a7a7570496 ci(core): enable rust unit tests
[no changelog]
2021-09-16 14:57:06 +02:00
Martin Milata
c80c8edf70 ci(core): add rustfmt to style checks
[no changelog]
2021-09-16 14:57:06 +02:00
Martin Milata
7832b2f140 chore(nix): update rust to 1.55 2021-09-16 13:42:15 +02:00
grdddj
1b932a20e8 fix(tests): decoding PNG files to fix Linux/Mac differences in encoding 2021-09-14 14:21:38 +02:00
Pavol Rusnak
08609cf9a1 chore(nix): update rust to 1.54 2021-09-08 13:27:52 +02:00
Martin Milata
412d06fdfe docs(core+legacy): use towncrier for generating CHANGELOG.md
core/embed/boardloader/CHANGELOG.md
core/embed/bootloader/CHANGELOG.md
core/embed/bootloader_ci/CHANGELOG.md
legacy/intermediate_fw/CHANGELOG.md
2021-07-21 14:27:20 +02:00
vdovhanych
63a42def17 feat(ci): add sha checksum for alpine download and change to https 2021-07-20 16:57:12 +02:00
Pavol Rusnak
acb01916db ci(nix): update nixpkgs, use latest stable rust (1.53.0) 2021-07-14 17:34:12 +02:00
Martin Milata
f67544d27a ci: run more tests on hardware
- bitcoin tests on regular builds in addition to altcoins
- tests that need SD card
2021-07-12 19:54:51 +02:00
Pavol Rusnak
8ed7bdbc27 chore(ci): update alpine-linux to 3.14.0 and nix to 2.3.14 2021-07-09 11:39:24 +02:00
vdovhanych
6b3e743373 ci: add duration timestamps on all test jobs 2021-06-09 10:00:24 +02:00
Martin Milata
f9d4be268e ci: increase timeout for hardware T1 regular test 2021-06-04 13:10:51 +02:00
Martin Milata
07c53452f6 ci: improve changelog check
- ignore master branch
- treat secfix/ same as release/ branches
- allow skiping check with [no changelog] in commit message
2021-06-04 13:10:51 +02:00
Martin Milata
f771dc6f60 ci(nix): switch to stable rust in shell.nix
Switch to https://github.com/oxalica/rust-overlay for rustc binaries.

Drop x86_64-unknown-linux-gnu from target list as host is included by
default.
2021-05-21 13:42:10 +02:00
Pavol Rusnak
709d9e0dcd
fix(ci): update to latest nixpkgs-unstable 2021-05-07 17:11:58 +02:00
matejcik
1e0a23c133 fix(core/paths): make sure containers are copied along with the numbers they contain 2021-05-06 13:14:21 +02:00
matejcik
791ac56f2f ci: increase hardware test timeouts 2021-05-06 13:14:21 +02:00
matejcik
28978640b3 ci: simplify HW test definitions 2021-05-06 13:14:21 +02:00
matejcik
bb96cdc4e6 ci: include monero logs in artifacts 2021-05-06 13:14:21 +02:00
Jan Pochyla
6257584951 feat(core): Add Rust bindings to MicroPython and trezorhal
core: Remove dangling module decls

core: Use new Cargo feature resolver, use external MacOS debug info

core: Rust docs improvements

core: Upgrade bindgen

core: Add test target to Rust

ci: build rust sources

build(core): .ARM.exidx.text.__aeabi_ui2f in t1 firmware size

It's an unwind table for softfloat function inserted by rustc, probably
can be removed to save 8 bytes:
599c58db70/link.x.in (L175-L182)

scons: Remove dead code

core: Move Rust target to build/rust

core: Replace extern with a FFI version

core: Add some explanatory Rust comments

core: Use correct path for the Rust lib

core: Remove Buffer::as_mut()

Mutable buffer access needs MP_BUFFER_WRITE flag. TBD in the Protobuf PR.

core: Improve docs for micropython::Buffer

core: Minor Rust docs changes

core: Rewrite trezor_obj_get_ll_checked

core: Fix incorrect doc comment

core: Remove cc from deps

fixup! core: Rewrite trezor_obj_get_ll_checked

core: update safety comments
2021-05-05 16:00:21 +02:00
Martin Milata
f58c1634c6 docs(core): use towncrier for generating CHANGELOG.md 2021-05-04 14:18:01 +02:00
Martin Milata
88cdb72aec ci: bump nixpkgs version to latest 2021-04-06 22:06:12 +02:00
Martin Milata
8e00904a3f ci: unified shell.nix for hardware tests 2021-04-06 22:06:12 +02:00
Martin Milata
720eaa3abd ci: run monero tests on hardware 2021-04-06 22:06:12 +02:00
Martin Milata
17324a01a3 ci: more reboots and skipped cases for hardware tests 2021-02-20 21:55:36 +01:00
Martin Milata
99a858a774 ci: hw: skip sd_card tests on TT 2021-02-20 21:55:36 +01:00
Martin Milata
3213557f72 ci: check model before flashing 2021-02-20 21:55:36 +01:00
Martin Milata
17494b2276 ci: reboot more often during hardware regular test 2021-02-20 21:55:36 +01:00
Tomas Susanka
8955d04b5e ci: add fixup check to Github Actions 2021-02-19 19:54:41 +01:00
Martin Milata
11ac8ef19d ci: also build bootloader_ci 2021-02-15 20:55:54 +01:00
Tomas Susanka
6214156c35 fix(ci): strip commit version for emulator releases
trezor-user-env can't work with that
2021-02-11 08:25:25 +01:00
Pavol Rusnak
32c37aa9cd
fix(ci): copy nixpkgs.nix to container 2021-02-09 16:47:11 +01:00
Martin Milata
c000a803e4 ci: deterministic order for hw tt btconly testcases
It seems some test permutations result in FirmwareError likely caused by
OOM.
2021-02-08 08:46:50 +01:00
Martin Milata
2ecd4eeac2 ci: wait longer for T1 bootup 2021-02-06 16:02:42 +01:00
Martin Milata
6050412ed4 docs: hardware CI test jobs 2021-02-06 11:56:23 +01:00
Martin Milata
73c600d3f5 ci: also run regular tt tests on hw
Break off hardware test tasks into separate file.
2021-02-05 12:58:21 +01:00
Martin Milata
55474bdadd ci: use custom uhubctl package
Simply bumping the nixpkgs unstable version causes python test to fail:
https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/jobs/1008507521

Until that's resolved we can stay on the current nixpkgs version and use
our own copy of the uhubctl nix expression.
2021-02-05 12:58:21 +01:00
Martin Milata
4d5e6e360f ci: change usb location/ports 2021-02-05 12:58:21 +01:00
Martin Milata
c7b021e59e ci: hardware: wipe tt before flashing 2021-02-05 12:58:21 +01:00
Martin Milata
ceccf1951a ci: all hw configuration in one place 2021-02-05 12:58:21 +01:00
Martin Milata
4adbb4e8e1 ci: use same pinned nixpkgs for hardware tests 2021-02-05 12:58:21 +01:00
Martin Milata
41bf9201b5 ci: do not rely on TREZOR_PATH, use switch ports instead
As the connected Trezors can be left in various weird states, trezorctl
list may not always return what is expected or even fail. If it failed
TREZOR_PATH was set to empty string which means random device got
selected.

For now let's avoid using incorrect device by powering down the other
usb port.

Fix log lines ordering.
2021-02-05 12:58:21 +01:00
Martin Milata
ed481b5dde ci: hw tests: tweak wait times 2021-02-05 12:58:21 +01:00
Martin Milata
0a75e02392 ci: skip some tests that cause alloc failure
Also increase PYTEST_TIMEOUT so that test_lots_of_inputs has enough time
to pass.
2021-02-05 12:58:21 +01:00
Martin Milata
dedca1bb13 ci: ffmpeg tweaks in hardware tests
Running ffmpeg in a subshell and killing it in exit trap handler should
ensure video availability even when bootstrap or pytest fail.
2021-02-05 12:58:21 +01:00
Tomas Susanka
708a85a916 ci: run btconly firmware on TT in HW tests 2021-02-05 12:58:21 +01:00
Tomas Susanka
61531fbd4a ci: introduce hardware tests for TT 2021-02-05 12:58:21 +01:00
Pavol Rusnak
250f09245b
ci: drop experimental --platform argument from docker 2021-01-22 16:55:27 +01:00
Pavol Rusnak
1f5d8b89d7
nix: stdenv.lib -> lib
[skip_ci]
2021-01-19 17:01:47 +01:00
Tomas Susanka
677465eecd ci: update Monero test binary to latest 0.17.1.9 2021-01-13 18:12:13 +01:00
Pavol Rusnak
453df567d3 ci: various fixes and updates
- fix Nix build on macOS Big Sur (by updating to nixpkgs-unstable)
- update gcc-arm-embedded from 9.x to 10.x
- update nix to 2.3.10
- update Alpine Linux to 3.12.3
- allow to change arch in Docker
2021-01-04 14:40:16 +01:00
Pavol Rusnak
b9c0b597bc nix: bump stable nixos-20.09 to latest 2020-12-17 14:32:20 +01:00
Martin Milata
a0fccca041 ci(core): increase PYTEST_TIMEOUT for memory profiling
test_lots_of_inputs times out, still less than 1200 needed on actual
hardware
2020-12-08 18:07:50 +01:00
matejcik
faa57e29db build(core): include generated resources.py in repo 2020-11-20 18:55:35 +01:00
Pavol Rusnak
50fdd183c2
ci: enable editorconfig checks, fix whitespace issues 2020-11-11 14:43:50 +01:00
Pavol Rusnak
473fb1a3a6
ci: enable yaml checks 2020-11-11 14:23:28 +01:00
Tomas Susanka
09a8d4229e feat(ci): introduce yamllint 2020-11-10 10:27:47 +01:00
Tomas Susanka
1f90a13372 ci: change [NO MASTER] to [RELEASE ONLY] in release check
To make it the same as in Suite.
2020-11-05 19:11:10 +01:00
Tomas Susanka
859aa23752 ci: remove 'changes' from prebuild 2020-11-05 18:55:10 +01:00
Tomas Susanka
cc3d86f0dd ci: skip submodules download where applicable 2020-11-05 18:54:56 +01:00
Martin Milata
c89a8b7bd5 ci(core): add memory profiler job 2020-11-02 14:14:00 +01:00
Tomas Susanka
fd90bb9d10 ci: remove darwin emulator deploy
We'll use trezor user env for that.
2020-10-30 11:28:46 +01:00
Tomas Susanka
dfd93b6759 ci: distinguish between t1 and tt on firmware corp server 2020-10-30 11:28:01 +01:00
Martin Milata
9ed25a718a ci: handle full dependencies in shell.nix
Handling of full dependencies (multiple python versions, Monero tests)
was moved from Dockerfile to shell.nix.

The Python packages are installed from the pinned nixpkgs revision and
do not depend on channel state at the time of docker build anymore.

The Monero test binary is now downloaded using fetchurl which fails the
build if checksum doesn't match.
2020-10-15 15:59:20 +02:00
Tomas Susanka
6cb601509b ci: skip macos build for now 2020-10-12 17:11:52 +02:00
Tomas Susanka
2101ff8904 ci: also remove docker pull from environment, it is not needed 2020-10-12 09:08:05 +02:00
Pavol Rusnak
2fcc34c301
ci: another try with the environment 2020-10-11 22:15:45 +02:00
Pavol Rusnak
940400998a
ci(dockerfile): fix other python versions 2020-10-11 15:30:50 +02:00
Pavol Rusnak
6cc1d70f2e
ci(dockerfile): fix python versions 2020-10-08 15:24:12 +02:00
Tomas Susanka
3a8e46467a ci: fix firmware versions in deploy jobs
We do not run before_script because we run `nix-shell` and `poetry install`
there. The deploy takes about ~5s without nix-shell and peotry and ~5m with
both so it is worth it.
2020-10-07 22:13:57 +02:00
Pavol Rusnak
2e4d67165f
ci(nix): update nixpkgs to latest nixos-20.09 stable 2020-10-07 16:30:50 +02:00
Pavol Rusnak
4fdb62c2e2 chore(python): replace pipenv with poetry 2020-10-07 16:21:00 +02:00
Pavol Rusnak
98ea241e97
ci: use alternative list syntax for needs 2020-10-06 21:59:22 +02:00
Tomas Susanka
99e0faafb6 test(core): print fixtures suggestion after the test 2020-10-06 21:17:28 +02:00
Tomas Susanka
225966ea7c ci: fix date epoch in shell.nix not in Gitlab yml file
This way we fix also local environments for devs with NixOS.
Updates 988c7f65af.
2020-09-30 09:29:43 +02:00
matejcik
1f5c08c9a2 ci: add .gitlab-ci.yml as explicit trigger whenever ci/** is a trigger 2020-09-29 11:30:40 +02:00
matejcik
e4785d47e0 style: apply black 20.8b1 2020-09-29 11:30:40 +02:00
Tomas Susanka
5edd0a55f3 ci: document arduino pins 2020-09-01 13:51:32 +02:00
Tomas Susanka
c7b6d98cfc tests/upgrade-tests: modify paths in release jobs and add job for MacOS 2020-08-27 21:04:22 +02:00
Tomas Susanka
c52c93aea0 ci: add core btconly debug build and deploy it during release 2020-08-26 16:24:43 +02:00
Tomas Susanka
00593dc6d6 ci: fix builds for MacOS
Drop .app bundling and use a simpler approach. A simple .command bash
script is present that launches the binary.
2020-08-26 13:58:31 +02:00
Tomas Susanka
db020c7a47 ci: run HW tests for secfix branches 2020-08-24 13:30:57 +02:00
Tomas Susanka
141d9099f5 ci: remove release candidates deploy
It is not being used at the moment anyway.
2020-08-24 13:28:41 +02:00
Martin Milata
71c5bc4e3b ci: fail if coverage falls under threshold 2020-08-18 21:08:46 +02:00
Tomas Susanka
13c11e756e ci: replace 'dependends' with 'needs'
https://docs.gitlab.com/ee/ci/yaml/#needs
2020-08-18 16:55:31 +02:00
Pavol Rusnak
c3892b75bd
ci: test python on Pipfile.lock/poetry.lock 2020-08-08 19:19:15 +02:00
Pavol Rusnak
e0ee8266ec
poetry: add pyproject.toml + lock file 2020-08-08 18:25:29 +02:00
Tomas Susanka
01ac2ec48d ci: run release commit message check only on one Gitlab 2020-08-06 00:04:25 +02:00
Tomas Susanka
fa39948683 ci: fix release commit check 2020-08-05 22:53:09 +02:00
Pavol Rusnak
ac9047a438
ci/build: fix typo in "core fw btconly t1 build" 2020-08-04 17:36:39 +02:00
Tomas Susanka
fb583cf0fa ci: fix release commit message check 2020-08-04 13:46:28 +02:00
Pavol Rusnak
efc5ccdaf0
core: remove src1 2020-08-03 15:59:57 +02:00
Pavol Rusnak
063aba910d core: rename emulator to trezor-emu-core 2020-07-30 15:27:34 +02:00
Pavol Rusnak
f71958b63f
ci: build T1 firmware 2020-07-28 12:18:44 +02:00
Tomas Susanka
698b632acb ci: add btconly debug build and run hardware tests for it 2020-07-15 18:07:21 +02:00
Pavol Rusnak
8d94b13d3a
ci/test: fix coverage by moving the files to correct subdir 2020-07-06 19:52:18 +02:00