ci: upload emulator binaries to data.trezor.io

[skip_ci]
pull/3617/head
Martin Milata 2 months ago
parent c7832c39ab
commit fd23e3043d

@ -120,11 +120,12 @@ jobs:
- run: nix-shell --run "poetry run make -C core build_bootloader_emu" - run: nix-shell --run "poetry run make -C core build_bootloader_emu"
if: matrix.coins == 'universal' && matrix.model != 'T3T1' # FIXME T3T1 bootloader emulator if: matrix.coins == 'universal' && matrix.model != 'T3T1' # FIXME T3T1 bootloader emulator
- run: nix-shell --run "poetry run make -C core build_unix_frozen" - run: nix-shell --run "poetry run make -C core build_unix_frozen"
- run: cp core/build/unix/trezor-emu-core core/build/unix/trezor-emu-core-${{ matrix.model }}-${{ matrix.coins }}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }} name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}
path: | path: |
core/build/unix/trezor-emu-core core/build/unix/trezor-emu-core*
core/build/bootloader_emu/bootloader.elf core/build/bootloader_emu/bootloader.elf
retention-days: 7 retention-days: 7
@ -707,5 +708,25 @@ jobs:
- uses: ./.github/actions/ui-comment - uses: ./.github/actions/ui-comment
if: ${{ steps.check-fixtures-changed.outputs.FIXTURES_CHANGED == '1' }} if: ${{ steps.check-fixtures-changed.outputs.FIXTURES_CHANGED == '1' }}
core_upload_emu:
name: Upload emulator binaries
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
needs: core_emu
steps:
- uses: actions/download-artifact@v4
with:
pattern: core-emu*debuglink-noasan
merge-multiple: true
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::538326561891:role/gh_actions_deploy_dev_firmware_data
aws-region: eu-west-1
continue-on-error: true
- run: |
rm unix/trezor-emu-core
aws s3 sync unix s3://data.trezor.io/dev/firmware/emu-nightly
# Connect # Connect
# TODO: core_connect_test # TODO: core_connect_test

@ -3,6 +3,8 @@ name: Legacy
on: on:
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
schedule:
- cron: '35 22 * * *' # every day @ 22:35
permissions: permissions:
id-token: write # for fetching the OIDC token id-token: write # for fetching the OIDC token
@ -63,10 +65,13 @@ jobs:
submodules: recursive submodules: recursive
- uses: ./.github/actions/environment - uses: ./.github/actions/environment
- run: nix-shell --run "poetry run legacy/script/cibuild" - run: nix-shell --run "poetry run legacy/script/cibuild"
- run: cp legacy/firmware/trezor.elf legacy/firmware/trezor-emu-legacy-T1B1-${{ matrix.coins }}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: legacy-emu-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }} name: legacy-emu-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}
path: legacy/firmware/*.elf path: |
legacy/firmware/*.elf
legacy/firmware/trezor-emu-legacy*
retention-days: 7 retention-days: 7
legacy_device_test: legacy_device_test:
@ -195,3 +200,24 @@ jobs:
id: check-fixtures-changed id: check-fixtures-changed
- uses: ./.github/actions/ui-comment - uses: ./.github/actions/ui-comment
if: ${{ steps.check-fixtures-changed.outputs.FIXTURES_CHANGED == '1' }} if: ${{ steps.check-fixtures-changed.outputs.FIXTURES_CHANGED == '1' }}
core_upload_emu:
name: Upload emulator binaries
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
needs: legacy_emu
steps:
- uses: actions/download-artifact@v4
with:
pattern: legacy-emu*debuglink-noasan
merge-multiple: true
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::538326561891:role/gh_actions_deploy_dev_firmware_data
aws-region: eu-west-1
continue-on-error: true
- run: |
mkdir emulators
cp trezor-emu-legacy* emulators
aws s3 sync emulators s3://data.trezor.io/dev/firmware/emu-nightly

Loading…
Cancel
Save