mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-28 18:38:39 +00:00
ci: enable only:changes to limit the number of required tasks
This commit is contained in:
parent
f962a18785
commit
e3df251f84
38
ci/build.yml
38
ci/build.yml
@ -4,11 +4,35 @@ variables:
|
||||
SDL_VIDEODRIVER: "dummy"
|
||||
XDG_RUNTIME_DIR: "/var/tmp"
|
||||
|
||||
.only_changes_core: &only_changes_core
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- common/**/*
|
||||
- core/**/*
|
||||
- crypto/**/*
|
||||
- python/**/*
|
||||
- storage/**/*
|
||||
- tools/**/*
|
||||
- vendor/**/*
|
||||
|
||||
.only_changes_legacy: &only_changes_legacy
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- common/**/*
|
||||
- crypto/**/*
|
||||
- legacy/**/*
|
||||
- python/**/*
|
||||
- storage/**/*
|
||||
- tools/**/*
|
||||
- vendor/**/*
|
||||
|
||||
# Core
|
||||
|
||||
build core firmware regular:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
script:
|
||||
- cd core
|
||||
- pipenv run make build_cross
|
||||
@ -28,6 +52,7 @@ build core firmware regular:
|
||||
|
||||
build core firmware bitcoinonly:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
script:
|
||||
@ -46,12 +71,14 @@ build core firmware bitcoinonly:
|
||||
|
||||
build core unix regular:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
script:
|
||||
- cd core
|
||||
- pipenv run make build_unix
|
||||
|
||||
build core unix frozen regular:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
script:
|
||||
- cd core
|
||||
- pipenv run make build_unix_frozen
|
||||
@ -64,6 +91,7 @@ build core unix frozen regular:
|
||||
|
||||
build core unix frozen bitcoinonly:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
script:
|
||||
@ -79,6 +107,7 @@ build core unix frozen bitcoinonly:
|
||||
|
||||
build core unix frozen debug:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
variables:
|
||||
PYOPT: "0"
|
||||
script:
|
||||
@ -94,6 +123,10 @@ build core unix frozen debug:
|
||||
|
||||
build crypto:
|
||||
stage: build
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- crypto/**/*
|
||||
script:
|
||||
- cd crypto
|
||||
- pipenv run make
|
||||
@ -112,6 +145,7 @@ build crypto:
|
||||
# TODO: add clang https://github.com/trezor/trezor-firmware/issues/44
|
||||
build legacy firmware regular:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
variables:
|
||||
MEMORY_PROTECT: "0"
|
||||
script:
|
||||
@ -130,6 +164,7 @@ build legacy firmware regular:
|
||||
|
||||
build legacy firmware debug:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
variables:
|
||||
DEBUG_LINK: "1"
|
||||
MEMORY_PROTECT: "0"
|
||||
@ -139,6 +174,7 @@ build legacy firmware debug:
|
||||
|
||||
build legacy firmware bitcoinonly:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
MEMORY_PROTECT: "0"
|
||||
@ -158,6 +194,7 @@ build legacy firmware bitcoinonly:
|
||||
|
||||
build legacy emu regular:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
variables:
|
||||
DEBUG_LINK: "1"
|
||||
EMULATOR: "1"
|
||||
@ -172,6 +209,7 @@ build legacy emu regular:
|
||||
|
||||
build legacy emu bitcoinonly:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
DEBUG_LINK: "1"
|
||||
|
@ -2,15 +2,34 @@ image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
|
||||
|
||||
prebuild style:
|
||||
stage: prebuild
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- "**/*.c"
|
||||
- "**/*.h"
|
||||
- "**/*.py"
|
||||
script:
|
||||
- pipenv run make style_check
|
||||
|
||||
prebuild common:
|
||||
stage: prebuild
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- "**/*.json"
|
||||
- "**/*.proto"
|
||||
script:
|
||||
- pipenv run make defs_check
|
||||
|
||||
prebuild gen:
|
||||
stage: prebuild
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- "**/*.c"
|
||||
- "**/*.h"
|
||||
- "**/*.json"
|
||||
- "**/*.proto"
|
||||
- "**/*.py"
|
||||
script:
|
||||
- pipenv run make gen_check
|
||||
|
46
ci/test.yml
46
ci/test.yml
@ -1,9 +1,36 @@
|
||||
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
|
||||
|
||||
.only_changes_core: &only_changes_core
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- common/**/*
|
||||
- core/**/*
|
||||
- crypto/**/*
|
||||
- python/**/*
|
||||
- storage/**/*
|
||||
- tests/**/*
|
||||
- tools/**/*
|
||||
- vendor/**/*
|
||||
|
||||
.only_changes_legacy: &only_changes_legacy
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- common/**/*
|
||||
- crypto/**/*
|
||||
- legacy/**/*
|
||||
- python/**/*
|
||||
- storage/**/*
|
||||
- tests/**/*
|
||||
- tools/**/*
|
||||
- vendor/**/*
|
||||
|
||||
# Core
|
||||
|
||||
test core unix unit:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
dependencies:
|
||||
- build core unix frozen regular
|
||||
script:
|
||||
@ -12,6 +39,7 @@ test core unix unit:
|
||||
|
||||
test core unix device:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
dependencies:
|
||||
- build core unix frozen regular
|
||||
script:
|
||||
@ -20,6 +48,7 @@ test core unix device:
|
||||
|
||||
test core unix device bitcoinonly:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
dependencies:
|
||||
- build core unix frozen bitcoinonly
|
||||
variables:
|
||||
@ -31,6 +60,7 @@ test core unix device bitcoinonly:
|
||||
|
||||
test core unix monero:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
dependencies:
|
||||
- build core unix frozen regular
|
||||
script:
|
||||
@ -42,6 +72,10 @@ test core unix monero:
|
||||
|
||||
test crypto:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- crypto/**/*
|
||||
dependencies:
|
||||
- build crypto
|
||||
script:
|
||||
@ -57,6 +91,7 @@ test crypto:
|
||||
|
||||
test legacy emu:
|
||||
stage: test
|
||||
<<: *only_changes_legacy
|
||||
dependencies:
|
||||
- build legacy emu regular
|
||||
variables:
|
||||
@ -67,6 +102,7 @@ test legacy emu:
|
||||
|
||||
test legacy emu bitcoinonly:
|
||||
stage: test
|
||||
<<: *only_changes_legacy
|
||||
dependencies:
|
||||
- build legacy emu bitcoinonly
|
||||
variables:
|
||||
@ -82,6 +118,10 @@ test legacy emu bitcoinonly:
|
||||
|
||||
test python:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- python/**/*
|
||||
script:
|
||||
- cd python
|
||||
- pipenv run tox
|
||||
@ -91,6 +131,10 @@ test python:
|
||||
|
||||
test storage:
|
||||
stage: test
|
||||
only:
|
||||
changes:
|
||||
- ci/**/*
|
||||
- storage/**/*
|
||||
dependencies: []
|
||||
script:
|
||||
- cd storage/tests
|
||||
@ -102,6 +146,8 @@ test storage:
|
||||
|
||||
test upgrade:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
<<: *only_changes_legacy
|
||||
dependencies:
|
||||
- build core unix frozen debug
|
||||
- build legacy emu regular
|
||||
|
Loading…
Reference in New Issue
Block a user