Skip to content

[draft] 2nd version, leveraging the reusable builder workflow #17

[draft] 2nd version, leveraging the reusable builder workflow

[draft] 2nd version, leveraging the reusable builder workflow #17

name: APP-TESTER TESTS
on:
workflow_dispatch:
push:
pull_request:
jobs:
define_matrix:
name: Generate applications list for each device according to manifests
runs-on: ubuntu-latest
outputs:
apps_config: ${{ steps.process_devices.outputs.apps_config }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install ledgered
- name: Define the list of application to build by device
id: process_devices
run: |
devices=$(python script.py -l 10 -d all -t ${{ secrets.GITHUB_TOKEN }})
# devices='[{"devices": ["stax", "nanos+", "nanos", "nanox"], "name": "app-u2f", "repository": "LedgerHQ/app-u2f"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-bitcoin", "repository": "LedgerHQ/app-bitcoin"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-ethereum", "repository": "LedgerHQ/app-ethereum"}, {"devices": ["stax", "nanos+", "nanos", "nanox"], "name": "app-ssh-agent", "repository": "LedgerHQ/app-ssh-agent"}, {"devices": ["stax", "nanos+", "nanos", "nanox"], "name": "app-passwords", "repository": "LedgerHQ/app-passwords"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-openpgp", "repository": "LedgerHQ/app-openpgp"}, {"devices": ["nanos+", "nanos", "nanox"], "name": "app-windows-hello", "repository": "LedgerHQ/app-windows-hello"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-xrp", "repository": "LedgerHQ/app-xrp"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-monero", "repository": "LedgerHQ/app-monero"}, {"devices": ["nanos+", "nanos", "nanox"], "name": "app-ark", "repository": "LedgerHQ/app-ark"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-neo", "repository": "LedgerHQ/app-neo"}, {"devices": ["flex", "nanos+", "nanos", "stax", "nanox"], "name": "app-stellar", "repository": "LedgerHQ/app-stellar"}]'
echo "apps_config=$devices" >> $GITHUB_OUTPUT
build_applications:
name: Build all selected applications using the reusable workflow
needs: define_matrix
strategy:
fail-fast: false
matrix:
app: ${{ fromJSON(needs.define_matrix.outputs.apps_config) }}
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
app_repository: ${{ matrix.app.repository }}
run_for_devices: ${{ toJSON(matrix.app.devices) }}
upload_app_binaries_artifact: "compiled_app_binaries"
app_branch_name: develop