From c7b6d98cfc8a4839506044159d26890125095b58 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Thu, 27 Aug 2020 20:54:54 +0200 Subject: [PATCH] tests/upgrade-tests: modify paths in release jobs and add job for MacOS --- ci/build.yml | 4 ++-- ci/deploy.yml | 39 +++++++++++++++++++++++++++------------ ci/test.yml | 6 +++--- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/ci/build.yml b/ci/build.yml index f6b73671e..068092c4f 100644 --- a/ci/build.yml +++ b/ci/build.yml @@ -238,7 +238,7 @@ legacy fw btconly debug build: - trezor-fw-btconly-*.*.*-$CI_COMMIT_SHORT_SHA.bin expire_in: 1 week -legacy emu regular build: +legacy emu regular debug build: stage: build needs: [] variables: @@ -252,7 +252,7 @@ legacy emu regular build: - legacy/firmware/trezor.elf expire_in: 1 week -legacy emu btconly build: +legacy emu btconly debug build: stage: build needs: [] variables: diff --git a/ci/deploy.yml b/ci/deploy.yml index 2bc85ddb0..719293427 100644 --- a/ci/deploy.yml +++ b/ci/deploy.yml @@ -148,19 +148,18 @@ release legacy fw btconly debug deploy: tags: - deploy -# Upgrade tests +# Emulators, used also for upgrade tests -upgrade tests core deploy: +release core unix debug deploy: stage: deploy variables: - DEPLOY_PATH: "${DEPLOY_BASE_DIR}/upgrade_tests" + DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" before_script: [] # no pipenv 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" - - DEST=${DEPLOY_PATH}/trezor-emu-$TAG + - DEST="$DEPLOY_PATH/trezor-emu-core-$CORE_VERSION-$CI_COMMIT_SHORT_SHA" - echo "Deploying to $DEST" + - nix-shell -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 core/build/unix/trezor-emu-core" - rsync --delete -va core/build/unix/trezor-emu-core "$DEST" only: - /^core\// @@ -169,17 +168,16 @@ upgrade tests core deploy: tags: - deploy -upgrade tests legacy deploy: +release legacy unix debug deploy: stage: deploy variables: - DEPLOY_PATH: "${DEPLOY_BASE_DIR}/upgrade_tests" + DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" before_script: [] # no pipenv - needs: ["legacy emu regular build"] + needs: ["legacy emu regular debug build"] script: - - TAG=`git tag --points-at HEAD | grep "legacy" | sed "s/\//-/"` - - "[[ $TAG == '' ]] && echo 'Tag is not legacy/*: exiting.' && exit 1" - - DEST=${DEPLOY_PATH}/trezor-emu-$TAG + - DEST="$DEPLOY_PATH/trezor-emu-legacy-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA" - echo "Deploying to $DEST" + - nix-shell -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 legacy/firmware/trezor.elf" - rsync --delete -va legacy/firmware/trezor.elf "$DEST" only: - /^legacy\// @@ -188,6 +186,23 @@ upgrade tests legacy deploy: tags: - deploy +release core macos debug deploy: + stage: deploy + variables: + DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators/macos" + before_script: [] # no pipenv + needs: ["core unix frozen debug build"] + script: + - DEST="$DEPLOY_PATH/trezor-emu-macos-$CORE_VERSION-$CI_COMMIT_SHORT_SHA" + - echo "Deploying to $DEST" + - rsync --delete -va core/build/unix/trezor-emu-core "$DEST" + only: + - /^core\// + except: + - branches # run for tags only + tags: + - deploy + # UI tests ui tests core fixtures deploy: diff --git a/ci/test.yml b/ci/test.yml index 4b521265d..360e3f8cd 100644 --- a/ci/test.yml +++ b/ci/test.yml @@ -196,7 +196,7 @@ crypto test: legacy test: stage: test - needs: ["legacy emu regular build"] + needs: ["legacy emu regular debug build"] variables: EMULATOR: "1" script: @@ -212,7 +212,7 @@ legacy test: legacy btconly test: stage: test - needs: ["legacy emu btconly build"] + needs: ["legacy emu btconly debug build"] variables: EMULATOR: "1" EMULATOR_BINARY: "firmware/trezor-bitcoinonly.elf" @@ -231,7 +231,7 @@ legacy btconly test: legacy upgrade test: stage: test - needs: ["legacy emu regular build"] + needs: ["legacy emu regular debug build"] variables: TREZOR_UPGRADE_TEST: "legacy" script: