1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

ci: split jobs based on stage not project

This commit is contained in:
Tomas Susanka 2019-08-19 14:24:32 +02:00
parent bd3b93e521
commit b5c909417e
8 changed files with 176 additions and 160 deletions

View File

@ -32,9 +32,6 @@ before_script:
include:
- ci/environment.yml
- ci/prebuild.yml # common, style
- ci/core.yml
- ci/legacy.yml
- ci/python.yml
- ci/crypto.yml
- ci/storage.yml
- ci/prebuild.yml
- ci/build.yml
- ci/test.yml

98
ci/build.yml Normal file
View File

@ -0,0 +1,98 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
variables:
SDL_VIDEODRIVER: "dummy"
XDG_RUNTIME_DIR: "/var/tmp"
# Core
build core firmware:
stage: build
script:
- cd core
- pipenv run make build_cross
- pipenv run make build_boardloader
- pipenv run make build_bootloader
- pipenv run make build_prodtest
- pipenv run make build_firmware
- pipenv run make sizecheck
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- core/build/firmware/firmware.bin
- core/build/bootloader/bootloader.bin
expire_in: 1 week
build core unix:
stage: build
script:
- cd core
- pipenv run make build_unix
build core unix frozen:
stage: build
script:
- cd core
- pipenv run make build_unix_frozen
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
untracked: true
expire_in: 1 day
# Crypto
build crypto:
stage: build
script:
- cd crypto
- pipenv run make
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
untracked: true
expire_in: 1 day
# Legacy
# TODO: add clang https://github.com/trezor/trezor-firmware/issues/44
build legacy firmware:
stage: build
script:
- cd legacy
- pipenv run script/cibuild
- pipenv run make -C bootloader
- pipenv run make -C demo
build legacy firmware debug:
stage: build
variables:
DEBUG_LINK: "1"
script:
- cd legacy
- pipenv run script/cibuild
build legacy firmware bitcoinonly:
stage: build
variables:
BITCOIN_ONLY: "1"
script:
- cd legacy
- pipenv run script/cibuild
build legacy emu:
stage: build
variables:
DEBUG_LINK: "1"
EMULATOR: "1"
script:
- cd legacy
- pipenv run script/cibuild
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
untracked: true
expire_in: 1 day

View File

@ -1,62 +0,0 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
variables:
SDL_VIDEODRIVER: "dummy"
XDG_RUNTIME_DIR: "/var/tmp"
build core firmware:
stage: build
script:
- cd core
- pipenv run make build_cross
- pipenv run make build_boardloader
- pipenv run make build_bootloader
- pipenv run make build_prodtest
- pipenv run make build_firmware
- pipenv run make sizecheck
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- core/build/firmware/firmware.bin
- core/build/bootloader/bootloader.bin
expire_in: 1 week
build core unix:
stage: build
script:
- cd core
- pipenv run make build_unix
build core unix frozen:
stage: build
script:
- cd core
- pipenv run make build_unix_frozen
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
untracked: true
expire_in: 1 day
test core unix unit:
stage: test
dependencies:
- build core unix frozen
script:
- cd core
- pipenv run make test
test core unix device:
stage: test
dependencies:
- build core unix frozen
script:
- cd core
- pipenv run make test_emu
test core unix monero:
stage: test
dependencies:
- build core unix frozen
script:
- cd core
- pipenv run make test_emu_monero

View File

@ -1,23 +0,0 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
build crypto:
stage: build
script:
- cd crypto
- pipenv run make
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
untracked: true
expire_in: 1 day
test crypto:
stage: test
dependencies:
- build crypto
script:
- cd crypto
- ./tests/aestst
- ./tests/test_check
- CK_TIMEOUT_MULTIPLIER=20 valgrind -q --error-exitcode=1 ./tests/test_check
- ./tests/test_openssl 1000
- ITERS=10 pipenv run pytest tests

View File

@ -1,53 +0,0 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
variables:
SDL_VIDEODRIVER: "dummy"
XDG_RUNTIME_DIR: "/var/tmp"
# TODO: add clang https://github.com/trezor/trezor-firmware/issues/44
build legacy firmware:
stage: build
script:
- cd legacy
- pipenv run script/cibuild
- pipenv run make -C bootloader
- pipenv run make -C demo
build legacy firmware debug:
stage: build
variables:
DEBUG_LINK: "1"
script:
- cd legacy
- pipenv run script/cibuild
build legacy firmware bitcoinonly:
stage: build
variables:
BITCOIN_ONLY: "1"
script:
- cd legacy
- pipenv run script/cibuild
build legacy emu:
stage: build
variables:
DEBUG_LINK: "1"
EMULATOR: "1"
script:
- cd legacy
- pipenv run script/cibuild
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
untracked: true
expire_in: 1 day
test legacy emu:
stage: test
dependencies:
- build legacy emu
variables:
EMULATOR: "1"
script:
- cd legacy
- pipenv run script/test

View File

@ -1,7 +0,0 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
test python:
stage: test
script:
- cd python
- pipenv run tox

View File

@ -1,9 +0,0 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
test storage:
stage: test
dependencies: []
script:
- cd storage/tests
- pipenv run make build
- pipenv run make tests_all

75
ci/test.yml Normal file
View File

@ -0,0 +1,75 @@
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/environment
# Core
test core unix unit:
stage: test
dependencies:
- build core unix frozen
script:
- cd core
- pipenv run make test
test core unix device:
stage: test
dependencies:
- build core unix frozen
script:
- cd core
- pipenv run make test_emu
test core unix monero:
stage: test
dependencies:
- build core unix frozen
script:
- cd core
- pipenv run make test_emu_monero
# Crypto
test crypto:
stage: test
dependencies:
- build crypto
script:
- cd crypto
- ./tests/aestst
- ./tests/test_check
- CK_TIMEOUT_MULTIPLIER=20 valgrind -q --error-exitcode=1 ./tests/test_check
- ./tests/test_openssl 1000
- ITERS=10 pipenv run pytest tests
# Legacy
test legacy emu:
stage: test
dependencies:
- build legacy emu
variables:
EMULATOR: "1"
script:
- cd legacy
- pipenv run script/test
# Python
test python:
stage: test
script:
- cd python
- pipenv run tox
# Storage
test storage:
stage: test
dependencies: []
script:
- cd storage/tests
- pipenv run make build
- pipenv run make tests_all