mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-16 18:30:57 +00:00
ci: use 'extends' instead of yaml anchors
We might refactor the ci folder a bit more using this but I believe it is fine for now. Should solve #835.
This commit is contained in:
parent
82c7b56875
commit
f4c38af825
@ -32,6 +32,34 @@ stages:
|
|||||||
before_script:
|
before_script:
|
||||||
- command -v pipenv >/dev/null && pipenv sync
|
- command -v pipenv >/dev/null && pipenv sync
|
||||||
|
|
||||||
|
.core_job:
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- ci/**/*
|
||||||
|
- common/**/*
|
||||||
|
- core/**/*
|
||||||
|
- crypto/**/*
|
||||||
|
- python/**/*
|
||||||
|
- storage/**/*
|
||||||
|
- tests/**/*
|
||||||
|
- tools/**/*
|
||||||
|
- vendor/**/*
|
||||||
|
- Pipfile.lock
|
||||||
|
|
||||||
|
.legacy_job:
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- ci/**/*
|
||||||
|
- common/**/*
|
||||||
|
- crypto/**/*
|
||||||
|
- legacy/**/*
|
||||||
|
- python/**/*
|
||||||
|
- storage/**/*
|
||||||
|
- tests/**/*
|
||||||
|
- tools/**/*
|
||||||
|
- vendor/**/*
|
||||||
|
- Pipfile.lock
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- ci/environment.yml
|
- ci/environment.yml
|
||||||
- ci/prebuild.yml
|
- ci/prebuild.yml
|
||||||
|
53
ci/build.yml
53
ci/build.yml
@ -4,40 +4,11 @@ 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/**/*
|
|
||||||
- tests/**/*
|
|
||||||
- tools/**/*
|
|
||||||
- vendor/**/*
|
|
||||||
- Pipfile.lock
|
|
||||||
|
|
||||||
.only_changes_legacy: &only_changes_legacy
|
|
||||||
only:
|
|
||||||
changes:
|
|
||||||
- ci/**/*
|
|
||||||
- common/**/*
|
|
||||||
- crypto/**/*
|
|
||||||
- legacy/**/*
|
|
||||||
- python/**/*
|
|
||||||
- storage/**/*
|
|
||||||
- tests/**/*
|
|
||||||
- tools/**/*
|
|
||||||
- vendor/**/*
|
|
||||||
- Pipfile.lock
|
|
||||||
|
|
||||||
|
|
||||||
# Core
|
# Core
|
||||||
|
|
||||||
core fw regular build:
|
core fw regular build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
script:
|
script:
|
||||||
- cd core
|
- cd core
|
||||||
- pipenv run make build_cross
|
- pipenv run make build_cross
|
||||||
@ -57,7 +28,7 @@ core fw regular build:
|
|||||||
|
|
||||||
core fw regular debug build:
|
core fw regular debug build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
script:
|
script:
|
||||||
- cd core
|
- cd core
|
||||||
- PYOPT=0 pipenv run make build_firmware
|
- PYOPT=0 pipenv run make build_firmware
|
||||||
@ -72,7 +43,7 @@ core fw regular debug build:
|
|||||||
|
|
||||||
core fw btconly build:
|
core fw btconly build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
variables:
|
variables:
|
||||||
BITCOIN_ONLY: "1"
|
BITCOIN_ONLY: "1"
|
||||||
script:
|
script:
|
||||||
@ -91,7 +62,7 @@ core fw btconly build:
|
|||||||
|
|
||||||
core unix regular build:
|
core unix regular build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
script:
|
script:
|
||||||
- cd core
|
- cd core
|
||||||
- pipenv run make build_unix
|
- pipenv run make build_unix
|
||||||
@ -104,7 +75,7 @@ core unix regular build:
|
|||||||
|
|
||||||
core unix frozen regular build:
|
core unix frozen regular build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
script:
|
script:
|
||||||
- cd core
|
- cd core
|
||||||
- pipenv run make build_unix_frozen
|
- pipenv run make build_unix_frozen
|
||||||
@ -116,7 +87,7 @@ core unix frozen regular build:
|
|||||||
|
|
||||||
core unix frozen btconly debug build:
|
core unix frozen btconly debug build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
variables:
|
variables:
|
||||||
PYOPT: "0"
|
PYOPT: "0"
|
||||||
BITCOIN_ONLY: "1"
|
BITCOIN_ONLY: "1"
|
||||||
@ -132,7 +103,7 @@ core unix frozen btconly debug build:
|
|||||||
|
|
||||||
core unix frozen debug build:
|
core unix frozen debug build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
variables:
|
variables:
|
||||||
PYOPT: "0"
|
PYOPT: "0"
|
||||||
script:
|
script:
|
||||||
@ -187,7 +158,7 @@ crypto build:
|
|||||||
|
|
||||||
legacy fw regular build:
|
legacy fw regular build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
variables:
|
variables:
|
||||||
MEMORY_PROTECT: "0"
|
MEMORY_PROTECT: "0"
|
||||||
script:
|
script:
|
||||||
@ -205,7 +176,7 @@ legacy fw regular build:
|
|||||||
|
|
||||||
legacy fw debug build:
|
legacy fw debug build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
variables:
|
variables:
|
||||||
DEBUG_LINK: "1"
|
DEBUG_LINK: "1"
|
||||||
MEMORY_PROTECT: "0"
|
MEMORY_PROTECT: "0"
|
||||||
@ -223,7 +194,7 @@ legacy fw debug build:
|
|||||||
|
|
||||||
legacy fw btconly build:
|
legacy fw btconly build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
variables:
|
variables:
|
||||||
BITCOIN_ONLY: "1"
|
BITCOIN_ONLY: "1"
|
||||||
MEMORY_PROTECT: "0"
|
MEMORY_PROTECT: "0"
|
||||||
@ -243,7 +214,7 @@ legacy fw btconly build:
|
|||||||
|
|
||||||
legacy emu regular build:
|
legacy emu regular build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
variables:
|
variables:
|
||||||
DEBUG_LINK: "1"
|
DEBUG_LINK: "1"
|
||||||
EMULATOR: "1"
|
EMULATOR: "1"
|
||||||
@ -258,7 +229,7 @@ legacy emu regular build:
|
|||||||
|
|
||||||
legacy emu btconly build:
|
legacy emu btconly build:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
variables:
|
variables:
|
||||||
BITCOIN_ONLY: "1"
|
BITCOIN_ONLY: "1"
|
||||||
DEBUG_LINK: "1"
|
DEBUG_LINK: "1"
|
||||||
|
@ -199,6 +199,7 @@ upgrade tests legacy deploy:
|
|||||||
|
|
||||||
ui tests core fixtures deploy:
|
ui tests core fixtures deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
extends: .core_job
|
||||||
variables:
|
variables:
|
||||||
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/"
|
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/"
|
||||||
before_script: [] # no pipenv
|
before_script: [] # no pipenv
|
||||||
|
55
ci/test.yml
55
ci/test.yml
@ -1,39 +1,10 @@
|
|||||||
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/**/*
|
|
||||||
- Pipfile.lock
|
|
||||||
|
|
||||||
.only_changes_legacy: &only_changes_legacy
|
|
||||||
only:
|
|
||||||
changes:
|
|
||||||
- ci/**/*
|
|
||||||
- common/**/*
|
|
||||||
- crypto/**/*
|
|
||||||
- legacy/**/*
|
|
||||||
- python/**/*
|
|
||||||
- storage/**/*
|
|
||||||
- tests/**/*
|
|
||||||
- tools/**/*
|
|
||||||
- vendor/**/*
|
|
||||||
- Pipfile.lock
|
|
||||||
|
|
||||||
|
|
||||||
# Core
|
# Core
|
||||||
|
|
||||||
core unix unit test:
|
core unix unit test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix regular build
|
- core unix regular build
|
||||||
script:
|
script:
|
||||||
@ -42,7 +13,7 @@ core unix unit test:
|
|||||||
|
|
||||||
core unix device ui test:
|
core unix device ui test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
script:
|
script:
|
||||||
@ -64,7 +35,7 @@ core unix device ui test:
|
|||||||
|
|
||||||
core unix device test:
|
core unix device test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
variables:
|
variables:
|
||||||
@ -88,7 +59,7 @@ core unix device test:
|
|||||||
|
|
||||||
core unix btconly device test:
|
core unix btconly device test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen btconly debug build
|
- core unix frozen btconly debug build
|
||||||
variables:
|
variables:
|
||||||
@ -109,7 +80,7 @@ core unix btconly device test:
|
|||||||
|
|
||||||
core unix monero test:
|
core unix monero test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
script:
|
script:
|
||||||
@ -124,7 +95,7 @@ core unix monero test:
|
|||||||
|
|
||||||
core unix u2f test:
|
core unix u2f test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
variables:
|
variables:
|
||||||
@ -146,7 +117,7 @@ core unix u2f test:
|
|||||||
|
|
||||||
core unix fido2 test:
|
core unix fido2 test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
variables:
|
variables:
|
||||||
@ -170,7 +141,7 @@ core unix fido2 test:
|
|||||||
|
|
||||||
core unix click test:
|
core unix click test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
script:
|
script:
|
||||||
@ -188,7 +159,7 @@ core unix click test:
|
|||||||
|
|
||||||
core unix upgrade test:
|
core unix upgrade test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
variables:
|
variables:
|
||||||
@ -207,7 +178,7 @@ core unix upgrade test:
|
|||||||
|
|
||||||
core unix persistence test:
|
core unix persistence test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_core
|
extends: .core_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- core unix frozen debug build
|
- core unix frozen debug build
|
||||||
script:
|
script:
|
||||||
@ -253,7 +224,7 @@ crypto test:
|
|||||||
|
|
||||||
legacy emu test:
|
legacy emu test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- legacy emu regular build
|
- legacy emu regular build
|
||||||
variables:
|
variables:
|
||||||
@ -272,7 +243,7 @@ legacy emu test:
|
|||||||
|
|
||||||
legacy emu btconly test:
|
legacy emu btconly test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- legacy emu btconly build
|
- legacy emu btconly build
|
||||||
variables:
|
variables:
|
||||||
@ -294,7 +265,7 @@ legacy emu btconly test:
|
|||||||
|
|
||||||
legacy emu upgrade test:
|
legacy emu upgrade test:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *only_changes_legacy
|
extends: .legacy_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- legacy emu regular build
|
- legacy emu regular build
|
||||||
variables:
|
variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user