mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-19 12:58:13 +00:00
ci: add arm emulator build in github actions
This commit is contained in:
parent
aedef2d69d
commit
415d62bc66
42
.github/workflows/core.yml
vendored
42
.github/workflows/core.yml
vendored
@ -126,6 +126,44 @@ jobs:
|
||||
core/build/bootloader_emu/bootloader.elf
|
||||
retention-days: 7
|
||||
|
||||
core_emu_arm:
|
||||
if: github.event_name == 'schedule'
|
||||
name: Build emu arm
|
||||
runs-on: ubuntu-latest-arm64
|
||||
needs: param
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
model: [T2T1, T2B1, T3T1]
|
||||
coins: [universal]
|
||||
type: [debuglink]
|
||||
asan: [noasan]
|
||||
exclude:
|
||||
- type: normal
|
||||
asan: asan
|
||||
env:
|
||||
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || matrix.model == 'T2B1' && 'R' || matrix.model }}
|
||||
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
|
||||
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
|
||||
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
|
||||
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: ./.github/actions/environment
|
||||
- run: nix-shell --run "poetry run make -C core build_bootloader_emu"
|
||||
if: matrix.coins == 'universal'
|
||||
- run: nix-shell --run "poetry run make -C core build_unix_frozen"
|
||||
- run: mv core/build/unix/trezor-emu-core core/build/unix/trezor-emu-arm-core-${{ matrix.model }}-${{ matrix.coins }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: core-emu-arm-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}
|
||||
path: |
|
||||
core/build/unix/trezor-emu-*
|
||||
core/build/bootloader_emu/bootloader.elf
|
||||
retention-days: 2
|
||||
|
||||
core_unit_python_test:
|
||||
name: Python unit tests
|
||||
runs-on: ubuntu-latest
|
||||
@ -708,7 +746,9 @@ jobs:
|
||||
name: Upload emulator binaries
|
||||
if: github.event_name == 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
needs: core_emu
|
||||
needs:
|
||||
- core_emu
|
||||
- core_emu_arm
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
|
36
.github/workflows/legacy.yml
vendored
36
.github/workflows/legacy.yml
vendored
@ -74,6 +74,34 @@ jobs:
|
||||
legacy/firmware/trezor-emu-legacy*
|
||||
retention-days: 7
|
||||
|
||||
legacy_emu_arm:
|
||||
if: github.event_name == 'schedule'
|
||||
name: Emulator arm
|
||||
runs-on: ubuntu-latest-arm64
|
||||
strategy:
|
||||
matrix:
|
||||
coins: [universal]
|
||||
type: [debuglink]
|
||||
asan: ${{ fromJSON(github.event_name == 'schedule' && '["noasan", "asan"]' || '["noasan"]') }}
|
||||
env:
|
||||
EMULATOR: 1
|
||||
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
|
||||
DEBUG_LINK: ${{ matrix.type == 'debuglink' && '1' || '0' }}
|
||||
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: ./.github/actions/environment
|
||||
- run: nix-shell --run "poetry run legacy/script/cibuild"
|
||||
- run: mv legacy/firmware/trezor.elf legacy/firmware/trezor-emu-arm-legacy-T1B1-${{ matrix.coins }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legacy-emu-arm-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}
|
||||
path: |
|
||||
legacy/firmware/trezor-emu-arm-legacy*
|
||||
retention-days: 7
|
||||
|
||||
legacy_device_test:
|
||||
name: Device test
|
||||
runs-on: ubuntu-latest
|
||||
@ -202,11 +230,13 @@ jobs:
|
||||
# TODO: always run if comment already exists
|
||||
if: ${{ steps.check-fixtures-changed.outputs.FIXTURES_CHANGED == '1' }}
|
||||
|
||||
core_upload_emu:
|
||||
legacy_upload_emu:
|
||||
name: Upload emulator binaries
|
||||
if: github.event_name == 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
needs: legacy_emu
|
||||
needs:
|
||||
- legacy_emu
|
||||
- legacy_emu_arm
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
@ -220,5 +250,5 @@ jobs:
|
||||
continue-on-error: true
|
||||
- run: |
|
||||
mkdir emulators
|
||||
cp trezor-emu-legacy* emulators
|
||||
cp trezor-emu-* emulators
|
||||
aws s3 sync --no-progress emulators s3://data.trezor.io/dev/firmware/emu-nightly
|
||||
|
Loading…
Reference in New Issue
Block a user