2020-06-07 19:49:06 +00:00
|
|
|
image: registry.gitlab.com/satoshilabs/trezor/trezor-firmware/trezor-firmware-env.nix
|
2019-09-09 13:10:22 +00:00
|
|
|
|
2019-08-14 14:27:17 +00:00
|
|
|
# Releases
|
2019-09-09 13:10:22 +00:00
|
|
|
|
2019-08-14 14:27:17 +00:00
|
|
|
release core fw regular deploy:
|
2019-09-09 13:10:22 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/tt"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core fw regular build
|
2019-08-14 14:27:17 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T2T1-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2019-08-14 14:27:17 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
only:
|
2020-04-09 12:08:56 +00:00
|
|
|
- /^core\//
|
2019-08-14 14:27:17 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
release core fw btconly deploy:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/tt"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core fw btconly build
|
2019-08-14 14:27:17 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T2T1-btconly-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2019-08-14 14:27:17 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
only:
|
2020-04-09 12:08:56 +00:00
|
|
|
- /^core\//
|
2019-08-14 14:27:17 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
2020-08-26 14:24:20 +00:00
|
|
|
release core fw regular debug deploy:
|
2019-08-14 14:27:17 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/tt"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core fw regular debug build
|
2019-08-14 14:27:17 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T2T1-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2019-08-14 14:27:17 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
only:
|
2020-08-26 14:24:20 +00:00
|
|
|
- /^core\//
|
2019-08-14 14:27:17 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
2020-08-26 14:24:20 +00:00
|
|
|
release core fw btconly debug deploy:
|
2019-08-14 14:27:17 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/tt"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core fw btconly debug build
|
2020-08-26 14:24:20 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T2T1-btconly-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2020-08-26 14:24:20 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
only:
|
|
|
|
- /^core\//
|
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
# Legacy
|
|
|
|
|
|
|
|
release legacy fw regular deploy:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/t1"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy fw regular build
|
2019-08-14 14:27:17 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T1B1-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2019-08-14 14:27:17 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
2020-06-19 19:34:31 +00:00
|
|
|
only:
|
|
|
|
- /^legacy\//
|
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
2020-08-26 14:24:20 +00:00
|
|
|
release legacy fw btconly deploy:
|
2020-06-19 19:34:31 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/t1"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy fw btconly build
|
2020-06-19 19:34:31 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T1B1-btconly-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2020-06-19 19:34:31 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
only:
|
2020-08-26 14:24:20 +00:00
|
|
|
- /^legacy\//
|
2020-06-19 19:34:31 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
2020-07-15 09:43:10 +00:00
|
|
|
release legacy fw regular debug deploy:
|
2020-06-19 19:34:31 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/t1"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy fw regular debug build
|
2020-06-19 19:34:31 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T1B1-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2020-06-19 19:34:31 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
2020-07-15 09:43:10 +00:00
|
|
|
only:
|
|
|
|
- /^legacy\//
|
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
release legacy fw btconly debug deploy:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-10-30 10:27:58 +00:00
|
|
|
DEPLOY_DIRECTORY: "releases/firmwares/t1"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy fw btconly debug build
|
2020-07-15 09:43:10 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
2023-01-10 21:28:57 +00:00
|
|
|
- export NAME="firmware-T1B1-btconly-debug-$VERSION-$CI_COMMIT_SHORT_SHA.bin"
|
2020-07-15 09:43:10 +00:00
|
|
|
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
|
|
|
|
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
|
|
|
|
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
|
2019-08-14 14:27:17 +00:00
|
|
|
only:
|
2020-04-09 12:08:56 +00:00
|
|
|
- /^legacy\//
|
2019-08-14 14:27:17 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
2020-08-27 18:54:54 +00:00
|
|
|
# Emulators, used also for upgrade tests
|
2019-08-14 14:27:17 +00:00
|
|
|
|
2020-08-27 18:54:54 +00:00
|
|
|
release core unix debug deploy:
|
2019-08-14 14:27:17 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-08-27 18:54:54 +00:00
|
|
|
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- core unix frozen debug build
|
2021-12-20 12:33:15 +00:00
|
|
|
- core unix frozen debug build arm
|
2019-09-09 13:10:22 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
|
2021-02-11 07:25:24 +00:00
|
|
|
- DEST="$DEPLOY_PATH/trezor-emu-core-v$VERSION"
|
2022-05-26 13:06:09 +00:00
|
|
|
- DEST_ARM="$DEPLOY_PATH/arm/trezor-emu-core-v$VERSION-arm"
|
2021-12-20 12:33:15 +00:00
|
|
|
- echo "Deploying to $DEST and $DEST_ARM"
|
2023-02-14 18:17:05 +00:00
|
|
|
- $NIX_SHELL -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 core/build/unix/trezor-emu-core"
|
|
|
|
- $NIX_SHELL -p patchelf --run "patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 core/build/unix/trezor-emu-core-arm"
|
2020-07-27 14:59:51 +00:00
|
|
|
- rsync --delete -va core/build/unix/trezor-emu-core "$DEST"
|
2021-12-20 12:33:15 +00:00
|
|
|
- rsync --delete -va core/build/unix/trezor-emu-core-arm "$DEST_ARM"
|
2019-08-14 14:27:17 +00:00
|
|
|
only:
|
2020-04-09 12:08:56 +00:00
|
|
|
- /^core\//
|
2019-08-14 14:27:17 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
2019-09-09 13:10:22 +00:00
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
2020-08-27 18:54:54 +00:00
|
|
|
release legacy unix debug deploy:
|
2019-09-09 13:10:22 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
2020-08-27 18:54:54 +00:00
|
|
|
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
|
|
|
- legacy emu regular debug build
|
2021-12-20 12:33:15 +00:00
|
|
|
- legacy emu regular debug build arm
|
2019-09-09 13:10:22 +00:00
|
|
|
script:
|
2020-10-07 20:03:07 +00:00
|
|
|
- export VERSION=$(./tools/version.sh legacy/firmware/version.h)
|
2021-02-11 07:25:24 +00:00
|
|
|
- DEST="$DEPLOY_PATH/trezor-emu-legacy-v$VERSION"
|
2022-05-26 13:06:09 +00:00
|
|
|
- DEST_ARM="$DEPLOY_PATH/arm/trezor-emu-legacy-v$VERSION-arm"
|
2021-12-20 12:33:15 +00:00
|
|
|
- echo "Deploying to $DEST and $DEST_ARM"
|
2023-02-14 18:17:05 +00:00
|
|
|
- $NIX_SHELL -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 legacy/firmware/trezor.elf"
|
|
|
|
- $NIX_SHELL -p patchelf --run "patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 legacy/firmware/trezor-arm.elf"
|
2019-09-09 13:10:22 +00:00
|
|
|
- rsync --delete -va legacy/firmware/trezor.elf "$DEST"
|
2021-12-20 12:33:15 +00:00
|
|
|
- rsync --delete -va legacy/firmware/trezor-arm.elf "$DEST_ARM"
|
2019-08-14 14:27:17 +00:00
|
|
|
only:
|
2020-04-09 12:08:56 +00:00
|
|
|
- /^legacy\//
|
2019-08-14 14:27:17 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
2019-09-09 13:10:22 +00:00
|
|
|
tags:
|
|
|
|
- deploy
|
2019-12-30 13:09:18 +00:00
|
|
|
|
|
|
|
# UI tests
|
|
|
|
|
2022-02-09 13:34:22 +00:00
|
|
|
ui tests fixtures deploy:
|
2019-12-30 13:09:18 +00:00
|
|
|
stage: deploy
|
|
|
|
variables:
|
|
|
|
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/ui_tests/"
|
2022-02-22 12:08:12 +00:00
|
|
|
BUCKET: "data.trezor.io"
|
2020-11-04 15:31:20 +00:00
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
2020-09-25 14:21:23 +00:00
|
|
|
before_script: [] # no poetry
|
2020-10-06 19:59:22 +00:00
|
|
|
needs:
|
2023-02-10 12:08:15 +00:00
|
|
|
- core click test
|
2022-02-08 12:46:18 +00:00
|
|
|
- core device test
|
2023-03-30 10:44:05 +00:00
|
|
|
- core persistence test
|
2022-02-09 13:34:22 +00:00
|
|
|
- legacy device test
|
2023-05-12 09:19:35 +00:00
|
|
|
- core device R test
|
2023-06-13 13:06:40 +00:00
|
|
|
- core click R test
|
2019-12-30 13:09:18 +00:00
|
|
|
script:
|
|
|
|
- echo "Deploying to $DEPLOY_PATH"
|
2020-01-06 14:59:12 +00:00
|
|
|
- rsync --delete -va ci/ui_test_records/* "$DEPLOY_PATH"
|
2022-02-22 12:08:12 +00:00
|
|
|
- source ${AWS_DEPLOY_DATA}
|
2022-03-23 11:34:38 +00:00
|
|
|
- aws s3 sync $DEPLOY_PATH s3://$BUCKET/dev/firmware/ui_tests
|
2022-02-22 12:08:12 +00:00
|
|
|
# This "hack" is needed because aws does not have an easy option to generate autoindex. We fetch the one autogenerated by nginx on local server.
|
2022-03-23 14:18:45 +00:00
|
|
|
- wget https://firmware.corp.sldev.cz/ui_tests/ -O index.html && aws s3 cp index.html s3://$BUCKET/dev/firmware/ui_tests/
|
2022-02-22 12:08:12 +00:00
|
|
|
tags:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
# sync to aws
|
|
|
|
|
|
|
|
sync emulators to aws:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
2022-05-26 13:06:09 +00:00
|
|
|
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators/"
|
2022-02-22 12:08:12 +00:00
|
|
|
BUCKET: "data.trezor.io"
|
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
|
|
|
before_script: [] # no poetry
|
|
|
|
script:
|
|
|
|
- source ${AWS_DEPLOY_DATA}
|
2022-05-26 13:06:09 +00:00
|
|
|
- aws s3 sync $DEPLOY_PATH s3://$BUCKET/dev/firmware/releases/emulators/
|
2022-02-22 12:08:12 +00:00
|
|
|
# This "hack" is needed because aws does not have an easy option to generate autoindex. We fetch the one autogenerated by nginx on local server.
|
2022-03-23 14:18:45 +00:00
|
|
|
- wget https://firmware.corp.sldev.cz/releases/emulators/ -O index.html && aws s3 cp index.html s3://$BUCKET/dev/firmware/releases/emulators/
|
2022-05-26 13:06:09 +00:00
|
|
|
- wget https://firmware.corp.sldev.cz/releases/emulators/arm/ -O index.html && aws s3 cp index.html s3://$BUCKET/dev/firmware/releases/emulators/arm/
|
|
|
|
# invalidate cloudfront cache for dev/ directory.
|
|
|
|
- aws cloudfront create-invalidation --distribution-id E1ERY5K2OTKKI1 --paths '/dev/*'
|
2022-07-14 20:01:55 +00:00
|
|
|
only:
|
|
|
|
- /^legacy\//
|
|
|
|
- /^core\//
|
2022-02-22 12:08:12 +00:00
|
|
|
except:
|
|
|
|
- branches # run for tags only
|
2019-12-30 13:09:18 +00:00
|
|
|
tags:
|
|
|
|
- deploy
|
2022-01-25 10:20:12 +00:00
|
|
|
|
|
|
|
# common sync to trezor-common
|
|
|
|
|
|
|
|
common sync:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
|
|
|
GIT_STRATEGY: clone # clone entire repo instead of reusing workspace
|
|
|
|
GIT_DEPTH: 0 # avoid shallow clone
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
needs: []
|
|
|
|
before_script: [] # no poetry
|
|
|
|
script:
|
|
|
|
- echo "Synchronizing common with the trezor-common repository"
|
|
|
|
- ./ci/common_sync/common_repo_sync.sh
|