diff --git a/ci/build.yml b/ci/build.yml index 9672e9a45..4065a8af5 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -8,6 +8,7 @@ variables: core fw regular build: stage: build + needs: [] script: - nix-shell --run "pipenv run make -C core build_boardloader" - nix-shell --run "pipenv run make -C core build_bootloader" @@ -23,6 +24,7 @@ core fw regular build: core fw regular debug build: stage: build + needs: [] script: - nix-shell --run "PYOPT=0 pipenv run make -C core build_firmware" - cp core/build/firmware/firmware.bin trezor-fw-regular-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin @@ -34,6 +36,7 @@ core fw regular debug build: core fw btconly build: stage: build + needs: [] variables: BITCOIN_ONLY: "1" script: @@ -49,6 +52,7 @@ core fw btconly build: core fw btconly t1 build: stage: build + needs: [] variables: BITCOIN_ONLY: "1" TREZOR_MODEL: "1" @@ -63,6 +67,7 @@ core fw btconly t1 build: core unix regular build: stage: build + needs: [] script: - nix-shell --run "pipenv run make -C core build_unix" artifacts: @@ -74,6 +79,7 @@ core unix regular build: core unix frozen regular build: stage: build + needs: [] script: - nix-shell --run "pipenv run make -C core build_unix_frozen" artifacts: @@ -84,6 +90,7 @@ core unix frozen regular build: core unix frozen btconly debug build: stage: build + needs: [] variables: PYOPT: "0" BITCOIN_ONLY: "1" @@ -98,6 +105,7 @@ core unix frozen btconly debug build: core unix frozen debug build: stage: build + needs: [] variables: PYOPT: "0" script: @@ -109,6 +117,7 @@ core unix frozen debug build: core unix frozen regular darwin: stage: build + needs: [] tags: - darwin when: manual @@ -129,6 +138,7 @@ core unix frozen regular darwin: crypto build: stage: build + needs: [] only: changes: - ci/**/* @@ -149,6 +159,7 @@ crypto build: legacy fw regular build: stage: build + needs: [] variables: MEMORY_PROTECT: "0" script: @@ -163,6 +174,7 @@ legacy fw regular build: legacy fw regular debug build: stage: build + needs: [] variables: DEBUG_LINK: "1" MEMORY_PROTECT: "0" @@ -177,6 +189,7 @@ legacy fw regular debug build: legacy fw btconly build: stage: build + needs: [] variables: BITCOIN_ONLY: "1" MEMORY_PROTECT: "0" @@ -193,6 +206,7 @@ legacy fw btconly build: legacy fw btconly debug build: stage: build + needs: [] variables: BITCOIN_ONLY: "1" MEMORY_PROTECT: "0" @@ -209,6 +223,7 @@ legacy fw btconly debug build: legacy emu regular build: stage: build + needs: [] variables: DEBUG_LINK: "1" EMULATOR: "1" @@ -222,6 +237,7 @@ legacy emu regular build: legacy emu btconly build: stage: build + needs: [] variables: BITCOIN_ONLY: "1" DEBUG_LINK: "1" diff --git a/ci/deploy.yml b/ci/deploy.yml index 629a8d53f..614d2c03f 100644 --- a/ci/deploy.yml +++ b/ci/deploy.yml @@ -7,8 +7,7 @@ release core fw regular deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - core fw regular build + needs: ["core fw regular build"] script: - export VERSION=$(./tools/version.sh core/embed/firmware/version.h) - export NAME="trezor-fw-regular-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -27,8 +26,7 @@ release core fw btconly deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - core fw btconly build + needs: ["core fw btconly build"] script: - export VERSION=$(./tools/version.sh core/embed/firmware/version.h) - export NAME="trezor-fw-btconly-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -47,8 +45,7 @@ release legacy fw regular deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - legacy fw regular build + needs: ["legacy fw regular build"] script: - export VERSION=$(./tools/version.sh legacy/firmware/version.h) - export NAME="trezor-fw-regular-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -67,8 +64,7 @@ release legacy fw btconly deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - legacy fw btconly build + needs: ["legacy fw btconly build"] script: - export VERSION=$(./tools/version.sh legacy/firmware/version.h) - export NAME="trezor-fw-btconly-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -87,8 +83,7 @@ release core fw regular debug deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - core fw regular debug build + needs: ["core fw regular debug build"] script: - export VERSION=$(./tools/version.sh core/embed/firmware/version.h) - export NAME="trezor-fw-regular-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -107,8 +102,7 @@ release legacy fw regular debug deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - legacy fw regular debug build + needs: ["legacy fw regular debug build"] script: - export VERSION=$(./tools/version.sh legacy/firmware/version.h) - export NAME="trezor-fw-regular-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -127,8 +121,7 @@ release legacy fw btconly debug deploy: variables: DEPLOY_DIRECTORY: "releases/firmwares" before_script: [] # no pipenv - dependencies: - - legacy fw btconly debug build + needs: ["legacy fw btconly debug build"] script: - export VERSION=$(./tools/version.sh legacy/firmware/version.h) - export NAME="trezor-fw-btconly-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin" @@ -148,8 +141,7 @@ release legacy fw btconly debug deploy: rc core fw regular deploy: stage: deploy before_script: [] # no pipenv - dependencies: - - core fw regular build + needs: ["core fw regular build"] script: - export DEPLOY_DIRECTORY="release_candidates/${CI_COMMIT_REF_NAME:8}/firmwares" # stripping 'release/' - export VERSION=$(./tools/version.sh core/embed/firmware/version.h) @@ -165,8 +157,7 @@ rc core fw regular deploy: rc core fw btconly deploy: stage: deploy before_script: [] # no pipenv - dependencies: - - core fw btconly build + needs: ["core fw btconly build"] script: - export DEPLOY_DIRECTORY="release_candidates/${CI_COMMIT_REF_NAME:8}/firmwares" # stripping 'release/' - export VERSION=$(./tools/version.sh core/embed/firmware/version.h) @@ -182,8 +173,7 @@ rc core fw btconly deploy: rc legacy fw regular deploy: stage: deploy before_script: [] # no pipenv - dependencies: - - legacy fw regular build + needs: ["legacy fw regular build"] script: - export DEPLOY_DIRECTORY="release_candidates/${CI_COMMIT_REF_NAME:8}/firmwares" # stripping 'release/' - export VERSION=$(./tools/version.sh legacy/firmware/version.h) @@ -199,8 +189,7 @@ rc legacy fw regular deploy: rc legacy fw btconly deploy: stage: deploy before_script: [] # no pipenv - dependencies: - - legacy fw btconly build + needs: ["legacy fw btconly build"] script: - export DEPLOY_DIRECTORY="release_candidates/${CI_COMMIT_REF_NAME:8}/firmwares" # stripping 'release/' - export VERSION=$(./tools/version.sh legacy/firmware/version.h) @@ -220,8 +209,7 @@ upgrade tests core deploy: variables: DEPLOY_PATH: "${DEPLOY_BASE_DIR}/upgrade_tests" before_script: [] # no pipenv - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] script: - TAG=`git tag --points-at HEAD | grep "core" | sed "s/\//-/"` - "[[ $TAG == '' ]] && echo 'Tag is not core/*: exiting.' && exit 1" @@ -240,8 +228,7 @@ upgrade tests legacy deploy: variables: DEPLOY_PATH: "${DEPLOY_BASE_DIR}/upgrade_tests" before_script: [] # no pipenv - dependencies: - - legacy emu regular build + needs: ["legacy emu regular build"] script: - TAG=`git tag --points-at HEAD | grep "legacy" | sed "s/\//-/"` - "[[ $TAG == '' ]] && echo 'Tag is not legacy/*: exiting.' && exit 1" @@ -262,8 +249,7 @@ ui tests core fixtures deploy: variables: DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/" before_script: [] # no pipenv - dependencies: - - core device ui test + needs: ["core device ui test"] script: - echo "Deploying to $DEPLOY_PATH" - rsync --delete -va ci/ui_test_records/* "$DEPLOY_PATH" diff --git a/ci/posttest.yml b/ci/posttest.yml index 8a6a8db44..dec93c5d8 100644 --- a/ci/posttest.yml +++ b/ci/posttest.yml @@ -2,11 +2,7 @@ image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/trezor-firmware-en core unix coverage posttest: stage: posttest - dependencies: - - core device test - - core monero test - - core u2f test - - core fido2 test + needs: ["core device test", "core monero test", "core u2f test", "core fido2 test"] script: - nix-shell --run "pipenv run make -C core res" # we need to regenerate resources.py - nix-shell --run "pipenv run make -C core coverage" @@ -22,8 +18,7 @@ core unix ui changes: stage: posttest except: - master - dependencies: - - core device ui test + needs: ["core device ui test"] script: - nix-shell --run "cd tests/ui_tests ; pipenv run python reporting/report_master_diff.py" - mv tests/ui_tests/reporting/reports/master_diff/ . diff --git a/ci/test.yml b/ci/test.yml index 88facd73a..cc720ceca 100644 --- a/ci/test.yml +++ b/ci/test.yml @@ -4,15 +4,13 @@ image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/trezor-firmware-en core unit test: stage: test - dependencies: - - core unix regular build + needs: ["core unix regular build"] script: - nix-shell --run "pipenv run make -C core test" core device ui test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] script: - nix-shell --run "pipenv run make -C core test_emu_ui" after_script: @@ -33,8 +31,7 @@ core device ui test: core device test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] variables: TREZOR_PROFILING: 1 script: @@ -53,8 +50,7 @@ core device test: core btconly device test: stage: test - dependencies: - - core unix frozen btconly debug build + needs: ["core unix frozen btconly debug build"] variables: MICROPYTHON: "build/unix/trezor-emu-core-bitcoinonly" TREZOR_PYTEST_SKIP_ALTCOINS: 1 @@ -72,8 +68,7 @@ core btconly device test: core monero test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] variables: TREZOR_PROFILING: 1 script: @@ -89,8 +84,7 @@ core monero test: core u2f test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] variables: TREZOR_PROFILING: 1 script: @@ -107,8 +101,7 @@ core u2f test: core fido2 test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] variables: TREZOR_PROFILING: 1 script: @@ -129,8 +122,7 @@ core fido2 test: core click test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] script: - nix-shell --run "pipenv run make -C core test_emu_click" artifacts: @@ -145,8 +137,7 @@ core click test: core upgrade test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] variables: TREZOR_UPGRADE_TEST: "core" script: @@ -163,8 +154,7 @@ core upgrade test: core persistence test: stage: test - dependencies: - - core unix frozen debug build + needs: ["core unix frozen debug build"] script: - nix-shell --run "pipenv run pytest --junitxml=tests/junit.xml tests/persistence_tests" artifacts: @@ -185,8 +175,7 @@ crypto test: changes: - ci/**/* - crypto/**/* - dependencies: - - crypto build + needs: ["crypto build"] script: - ./crypto/tests/aestst - ./crypto/tests/test_check @@ -207,8 +196,7 @@ crypto test: legacy test: stage: test - dependencies: - - legacy emu regular build + needs: ["legacy emu regular build"] variables: EMULATOR: "1" script: @@ -224,8 +212,7 @@ legacy test: legacy btconly test: stage: test - dependencies: - - legacy emu btconly build + needs: ["legacy emu btconly build"] variables: EMULATOR: "1" EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf" @@ -244,8 +231,7 @@ legacy btconly test: legacy upgrade test: stage: test - dependencies: - - legacy emu regular build + needs: ["legacy emu regular build"] variables: TREZOR_UPGRADE_TEST: "legacy" script: @@ -265,7 +251,7 @@ legacy upgrade test: python test: stage: test - dependencies: [] + needs: [] variables: LC_ALL: "C.UTF-8" LANG: "C.UTF-8" @@ -288,7 +274,7 @@ storage test: changes: - ci/**/* - storage/**/* - dependencies: [] + needs: [] script: - nix-shell --run "pipenv run make -C storage/tests build" - nix-shell --run "pipenv run make -C storage/tests tests_all" @@ -310,8 +296,7 @@ hardware legacy regular device test: - /^release\// tags: - tpmb - dependencies: - - legacy fw regular debug build + needs: ["legacy fw regular debug build"] script: - cd ci/hardware_tests - nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start" @@ -337,8 +322,7 @@ hardware legacy btconly device test: - /^release\// tags: - tpmb - dependencies: - - legacy fw btconly debug build + needs: ["legacy fw btconly debug build"] script: - cd ci/hardware_tests - nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start"