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

ci: add core btconly debug build and deploy it during release

This commit is contained in:
Tomas Susanka 2020-08-26 16:24:20 +02:00
parent 00593dc6d6
commit c52c93aea0
2 changed files with 61 additions and 31 deletions

View File

@ -50,6 +50,23 @@ core fw btconly build:
- trezor-fw-btconly-*.*.*-$CI_COMMIT_SHORT_SHA.bin
expire_in: 1 week
core fw btconly debug build:
stage: build
needs: []
variables:
BITCOIN_ONLY: "1"
PYOPT: "0"
script:
- nix-shell --run "pipenv run make -C core build_firmware"
- cp core/build/firmware/firmware.bin trezor-fw-btconly-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin
only: # currently used only for deploys
- /^core\//
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- trezor-fw-btconly-*.*.*-$CI_COMMIT_SHORT_SHA.bin
expire_in: 1 week
core fw btconly t1 build:
stage: build
needs: []

View File

@ -9,8 +9,7 @@ release core fw regular deploy:
before_script: [] # no pipenv
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"
- export NAME="trezor-fw-regular-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
@ -28,8 +27,7 @@ release core fw btconly deploy:
before_script: [] # no pipenv
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"
- export NAME="trezor-fw-btconly-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
@ -40,6 +38,44 @@ release core fw btconly deploy:
tags:
- deploy
release core fw regular debug deploy:
stage: deploy
variables:
DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv
needs: ["core fw regular debug build"]
script:
- export NAME="trezor-fw-regular-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- 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
release core fw btconly debug deploy:
stage: deploy
variables:
DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv
needs: ["core fw btconly debug build"]
script:
- export NAME="trezor-fw-btconly-debug-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- 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:
@ -47,8 +83,7 @@ release legacy fw regular deploy:
before_script: [] # no pipenv
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"
- export NAME="trezor-fw-regular-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
@ -66,8 +101,7 @@ release legacy fw btconly deploy:
before_script: [] # no pipenv
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"
- export NAME="trezor-fw-btconly-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
@ -78,25 +112,6 @@ release legacy fw btconly deploy:
tags:
- deploy
release core fw regular debug deploy:
stage: deploy
variables:
DEPLOY_DIRECTORY: "releases/firmwares"
before_script: [] # no pipenv
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"
- 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
release legacy fw regular debug deploy:
stage: deploy
variables:
@ -104,8 +119,7 @@ release legacy fw regular debug deploy:
before_script: [] # no pipenv
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"
- export NAME="trezor-fw-regular-debug-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"
@ -123,8 +137,7 @@ release legacy fw btconly debug deploy:
before_script: [] # no pipenv
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"
- export NAME="trezor-fw-btconly-debug-$LEGACY_VERSION-$CI_COMMIT_SHORT_SHA.bin"
- echo "Deploying to ${DEPLOY_DIRECTORY}/$NAME"
- mkdir -p "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}"
- rsync --delete -va $NAME "${DEPLOY_BASE_DIR}/${DEPLOY_DIRECTORY}/$NAME"