1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

ci: use alternative list syntax for needs

This commit is contained in:
Pavol Rusnak 2020-10-06 21:59:22 +02:00
parent 99e0faafb6
commit 98ea241e97
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 63 additions and 30 deletions

View File

@ -7,7 +7,8 @@ release core fw regular deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core fw regular build"] needs:
- core fw regular build
script: script:
- export NAME="trezor-fw-regular-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-regular-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -25,7 +26,8 @@ release core fw btconly deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core fw btconly build"] needs:
- core fw btconly build
script: script:
- export NAME="trezor-fw-btconly-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-btconly-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -43,7 +45,8 @@ release core fw regular debug deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core fw regular debug build"] needs:
- core fw regular debug build
script: script:
- export NAME="trezor-fw-regular-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-regular-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -61,7 +64,8 @@ release core fw btconly debug deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core fw btconly debug build"] needs:
- core fw btconly debug build
script: script:
- export NAME="trezor-fw-btconly-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-btconly-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -81,7 +85,8 @@ release legacy fw regular deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["legacy fw regular build"] needs:
- legacy fw regular build
script: script:
- export NAME="trezor-fw-regular-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-regular-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -99,7 +104,8 @@ release legacy fw btconly deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["legacy fw btconly build"] needs:
- legacy fw btconly build
script: script:
- export NAME="trezor-fw-btconly-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-btconly-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -117,7 +123,8 @@ release legacy fw regular debug deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["legacy fw regular debug build"] needs:
- legacy fw regular debug build
script: script:
- export NAME="trezor-fw-regular-debug-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-regular-debug-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -135,7 +142,8 @@ release legacy fw btconly debug deploy:
variables: variables:
DEPLOY_DIRECTORY: "releases/firmwares" DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["legacy fw btconly debug build"] needs:
- legacy fw btconly debug build
script: script:
- export NAME="trezor-fw-btconly-debug-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin" - export NAME="trezor-fw-btconly-debug-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME" - echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
@ -155,7 +163,8 @@ release core unix debug deploy:
variables: variables:
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
script: script:
- DEST="$DEPLOY_PATH/trezor-emu-core-$CORE_VERSION-$CI_COMMIT_SHORT_SHA" - DEST="$DEPLOY_PATH/trezor-emu-core-$CORE_VERSION-$CI_COMMIT_SHORT_SHA"
- echo "Deploying to $DEST" - echo "Deploying to $DEST"
@ -173,7 +182,8 @@ release legacy unix debug deploy:
variables: variables:
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["legacy emu regular debug build"] needs:
- legacy emu regular debug build
script: script:
- DEST="$DEPLOY_PATH/trezor-emu-legacy-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA" - DEST="$DEPLOY_PATH/trezor-emu-legacy-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA"
- echo "Deploying to $DEST" - echo "Deploying to $DEST"
@ -191,7 +201,8 @@ release core macos debug deploy:
variables: variables:
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators/macos" DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators/macos"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
script: script:
- DEST="$DEPLOY_PATH/trezor-emu-macos-$CORE_VERSION-$CI_COMMIT_SHORT_SHA" - DEST="$DEPLOY_PATH/trezor-emu-macos-$CORE_VERSION-$CI_COMMIT_SHORT_SHA"
- echo "Deploying to $DEST" - echo "Deploying to $DEST"
@ -210,7 +221,8 @@ ui tests core fixtures deploy:
variables: variables:
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/" DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/"
before_script: [] # no pipenv before_script: [] # no pipenv
needs: ["core device ui test"] needs:
- core device ui test
script: script:
- echo "Deploying to $DEPLOY_PATH" - echo "Deploying to $DEPLOY_PATH"
- rsync --delete -va ci/ui_test_records/* "$DEPLOY_PATH" - rsync --delete -va ci/ui_test_records/* "$DEPLOY_PATH"

View File

@ -4,7 +4,11 @@ core unix coverage posttest:
stage: posttest stage: posttest
variables: variables:
COVERAGE_THRESHOLD: "78" COVERAGE_THRESHOLD: "78"
needs: ["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: script:
- nix-shell --run "pipenv run make -C core res" # we need to regenerate resources.py - nix-shell --run "pipenv run make -C core res" # we need to regenerate resources.py
- nix-shell --run "pipenv run make -C core coverage" - nix-shell --run "pipenv run make -C core coverage"
@ -21,7 +25,8 @@ core unix ui changes:
stage: posttest stage: posttest
except: except:
- master - master
needs: ["core device ui test"] needs:
- core device ui test
script: script:
- nix-shell --run "cd tests/ui_tests ; pipenv run python reporting/report_master_diff.py" - nix-shell --run "cd tests/ui_tests ; pipenv run python reporting/report_master_diff.py"
- mv tests/ui_tests/reporting/reports/master_diff/ . - mv tests/ui_tests/reporting/reports/master_diff/ .

View File

@ -4,13 +4,15 @@ image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/trezor-firmware-en
core unit test: core unit test:
stage: test stage: test
needs: ["core unix regular build"] needs:
- core unix regular build
script: script:
- nix-shell --run "pipenv run make -C core test" - nix-shell --run "pipenv run make -C core test"
core device ui test: core device ui test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
script: script:
- nix-shell --run "pipenv run make -C core test_emu_ui" - nix-shell --run "pipenv run make -C core test_emu_ui"
after_script: after_script:
@ -33,7 +35,8 @@ core device ui test:
core device test: core device test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
variables: variables:
TREZOR_PROFILING: 1 TREZOR_PROFILING: 1
script: script:
@ -52,7 +55,8 @@ core device test:
core btconly device test: core btconly device test:
stage: test stage: test
needs: ["core unix frozen btconly debug build"] needs:
- core unix frozen btconly debug build
variables: variables:
MICROPYTHON: "build/unix/trezor-emu-core-bitcoinonly" MICROPYTHON: "build/unix/trezor-emu-core-bitcoinonly"
TREZOR_PYTEST_SKIP_ALTCOINS: 1 TREZOR_PYTEST_SKIP_ALTCOINS: 1
@ -70,7 +74,8 @@ core btconly device test:
core monero test: core monero test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
variables: variables:
TREZOR_PROFILING: 1 TREZOR_PROFILING: 1
script: script:
@ -86,7 +91,8 @@ core monero test:
core u2f test: core u2f test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
variables: variables:
TREZOR_PROFILING: 1 TREZOR_PROFILING: 1
script: script:
@ -103,7 +109,8 @@ core u2f test:
core fido2 test: core fido2 test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
variables: variables:
TREZOR_PROFILING: 1 TREZOR_PROFILING: 1
script: script:
@ -124,7 +131,8 @@ core fido2 test:
core click test: core click test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
script: script:
- nix-shell --run "pipenv run make -C core test_emu_click" - nix-shell --run "pipenv run make -C core test_emu_click"
artifacts: artifacts:
@ -139,7 +147,8 @@ core click test:
core upgrade test: core upgrade test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
variables: variables:
TREZOR_UPGRADE_TEST: "core" TREZOR_UPGRADE_TEST: "core"
script: script:
@ -156,7 +165,8 @@ core upgrade test:
core persistence test: core persistence test:
stage: test stage: test
needs: ["core unix frozen debug build"] needs:
- core unix frozen debug build
script: script:
- nix-shell --run "pipenv run pytest --junitxml=tests/junit.xml tests/persistence_tests" - nix-shell --run "pipenv run pytest --junitxml=tests/junit.xml tests/persistence_tests"
artifacts: artifacts:
@ -178,7 +188,8 @@ crypto test:
- .gitlab-ci.yml - .gitlab-ci.yml
- ci/**/* - ci/**/*
- crypto/**/* - crypto/**/*
needs: ["crypto build"] needs:
- crypto build
script: script:
- ./crypto/tests/aestst - ./crypto/tests/aestst
- ./crypto/tests/test_check - ./crypto/tests/test_check
@ -199,7 +210,8 @@ crypto test:
legacy test: legacy test:
stage: test stage: test
needs: ["legacy emu regular debug build"] needs:
- legacy emu regular debug build
variables: variables:
EMULATOR: "1" EMULATOR: "1"
script: script:
@ -215,7 +227,8 @@ legacy test:
legacy btconly test: legacy btconly test:
stage: test stage: test
needs: ["legacy emu btconly debug build"] needs:
- legacy emu btconly debug build
variables: variables:
EMULATOR: "1" EMULATOR: "1"
EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf" EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf"
@ -234,7 +247,8 @@ legacy btconly test:
legacy upgrade test: legacy upgrade test:
stage: test stage: test
needs: ["legacy emu regular debug build"] needs:
- legacy emu regular debug build
variables: variables:
TREZOR_UPGRADE_TEST: "legacy" TREZOR_UPGRADE_TEST: "legacy"
script: script:
@ -302,7 +316,8 @@ hardware legacy regular device test:
- /^secfix\// - /^secfix\//
tags: tags:
- tpmb - tpmb
needs: ["legacy fw regular debug build"] needs:
- legacy fw regular debug build
script: script:
- cd ci/hardware_tests - cd ci/hardware_tests
- nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start" - nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start"
@ -329,7 +344,8 @@ hardware legacy btconly device test:
- /^secfix\// - /^secfix\//
tags: tags:
- tpmb - tpmb
needs: ["legacy fw btconly debug build"] needs:
- legacy fw btconly debug build
script: script:
- cd ci/hardware_tests - cd ci/hardware_tests
- nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start" - nix-shell --run "./record_video.sh ${CI_COMMIT_SHORT_SHA} start"