mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 03:18:09 +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:
|
||||
- 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:
|
||||
- ci/environment.yml
|
||||
- ci/prebuild.yml
|
||||
|
53
ci/build.yml
53
ci/build.yml
@ -4,40 +4,11 @@ variables:
|
||||
SDL_VIDEODRIVER: "dummy"
|
||||
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 fw regular build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
script:
|
||||
- cd core
|
||||
- pipenv run make build_cross
|
||||
@ -57,7 +28,7 @@ core fw regular build:
|
||||
|
||||
core fw regular debug build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
script:
|
||||
- cd core
|
||||
- PYOPT=0 pipenv run make build_firmware
|
||||
@ -72,7 +43,7 @@ core fw regular debug build:
|
||||
|
||||
core fw btconly build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
script:
|
||||
@ -91,7 +62,7 @@ core fw btconly build:
|
||||
|
||||
core unix regular build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
script:
|
||||
- cd core
|
||||
- pipenv run make build_unix
|
||||
@ -104,7 +75,7 @@ core unix regular build:
|
||||
|
||||
core unix frozen regular build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
script:
|
||||
- cd core
|
||||
- pipenv run make build_unix_frozen
|
||||
@ -116,7 +87,7 @@ core unix frozen regular build:
|
||||
|
||||
core unix frozen btconly debug build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
variables:
|
||||
PYOPT: "0"
|
||||
BITCOIN_ONLY: "1"
|
||||
@ -132,7 +103,7 @@ core unix frozen btconly debug build:
|
||||
|
||||
core unix frozen debug build:
|
||||
stage: build
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
variables:
|
||||
PYOPT: "0"
|
||||
script:
|
||||
@ -187,7 +158,7 @@ crypto build:
|
||||
|
||||
legacy fw regular build:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
variables:
|
||||
MEMORY_PROTECT: "0"
|
||||
script:
|
||||
@ -205,7 +176,7 @@ legacy fw regular build:
|
||||
|
||||
legacy fw debug build:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
variables:
|
||||
DEBUG_LINK: "1"
|
||||
MEMORY_PROTECT: "0"
|
||||
@ -223,7 +194,7 @@ legacy fw debug build:
|
||||
|
||||
legacy fw btconly build:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
MEMORY_PROTECT: "0"
|
||||
@ -243,7 +214,7 @@ legacy fw btconly build:
|
||||
|
||||
legacy emu regular build:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
variables:
|
||||
DEBUG_LINK: "1"
|
||||
EMULATOR: "1"
|
||||
@ -258,7 +229,7 @@ legacy emu regular build:
|
||||
|
||||
legacy emu btconly build:
|
||||
stage: build
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
variables:
|
||||
BITCOIN_ONLY: "1"
|
||||
DEBUG_LINK: "1"
|
||||
|
@ -199,6 +199,7 @@ upgrade tests legacy deploy:
|
||||
|
||||
ui tests core fixtures deploy:
|
||||
stage: deploy
|
||||
extends: .core_job
|
||||
variables:
|
||||
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/"
|
||||
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
|
||||
|
||||
.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 unix unit test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix regular build
|
||||
script:
|
||||
@ -42,7 +13,7 @@ core unix unit test:
|
||||
|
||||
core unix device ui test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
script:
|
||||
@ -64,7 +35,7 @@ core unix device ui test:
|
||||
|
||||
core unix device test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
variables:
|
||||
@ -88,7 +59,7 @@ core unix device test:
|
||||
|
||||
core unix btconly device test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen btconly debug build
|
||||
variables:
|
||||
@ -109,7 +80,7 @@ core unix btconly device test:
|
||||
|
||||
core unix monero test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
script:
|
||||
@ -124,7 +95,7 @@ core unix monero test:
|
||||
|
||||
core unix u2f test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
variables:
|
||||
@ -146,7 +117,7 @@ core unix u2f test:
|
||||
|
||||
core unix fido2 test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
variables:
|
||||
@ -170,7 +141,7 @@ core unix fido2 test:
|
||||
|
||||
core unix click test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
script:
|
||||
@ -188,7 +159,7 @@ core unix click test:
|
||||
|
||||
core unix upgrade test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
variables:
|
||||
@ -207,7 +178,7 @@ core unix upgrade test:
|
||||
|
||||
core unix persistence test:
|
||||
stage: test
|
||||
<<: *only_changes_core
|
||||
extends: .core_job
|
||||
dependencies:
|
||||
- core unix frozen debug build
|
||||
script:
|
||||
@ -253,7 +224,7 @@ crypto test:
|
||||
|
||||
legacy emu test:
|
||||
stage: test
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
dependencies:
|
||||
- legacy emu regular build
|
||||
variables:
|
||||
@ -272,7 +243,7 @@ legacy emu test:
|
||||
|
||||
legacy emu btconly test:
|
||||
stage: test
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
dependencies:
|
||||
- legacy emu btconly build
|
||||
variables:
|
||||
@ -294,7 +265,7 @@ legacy emu btconly test:
|
||||
|
||||
legacy emu upgrade test:
|
||||
stage: test
|
||||
<<: *only_changes_legacy
|
||||
extends: .legacy_job
|
||||
dependencies:
|
||||
- legacy emu regular build
|
||||
variables:
|
||||
|
Loading…
Reference in New Issue
Block a user