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